diff --git a/code/modules/integrated_electronics/core/assemblies.dm b/code/modules/integrated_electronics/core/assemblies.dm index 6218783b6e..e8a7a5dc89 100644 --- a/code/modules/integrated_electronics/core/assemblies.dm +++ b/code/modules/integrated_electronics/core/assemblies.dm @@ -349,14 +349,6 @@ return TRUE return FALSE -/obj/item/device/electronic_assembly/on_loc_moved(oldloc) - for(var/obj/O in contents) - O.on_loc_moved(oldloc) - -/obj/item/device/electronic_assembly/Moved(var/oldloc) - for(var/obj/O in contents) - O.on_loc_moved(oldloc) - /obj/item/device/electronic_assembly/proc/on_anchored() for(var/obj/item/integrated_circuit/IC in contents) IC.on_anchored() diff --git a/code/modules/integrated_electronics/core/assemblies/clothing.dm b/code/modules/integrated_electronics/core/assemblies/clothing.dm index d00057e411..23e84da6d6 100644 --- a/code/modules/integrated_electronics/core/assemblies/clothing.dm +++ b/code/modules/integrated_electronics/core/assemblies/clothing.dm @@ -67,18 +67,6 @@ else ..() -/obj/item/clothing/Moved(oldloc) - if(IC) - IC.on_loc_moved(oldloc) - else - ..() - -/obj/item/clothing/on_loc_moved(oldloc) - if(IC) - IC.on_loc_moved(oldloc) - else - ..() - // Does most of the repeatative setup. /obj/item/clothing/proc/setup_integrated_circuit(new_type) // Set up the internal circuit holder. diff --git a/code/modules/integrated_electronics/subtypes/output.dm b/code/modules/integrated_electronics/subtypes/output.dm index 5154804b05..110d237629 100644 --- a/code/modules/integrated_electronics/subtypes/output.dm +++ b/code/modules/integrated_electronics/subtypes/output.dm @@ -414,8 +414,13 @@ // var/datum/beam/holo_beam = null // A visual effect, to make it easy to know where a hologram is coming from. // It is commented out due to picking up the assembly killing the beam. +/obj/item/integrated_circuit/output/holographic_projector/Initialize() + . = ..() + GLOB.moved_event.register(src, src, .proc/on_moved) + /obj/item/integrated_circuit/output/holographic_projector/Destroy() destroy_hologram() + GLOB.moved_event.unregister(src, src, .proc/on_moved) return ..() /obj/item/integrated_circuit/output/holographic_projector/do_work() @@ -506,7 +511,7 @@ if(hologram) update_hologram() -/obj/item/integrated_circuit/output/holographic_projector/on_loc_moved(atom/oldloc) +/obj/item/integrated_circuit/output/holographic_projector/proc/on_moved() if(hologram) update_hologram_position() diff --git a/code/modules/mob/mob_movement.dm b/code/modules/mob/mob_movement.dm index 3d0f88e7a7..c76b7fcb4c 100644 --- a/code/modules/mob/mob_movement.dm +++ b/code/modules/mob/mob_movement.dm @@ -457,21 +457,6 @@ /mob/proc/update_gravity() return -// Called when a mob successfully moves. -// Would've been an /atom/movable proc but it caused issues. -/mob/Moved(atom/oldloc) - . = ..() - for(var/obj/O in contents) - O.on_loc_moved(oldloc) - -// Received from Moved(), useful for items that need to know that their loc just moved. -/obj/proc/on_loc_moved(atom/oldloc) - return - -/obj/item/weapon/storage/on_loc_moved(atom/oldloc) - for(var/obj/O in contents) - O.on_loc_moved(oldloc) - /client/verb/moveup() set name = ".moveup" set instant = 1 diff --git a/code/modules/shieldgen/directional_shield.dm b/code/modules/shieldgen/directional_shield.dm index 818b78a21e..26963a1227 100644 --- a/code/modules/shieldgen/directional_shield.dm +++ b/code/modules/shieldgen/directional_shield.dm @@ -97,17 +97,22 @@ var/high_color = "#0099FF" // Color the shield will be when at max health. A light blue. var/low_color = "#FF0000" // Color the shield will drift towards as health is lowered. Deep red. -/obj/item/shield_projector/New() +/obj/item/shield_projector/Initialize() START_PROCESSING(SSobj, src) if(always_on) create_shields() + GLOB.moved_event.register(src, src, .proc/moved_event) ..() /obj/item/shield_projector/Destroy() destroy_shields() STOP_PROCESSING(SSobj, src) + GLOB.moved_event.unregister(src, src, .proc/moved_event) return ..() +/obj/item/shield_projector/proc/moved_event() + update_shield_positions() + /obj/item/shield_projector/proc/create_shield(var/newloc, var/new_dir) var/obj/effect/directional_shield/S = new(newloc, src) S.dir = new_dir @@ -210,14 +215,6 @@ /obj/item/shield_projector/emp_act(var/severity) adjust_health(-max_shield_health / severity) // A strong EMP will kill the shield instantly, but weaker ones won't on the first hit. -/obj/item/shield_projector/Move(var/newloc, var/direct) - ..(newloc, direct) - update_shield_positions() - -/obj/item/shield_projector/on_loc_moved(atom/oldloc) - update_shield_positions() - - // Subtypes /obj/item/shield_projector/rectangle