diff --git a/code/game/objects/structures.dm b/code/game/objects/structures.dm index 28a49acdbf8..8b0d5add1b7 100644 --- a/code/game/objects/structures.dm +++ b/code/game/objects/structures.dm @@ -5,7 +5,6 @@ var/climbable var/climb_delay = 3.5 SECONDS var/breakable - var/parts var/list/climbers = list() var/list/connections @@ -13,11 +12,6 @@ var/list/blend_objects = newlist() // Objects which to blend with var/list/noblend_objects = newlist() //Objects to avoid blending with (such as children of listed blend objects. -/obj/structure/Destroy() - if(parts) - new parts(loc) - . = ..() - /obj/structure/attack_hand(mob/user) if(breakable) if(HULK in user.mutations) diff --git a/code/game/world.dm b/code/game/world.dm index bdc374b70d2..25cc1edcb94 100644 --- a/code/game/world.dm +++ b/code/game/world.dm @@ -407,15 +407,17 @@ GLOBAL_LIST(topic_status_cache) // Things to do when a new z-level was just made. /world/proc/max_z_changed() - if(!istype(GLOB.players_by_zlevel, /list)) - GLOB.players_by_zlevel = new /list(world.maxz, 0) + assert_players_by_zlevel_list() + +/proc/assert_players_by_zlevel_list() + if(!islist(GLOB.players_by_zlevel)) + GLOB.players_by_zlevel = list() while(GLOB.players_by_zlevel.len < world.maxz) - GLOB.players_by_zlevel.len++ - GLOB.players_by_zlevel[GLOB.players_by_zlevel.len] = list() + GLOB.players_by_zlevel[++GLOB.players_by_zlevel.len] = list() // Call this to make a new blank z-level, don't modify maxz directly. /world/proc/increment_max_z() - maxz++ + . = ++maxz max_z_changed() //! LOG SHUNTER STUFF, LEAVE THIS ALONE diff --git a/code/modules/admin/verbs/smite_vr.dm b/code/modules/admin/verbs/smite_vr.dm index 85425bd77de..0f0a61fe4b4 100644 --- a/code/modules/admin/verbs/smite_vr.dm +++ b/code/modules/admin/verbs/smite_vr.dm @@ -145,7 +145,7 @@ var/redspace_abduction_z if(!redspace_abduction_z) redspace_abduction_z = -1 to_chat(user,"This is the first use of the verb this shift, it will take a minute to configure the abduction z-level. It will be z[world.maxz+1].") - var/z = ++world.maxz + var/z = world.increment_max_z() var/area/areaInstance = new /area/redspace_abduction(null) areaInstance.addSorted() for(var/x = 1 to world.maxx) diff --git a/code/modules/modular_computers/file_system/programs/engineering/rcon_console.dm b/code/modules/modular_computers/file_system/programs/engineering/rcon_console.dm index f0b9a2b565c..7c7f6bdfff2 100644 --- a/code/modules/modular_computers/file_system/programs/engineering/rcon_console.dm +++ b/code/modules/modular_computers/file_system/programs/engineering/rcon_console.dm @@ -13,6 +13,8 @@ usage_flags = PROGRAM_LAPTOP | PROGRAM_CONSOLE size = 19 +GLOBAL_LIST_EMPTY(rcon_nano_modules) + /datum/nano_module/rcon name = "Power RCON" var/list/known_SMESs = null @@ -22,6 +24,14 @@ var/hide_SMES_details = 0 var/hide_breakers = 0 +/datum/nano_module/rcon/New() + . = ..() + GLOB.rcon_nano_modules += src + +/datum/nano_module/rcon/Destroy() + . = ..() + GLOB.rcon_nano_modules -= src + /datum/nano_module/rcon/nano_ui_interact(mob/user, ui_key = "rcon", datum/nanoui/ui=null, force_open=1, var/datum/topic_state/state = default_state) FindDevices() // Update our devices list var/list/data = host.initial_data() diff --git a/code/modules/power/smes/smes.dm b/code/modules/power/smes/smes.dm index d0e45d53be8..e096ae810b3 100644 --- a/code/modules/power/smes/smes.dm +++ b/code/modules/power/smes/smes.dm @@ -97,7 +97,6 @@ GLOBAL_LIST_EMPTY(smeses) GLOB.smeses -= src return ..() - /obj/machinery/power/smes/disconnect_terminal() if(terminal) terminal.master = null diff --git a/code/modules/power/smes/smes_construction.dm b/code/modules/power/smes/smes_construction.dm index caa84d0d22f..ef58d0a8188 100644 --- a/code/modules/power/smes/smes_construction.dm +++ b/code/modules/power/smes/smes_construction.dm @@ -59,9 +59,8 @@ cur_coils = 3 /obj/machinery/power/smes/buildable/Destroy() - qdel(wires) - wires = null - for(var/datum/nano_module/rcon/R in world) + QDEL_NULL(wires) + for(var/datum/nano_module/rcon/R in GLOB.rcon_nano_modules) R.FindDevices() return ..()