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
@@ -430,7 +430,8 @@ GLOBAL_LIST_EMPTY(telecomms_trap_tank)
/obj/structure/environmental_storytelling_holopad/proc/start_message(mob/living/carbon/human/H)
activated = TRUE
qdel(GetComponent(/datum/component/proximity_monitor))
DeleteComponent(/datum/component/proximity_monitor)
icon_state = "holopad1"
update_icon(UPDATE_OVERLAYS)
var/obj/effect/overlay/hologram = new(get_turf(src))
+2 -1
View File
@@ -90,7 +90,8 @@
saved.shoot_inventory = FALSE
saved.aggressive = FALSE
if(saved.tiltable)
qdel(saved.GetComponent(/datum/component/proximity_monitor))
saved.DeleteComponent(/datum/component/proximity_monitor)
if(originMachine)
originMachine.speak("I am... vanquished. My people will remem...ber...meeee.")
originMachine.visible_message("[originMachine] beeps and seems lifeless.")
@@ -203,7 +203,7 @@
icon_state = "[initial(icon_state)]_dead"
item_state = "facehugger_inactive"
stat = DEAD
qdel(GetComponent(/datum/component/proximity_monitor))
DeleteComponent(/datum/component/proximity_monitor)
visible_message("<span class='danger'>[src] curls up into a ball!</span>")
@@ -21,7 +21,7 @@
if(!mind)
return FALSE
if(mind.miming)
qdel(GetComponent(/datum/component/footstep))
DeleteComponent(/datum/component/footstep)
return TRUE
/**
@@ -413,7 +413,7 @@ While using this makes the system rely on OnFire, it still gives options for tim
text += "<span class='warning'>If teleported to the Station by jaunter, you are allowed to attack people on Station, until you get killed.</span>"
to_chat(mychild, text.Join(" "))
qdel(GetComponent(/datum/component/proximity_monitor))
DeleteComponent(/datum/component/proximity_monitor)
/obj/item/tumor_shard
name = "tumor shard"
+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
@@ -514,8 +514,8 @@
if(M.mind?.assigned_role != "Clown")
REMOVE_TRAIT(M, TRAIT_COMIC_SANS, id)
M.RemoveElement(/datum/element/waddling)
qdel(M.GetComponent(/datum/component/squeak))
M.DeleteComponent(/datum/component/squeak)
/datum/reagent/royal_bee_jelly
name = "Royal bee jelly"