fixes applying and removing pandora's hope effect (#20958)

* fixes applying and removing pandora

Pandora can now be applied to and removed from another person

* removes unused code

removes unused code

* Update code/modules/mob/living/simple_animal/hostile/mining/elites/pandora.dm

Co-authored-by: Contrabang <91113370+Contrabang@users.noreply.github.com>

* Update code/modules/mob/living/simple_animal/hostile/mining/elites/pandora.dm

Co-authored-by: Contrabang <91113370+Contrabang@users.noreply.github.com>

* adds param to base proc on_removed() to prevent runtimes

* uses has_suit instead

* Update code/modules/mob/living/simple_animal/hostile/mining/elites/pandora.dm

Co-authored-by: S34N <12197162+S34NW@users.noreply.github.com>

---------

Co-authored-by: Contrabang <91113370+Contrabang@users.noreply.github.com>
Co-authored-by: S34N <12197162+S34NW@users.noreply.github.com>
This commit is contained in:
Taran
2023-06-18 13:20:30 +01:00
committed by GitHub
co-authored by Contrabang S34N
parent bdcc418467
commit eaae1c62d5
@@ -212,26 +212,14 @@
/obj/item/clothing/accessory/necklace/pandora_hope/on_attached(obj/item/clothing/under/S, mob/user)
. = ..()
if(isliving(user))
var/mob/living/M = user
if(isliving(S.loc))
var/mob/living/M = S.loc
M.apply_status_effect(STATUS_EFFECT_HOPE)
/obj/item/clothing/accessory/necklace/pandora_hope/on_removed(mob/user)
. = ..()
if(isliving(user))
var/mob/living/M = user
if(isliving(has_suit.loc))
var/mob/living/M = has_suit.loc
M.remove_status_effect(STATUS_EFFECT_HOPE)
/obj/item/clothing/accessory/necklace/pandora_hope/attached_unequip()
if(isliving(usr))
var/mob/living/M = usr
M.remove_status_effect(STATUS_EFFECT_HOPE)
return ..()
/obj/item/clothing/accessory/necklace/pandora_hope/attached_equip()
if(isliving(usr))
var/mob/living/M = usr
M.apply_status_effect(STATUS_EFFECT_HOPE)
return ..()
#undef CHASER_BURST