From c2d1a169545f11ad9f26013c14871978e1cc61c0 Mon Sep 17 00:00:00 2001 From: Emmett Gaines Date: Sat, 11 Nov 2017 06:34:56 -0500 Subject: [PATCH 1/2] Fixes some cases where changeturf were called incorrectly (#32584) --- code/game/machinery/doors/airlock.dm | 13 +++++++++---- code/modules/mapping/map_template.dm | 2 +- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/code/game/machinery/doors/airlock.dm b/code/game/machinery/doors/airlock.dm index aac80cc1a0..5515469e5c 100644 --- a/code/game/machinery/doors/airlock.dm +++ b/code/game/machinery/doors/airlock.dm @@ -118,6 +118,15 @@ max_integrity = normal_integrity if(damage_deflection == AIRLOCK_DAMAGE_DEFLECTION_N && security_level > AIRLOCK_SECURITY_METAL) damage_deflection = AIRLOCK_DAMAGE_DEFLECTION_R + prepare_huds() + var/datum/atom_hud/data/diagnostic/diag_hud = GLOB.huds[DATA_HUD_DIAGNOSTIC] + diag_hud.add_to_hud(src) + diag_hud_set_electrified() + + return INITIALIZE_HINT_LATELOAD + +/obj/machinery/door/airlock/LateInitialize() + . = ..() if(abandoned) var/outcome = rand(1,100) switch(outcome) @@ -136,10 +145,6 @@ welded = TRUE if(24 to 30) panel_open = TRUE - prepare_huds() - var/datum/atom_hud/data/diagnostic/diag_hud = GLOB.huds[DATA_HUD_DIAGNOSTIC] - diag_hud.add_to_hud(src) - diag_hud_set_electrified() update_icon() diff --git a/code/modules/mapping/map_template.dm b/code/modules/mapping/map_template.dm index 382237e5c3..910cc6fe60 100644 --- a/code/modules/mapping/map_template.dm +++ b/code/modules/mapping/map_template.dm @@ -74,7 +74,7 @@ if(T.y+height > world.maxy) return - var/list/bounds = maploader.load_map(file(mappath), T.x, T.y, T.z, cropMap=TRUE) + var/list/bounds = maploader.load_map(file(mappath), T.x, T.y, T.z, cropMap=TRUE, no_changeturf=(SSatoms.initialized == INITIALIZATION_INSSATOMS)) if(!bounds) return