Fixing some runtimes with kevinz skills and holodeck hotspots.

This commit is contained in:
Ghommie
2020-05-01 23:22:23 +02:00
parent 2f236ffc04
commit f62aaddb1d
3 changed files with 14 additions and 10 deletions

View File

@@ -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

View File

@@ -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()

View File

@@ -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)