item_battery: disable pickup when ITEM_SUIT isn't present

This commit is contained in:
Marco Cawthorne 2022-05-01 15:56:43 -07:00
parent 8fad0d7dc1
commit f61311cb32
Signed by: eukara
GPG Key ID: C196CD8BA993248A
1 changed files with 7 additions and 1 deletions

View File

@ -44,10 +44,16 @@ void item_battery::Touch(entity eToucher)
}
base_player pl = (base_player)eToucher;
/* don't pick up if we don't have a suit */
if (!(pl.g_items & ITEM_SUIT))
return;
/* maxxed out */
if (pl.armor >= 100) {
return;
}
/* Move this somewhere else? */
pl.armor += Skill_GetValue("battery", 15);
if (pl.armor > 100) {