Makes RemoveComponent more sane (#26877)

* Makes RemoveComponent more sane

* An even better wrapper

* Update code/datums/components/surgery_initiator.dm

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

* Update code/datums/components/_component.dm

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

* Update code/datums/components/_component.dm

Signed-off-by: DGamerL <108773801+DGamerL@users.noreply.github.com>

* Update code/datums/components/_component.dm

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

* Update code/datums/components/_component.dm

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

---------

Signed-off-by: DGamerL <108773801+DGamerL@users.noreply.github.com>
Co-authored-by: Contrabang <91113370+Contrabang@users.noreply.github.com>
This commit is contained in:
DGamerL
2024-10-09 20:46:04 +02:00
committed by GitHub
parent 3e640bd2c0
commit 89796a055b
20 changed files with 45 additions and 32 deletions
+2 -2
View File
@@ -506,7 +506,7 @@
/obj/item/mod/module/energy_shield/on_suit_deactivation(deleting = FALSE)
var/datum/component/shielded/shield = mod.GetComponent(/datum/component/shielded)
charges = shield.current_charges
qdel(shield)
shield.RemoveComponent()
UnregisterSignal(mod.wearer, COMSIG_HUMAN_CHECK_SHIELDS)
/obj/item/mod/module/energy_shield/proc/shield_reaction(mob/living/carbon/human/owner,
@@ -581,7 +581,7 @@
return FALSE
var/datum/component/shielded/shield = mod.GetComponent(/datum/component/shielded)
charges = shield.current_charges
qdel(shield)
shield.RemoveComponent()
UnregisterSignal(mod.wearer, COMSIG_HUMAN_CHECK_SHIELDS)
REMOVE_TRAIT(mod.wearer, TRAIT_SHOCKIMMUNE, UNIQUE_TRAIT_SOURCE(src))
+2 -1
View File
@@ -38,7 +38,8 @@
/obj/item/mod/module/waddle/on_suit_deactivation(deleting = FALSE)
if(!deleting)
qdel(mod.boots.GetComponent(/datum/component/squeak))
mod.boots.DeleteComponent(/datum/component/squeak)
mod.wearer.RemoveElement(/datum/element/waddling)
//Boot heating - dries floors like galoshes/dry