mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-29 08:08:49 +01:00
[MIRROR] [NO GBP] modsuits now retract if summoned through summon items or some other hijinx [MDB IGNORE] (#12852)
* [NO GBP] modsuits now retract if summoned through summon items or some other hijinx * Update mod_activation.dm * Update mod_activation.dm Co-authored-by: Fikou <23585223+Fikou@users.noreply.github.com> Co-authored-by: Zonespace <41448081+Zonespace27@users.noreply.github.com>
This commit is contained in:
co-authored by
Fikou
Zonespace
parent
593949ec9c
commit
e471f4cc2e
@@ -244,6 +244,23 @@
|
||||
if(slot == ITEM_SLOT_BACK)
|
||||
return TRUE
|
||||
|
||||
/obj/item/mod/control/Moved(atom/old_loc, movement_dir, forced = FALSE, list/old_locs)
|
||||
. = ..()
|
||||
if(!wearer || old_loc != wearer || loc == wearer)
|
||||
return
|
||||
if(active || activating)
|
||||
for(var/obj/item/mod/module/module as anything in modules)
|
||||
if(!module.active)
|
||||
continue
|
||||
module.on_deactivation(display_message = FALSE)
|
||||
for(var/obj/item/part as anything in mod_parts)
|
||||
seal_part(part, seal = FALSE)
|
||||
for(var/obj/item/part as anything in mod_parts)
|
||||
conceal(null, part)
|
||||
if(active)
|
||||
finish_activation(on = FALSE)
|
||||
unset_wearer()
|
||||
|
||||
/obj/item/mod/control/allow_attack_hand_drop(mob/user)
|
||||
if(user != wearer)
|
||||
return ..()
|
||||
@@ -432,11 +449,14 @@
|
||||
continue
|
||||
. += module_icons
|
||||
|
||||
/obj/item/mod/control/update_icon_state()
|
||||
icon_state = "[skin]-control[active ? "-sealed" : ""]"
|
||||
return ..()
|
||||
|
||||
/obj/item/mod/control/proc/set_wearer(mob/user)
|
||||
wearer = user
|
||||
SEND_SIGNAL(src, COMSIG_MOD_WEARER_SET, wearer)
|
||||
RegisterSignal(wearer, COMSIG_ATOM_EXITED, .proc/on_exit)
|
||||
RegisterSignal(src, COMSIG_ITEM_PRE_UNEQUIP, .proc/on_unequip)
|
||||
update_charge_alert()
|
||||
for(var/obj/item/mod/module/module as anything in modules)
|
||||
module.on_equip()
|
||||
@@ -445,18 +465,10 @@
|
||||
for(var/obj/item/mod/module/module as anything in modules)
|
||||
module.on_unequip()
|
||||
UnregisterSignal(wearer, list(COMSIG_ATOM_EXITED, COMSIG_PROCESS_BORGCHARGER_OCCUPANT))
|
||||
UnregisterSignal(src, COMSIG_ITEM_PRE_UNEQUIP)
|
||||
wearer.clear_alert(ALERT_MODSUIT_CHARGE)
|
||||
SEND_SIGNAL(src, COMSIG_MOD_WEARER_UNSET, wearer)
|
||||
wearer = null
|
||||
|
||||
/obj/item/mod/control/proc/on_unequip()
|
||||
SIGNAL_HANDLER
|
||||
|
||||
for(var/obj/item/part as anything in mod_parts)
|
||||
if(part.loc != src)
|
||||
return COMPONENT_ITEM_BLOCK_UNEQUIP
|
||||
|
||||
/obj/item/mod/control/proc/update_flags()
|
||||
var/list/used_skin = theme.skins[skin]
|
||||
for(var/obj/item/clothing/part as anything in mod_parts)
|
||||
|
||||
Reference in New Issue
Block a user