fixes modsuits fucking up when unequipping every item (wabbajack) (#67533)

sad
This commit is contained in:
Fikou
2022-06-06 05:07:50 +02:00
committed by GitHub
parent c7789d436b
commit 748fa2164f
2 changed files with 5 additions and 3 deletions
+3 -1
View File
@@ -676,10 +676,12 @@
uninstall(part)
return
if(part in mod_parts)
if(!wearer)
part.forceMove(src)
return
retract(wearer, part)
if(active)
INVOKE_ASYNC(src, .proc/toggle_activate, wearer, TRUE)
return
/obj/item/mod/control/proc/on_part_destruction(obj/item/part, damage_flag)
SIGNAL_HANDLER
+2 -2
View File
@@ -42,8 +42,9 @@
if(!deleting)
SEND_SIGNAL(src, COMSIG_TRY_STORAGE_QUICK_EMPTY, drop_location())
SEND_SIGNAL(src, COMSIG_TRY_STORAGE_SET_LOCKSTATE, TRUE)
/obj/item/mod/module/storage/proc/on_chestplate_unequip(obj/item/source, force, atom/newloc, no_move, invdrop, silent)
if(QDELETED(source) || newloc == mod.wearer || !mod.wearer.s_store)
if(QDELETED(source) || !mod.wearer || newloc == mod.wearer || !mod.wearer.s_store)
return
to_chat(mod.wearer, span_notice("[src] tries to store [mod.wearer.s_store] inside itself."))
SEND_SIGNAL(src, COMSIG_TRY_STORAGE_INSERT, mod.wearer.s_store, mod.wearer, TRUE)
@@ -75,7 +76,6 @@
max_combined_w_class = 60
max_items = 21
///Ion Jetpack - Lets the user fly freely through space using battery charge.
/obj/item/mod/module/jetpack
name = "MOD ion jetpack module"