fix rigged powercell for modsuits (#26342)

* fix powercell for modsuits

* Update code/modules/mod/mod_core.dm

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

* Update code/modules/power/cell.dm

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

---------

Signed-off-by: DGamerL <108773801+DGamerL@users.noreply.github.com>
Co-authored-by: DGamerL <108773801+DGamerL@users.noreply.github.com>
This commit is contained in:
Qwertytoforty
2024-08-02 00:02:57 +00:00
committed by GitHub
co-authored by DGamerL
parent 217022fab7
commit b1432d3039
2 changed files with 8 additions and 0 deletions
+7
View File
@@ -153,10 +153,12 @@
cell = new_cell
cell.forceMove(src)
RegisterSignal(src, COMSIG_ATOM_EXITED, PROC_REF(on_exit))
RegisterSignal(cell, COMSIG_PARENT_QDELETING, PROC_REF(remove_cell))
/obj/item/mod/core/standard/proc/uninstall_cell()
if(!cell)
return
UnregisterSignal(cell, COMSIG_PARENT_QDELETING)
cell = null
UnregisterSignal(src, COMSIG_ATOM_EXITED)
@@ -167,6 +169,11 @@
return
uninstall_cell()
/obj/item/mod/core/standard/proc/remove_cell()
SIGNAL_HANDLER // COMSIG_PARENT_QDELETING
UnregisterSignal(cell, COMSIG_PARENT_QDELETING)
cell = null
/obj/item/mod/core/standard/proc/on_examine(datum/source, mob/examiner, list/examine_text)
SIGNAL_HANDLER
+1
View File
@@ -128,6 +128,7 @@
message_admins("LOG: Rigged power cell explosion, last touched by [fingerprintslast]")
explosion(T, devastation_range, heavy_impact_range, light_impact_range, flash_range)
charge = 0 //Extra safety in the event the cell does not QDEL right
qdel(src)
/obj/item/stock_parts/cell/proc/corrupt()