From f62aaddb1de9f59e11a7b038fdfdbd37a132eb5a Mon Sep 17 00:00:00 2001 From: Ghommie <42542238+Ghommie@users.noreply.github.com> Date: Fri, 1 May 2020 23:22:23 +0200 Subject: [PATCH] Fixing some runtimes with kevinz skills and holodeck hotspots. --- code/datums/skills/_skill_holder.dm | 6 +++--- .../atmospherics/environmental/LINDA_fire.dm | 16 ++++++++++------ code/modules/holodeck/holo_effect.dm | 2 +- 3 files changed, 14 insertions(+), 10 deletions(-) diff --git a/code/datums/skills/_skill_holder.dm b/code/datums/skills/_skill_holder.dm index 352adc46ff..e16804ab7f 100644 --- a/code/datums/skills/_skill_holder.dm +++ b/code/datums/skills/_skill_holder.dm @@ -15,7 +15,7 @@ CRASH("Invalid get_skill_value call. Use typepaths.") //until a time when we somehow need text ids for dynamic skills, I'm enforcing this. if(!skills) return null - return skills[skill] + return LAZYACCESS(skills, skill) /** * Grabs our affinity for a skill. !!This is a multiplier!! @@ -25,7 +25,7 @@ CRASH("Invalid get_skill_affinity call. Use typepaths.") //until a time when we somehow need text ids for dynamic skills, I'm enforcing this. if(!skills) return 1 - var/affinity = skill_affinities[skill] + var/affinity = LAZYACCESS(skill_affinities, skill) if(isnull(affinity)) return 1 return affinity @@ -39,7 +39,7 @@ LAZYINITLIST(skills) value = sanitize_skill_value(skill, value) if(!isnull(value)) - skills[skill] = value + LAZYSET(skills, skill, value) return TRUE return FALSE diff --git a/code/modules/atmospherics/environmental/LINDA_fire.dm b/code/modules/atmospherics/environmental/LINDA_fire.dm index c47c4a44af..06d73867f8 100644 --- a/code/modules/atmospherics/environmental/LINDA_fire.dm +++ b/code/modules/atmospherics/environmental/LINDA_fire.dm @@ -9,7 +9,7 @@ return -/turf/open/hotspot_expose(exposed_temperature, exposed_volume, soh) +/turf/open/hotspot_expose(exposed_temperature, exposed_volume, soh = FALSE, holo = FALSE) var/datum/gas_mixture/air_contents = return_air() if(!air_contents) return 0 @@ -35,7 +35,7 @@ if(oxy < 0.5) return 0 - active_hotspot = new /obj/effect/hotspot(src) + active_hotspot = new /obj/effect/hotspot(src, holo) active_hotspot.temperature = exposed_temperature*50 active_hotspot.volume = exposed_volume*25 @@ -67,8 +67,10 @@ var/bypassing = FALSE var/visual_update_tick = 0 -/obj/effect/hotspot/Initialize() +/obj/effect/hotspot/Initialize(mapload, holo = FALSE) . = ..() + if(holo) + flags_1 |= HOLOGRAM_1 SSair.hotspots += src perform_exposure() setDir(pick(GLOB.cardinals)) @@ -192,7 +194,8 @@ if(bypassing) icon_state = "3" - location.burn_tile() + if(!(flags_1 & HOLOGRAM_1)) + location.burn_tile() //Possible spread due to radiated heat if(location.air.temperature > FIRE_MINIMUM_TEMPERATURE_TO_SPREAD) @@ -200,7 +203,7 @@ for(var/t in location.atmos_adjacent_turfs) var/turf/open/T = t if(!T.active_hotspot) - T.hotspot_expose(radiated_temperature, CELL_VOLUME/4) + T.hotspot_expose(radiated_temperature, CELL_VOLUME/4, flags_1 & HOLOGRAM_1) else if(volume > CELL_VOLUME*0.4) @@ -224,7 +227,8 @@ var/turf/open/T = loc if(istype(T) && T.active_hotspot == src) T.active_hotspot = null - DestroyTurf() + if(!(flags_1 & HOLOGRAM_1)) + DestroyTurf() return ..() /obj/effect/hotspot/proc/DestroyTurf() diff --git a/code/modules/holodeck/holo_effect.dm b/code/modules/holodeck/holo_effect.dm index 7c3754b616..09dcd7fa64 100644 --- a/code/modules/holodeck/holo_effect.dm +++ b/code/modules/holodeck/holo_effect.dm @@ -62,7 +62,7 @@ s.set_up(3, 1, T) s.start() T.temperature = 5000 - T.hotspot_expose(50000,50000,1) + T.hotspot_expose(50000, 50000, TRUE, TRUE)