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
@@ -29,7 +29,7 @@
. += "<span class='notice'>The fuze is set to [det_time / 10] second\s.</span>"
else
. += "<span class='warning'>[src] is set for instant detonation.</span>"
if(modifiable_timer)
. += "<span class='notice'>Use a screwdriver to modify the time on the fuze.</span>"
else
@@ -125,8 +125,4 @@
if(!HAS_TRAIT(src, TRAIT_CMAGGED))
return
REMOVE_TRAIT(src, TRAIT_CMAGGED, "cmagged grenade")
var/datum/component/bomberang = GetComponent(/datum/component/boomerang)
if(!bomberang)
return
bomberang.RemoveComponent()
qdel(bomberang)
DeleteComponent(/datum/component/boomerang)
+2 -1
View File
@@ -524,7 +524,8 @@
icon_state = "egg_hatched"
flick("egg_opening", src)
status = BURSTING
qdel(GetComponent(/datum/component/proximity_monitor))
DeleteComponent(/datum/component/proximity_monitor)
addtimer(CALLBACK(src, PROC_REF(hatch)), 1.5 SECONDS)
///We now check HOW the hugger is hatching, kill carried from Burst() and obj_break()