mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-28 23:58:07 +01:00
@@ -247,8 +247,9 @@
|
||||
|
||||
/obj/item/mod/control/dropped(mob/user)
|
||||
. = ..()
|
||||
if(wearer)
|
||||
unset_wearer()
|
||||
if(!wearer)
|
||||
return
|
||||
clean_up()
|
||||
|
||||
/obj/item/mod/control/item_action_slot_check(slot)
|
||||
if(slot == slot_flags)
|
||||
@@ -258,20 +259,7 @@
|
||||
. = ..()
|
||||
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)
|
||||
retract(null, part)
|
||||
if(active)
|
||||
finish_activation(on = FALSE)
|
||||
unset_wearer()
|
||||
var/mob/old_wearer = old_loc
|
||||
old_wearer.temporarilyRemoveItemFromInventory(src)
|
||||
clean_up()
|
||||
|
||||
/obj/item/mod/control/allow_attack_hand_drop(mob/user)
|
||||
if(user != wearer)
|
||||
@@ -482,6 +470,22 @@
|
||||
SEND_SIGNAL(src, COMSIG_MOD_WEARER_UNSET, wearer)
|
||||
wearer = null
|
||||
|
||||
/obj/item/mod/control/proc/clean_up()
|
||||
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)
|
||||
retract(null, part)
|
||||
if(active)
|
||||
finish_activation(on = FALSE)
|
||||
var/mob/old_wearer = wearer
|
||||
unset_wearer()
|
||||
old_wearer.temporarilyRemoveItemFromInventory(src)
|
||||
|
||||
/obj/item/mod/control/proc/on_species_gain(datum/source, datum/species/new_species, datum/species/old_species)
|
||||
SIGNAL_HANDLER
|
||||
|
||||
@@ -706,7 +710,7 @@
|
||||
return
|
||||
atom_destruction(damage_flag)
|
||||
|
||||
/obj/item/mod/control/proc/on_part_deletion(obj/item/part)
|
||||
/obj/item/mod/control/proc/on_part_deletion(obj/item/part) //the part doesnt count as being qdeleted, so our destroying does an infinite loop, fix later
|
||||
SIGNAL_HANDLER
|
||||
|
||||
if(QDELETED(src))
|
||||
|
||||
@@ -373,7 +373,7 @@
|
||||
/obj/item/mod/module/stealth/ninja,
|
||||
/obj/item/mod/module/quick_carry/advanced,
|
||||
/obj/item/mod/module/magboot/advanced,
|
||||
/obj/item/mod/module/jetpack,
|
||||
/obj/item/mod/module/jetpack/advanced,
|
||||
/obj/item/mod/module/anomaly_locked/kinesis/plus,
|
||||
)
|
||||
|
||||
|
||||
@@ -138,6 +138,8 @@
|
||||
COOLDOWN_START(src, hit_cooldown, hit_cooldown_time)
|
||||
|
||||
/obj/item/mod/module/anomaly_locked/kinesis/proc/can_grab(atom/target)
|
||||
if(mod.wearer == target)
|
||||
return FALSE
|
||||
if(!ismovable(target))
|
||||
return FALSE
|
||||
if(iseffect(target))
|
||||
|
||||
@@ -25,6 +25,7 @@
|
||||
var/datum/storage/modstorage = mod.create_storage(max_specific_storage = max_w_class, max_total_storage = max_combined_w_class, max_slots = max_items)
|
||||
modstorage.set_real_location(src)
|
||||
atom_storage.locked = FALSE
|
||||
RegisterSignal(mod.chestplate, COMSIG_ITEM_PRE_UNEQUIP, .proc/on_chestplate_unequip)
|
||||
|
||||
/obj/item/mod/module/storage/on_uninstall(deleting = FALSE)
|
||||
var/datum/storage/modstorage = mod.atom_storage
|
||||
@@ -38,7 +39,8 @@
|
||||
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."))
|
||||
atom_storage?.attempt_insert(mod.wearer.s_store, mod.wearer, override = TRUE)
|
||||
if(atom_storage?.attempt_insert(mod.wearer.s_store, mod.wearer, override = TRUE))
|
||||
mod.wearer.temporarilyRemoveItemFromInventory(mod.wearer.s_store)
|
||||
|
||||
/obj/item/mod/module/storage/large_capacity
|
||||
name = "MOD expanded storage module"
|
||||
|
||||
Reference in New Issue
Block a user