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

View file

@ -45,9 +45,15 @@ void item_battery::Touch(entity eToucher)
base_player pl = (base_player)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) { if (pl.armor >= 100) {
return; return;
} }
/* Move this somewhere else? */ /* Move this somewhere else? */
pl.armor += Skill_GetValue("battery", 15); pl.armor += Skill_GetValue("battery", 15);
if (pl.armor > 100) { if (pl.armor > 100) {