stop stealing the furniture from my house

This commit is contained in:
Putnam3145
2022-09-28 12:41:56 -07:00
parent 17929ced89
commit 67f2dad1d7
13 changed files with 18 additions and 62 deletions
+4 -8
View File
@@ -152,6 +152,10 @@
#define ATMOS_PASS_PROC -1 //ask CanAtmosPass()
#define ATMOS_PASS_DENSITY -2 //just check density
// Adjacency flags
#define ATMOS_ADJACENT_ANY (1<<0)
#define ATMOS_ADJACENT_FIRELOCK (1<<1)
#define CANATMOSPASS(A, O) ( A.CanAtmosPass == ATMOS_PASS_PROC ? A.CanAtmosPass(O) : ( A.CanAtmosPass == ATMOS_PASS_DENSITY ? !A.density : A.CanAtmosPass ) )
#define CANVERTICALATMOSPASS(A, O) ( A.CanAtmosPassVertical == ATMOS_PASS_PROC ? A.CanAtmosPass(O, TRUE) : ( A.CanAtmosPassVertical == ATMOS_PASS_DENSITY ? !A.density : A.CanAtmosPassVertical ) )
@@ -323,14 +327,6 @@
#define QUANTIZE(variable) (round(variable,0.0000001))/*I feel the need to document what happens here. Basically this is used to catch most rounding errors, however it's previous value made it so that
once gases got hot enough, most procedures wouldnt occur due to the fact that the mole counts would get rounded away. Thus, we lowered it a few orders of magnititude */
#ifdef TESTING
GLOBAL_LIST_INIT(atmos_adjacent_savings, list(0,0))
#define CALCULATE_ADJACENT_TURFS(T) if (SSadjacent_air.queue[T]) { GLOB.atmos_adjacent_savings[1] += 1 } else { GLOB.atmos_adjacent_savings[2] += 1; SSadjacent_air.queue[T] = 1 }
#else
#define CALCULATE_ADJACENT_TURFS(T) SSadjacent_air.queue[T] = 1
#endif
//If you're doing spreading things related to atmos, DO NOT USE CANATMOSPASS, IT IS NOT CHEAP. use this instead, the info is cached after all. it's tweaked just a bit to allow for circular checks
#define TURFS_CAN_SHARE(T1, T2) (LAZYACCESS(T2.atmos_adjacent_turfs, T1) || LAZYLEN(T1.atmos_adjacent_turfs & T2.atmos_adjacent_turfs))
@@ -1,39 +0,0 @@
SUBSYSTEM_DEF(adjacent_air)
name = "Atmos Adjacency"
flags = SS_BACKGROUND
runlevels = RUNLEVEL_GAME | RUNLEVEL_POSTGAME
wait = 10
priority = FIRE_PRIORITY_ATMOS_ADJACENCY
var/list/queue = list()
/datum/controller/subsystem/adjacent_air/stat_entry(msg)
#ifdef TESTING
msg = "P:[length(queue)], S:[GLOB.atmos_adjacent_savings[1]], T:[GLOB.atmos_adjacent_savings[2]]"
#else
msg = "P:[length(queue)]"
#endif
return ..()
/datum/controller/subsystem/adjacent_air/Initialize()
while(length(queue))
fire(mc_check = FALSE)
return ..()
/datum/controller/subsystem/adjacent_air/fire(resumed = FALSE, mc_check = TRUE)
if(SSair.thread_running())
pause()
return
var/list/queue = src.queue
while (length(queue))
var/turf/currT = queue[1]
queue.Cut(1,2)
currT.ImmediateCalculateAdjacentTurfs()
if(mc_check)
if(MC_TICK_CHECK)
break
else
CHECK_TICK
+2
View File
@@ -34,6 +34,8 @@
/obj/machinery/door/firedoor/Initialize(mapload)
. = ..()
CalculateAffectingAreas()
UpdateAdjacencyFlags()
/obj/machinery/door/firedoor/examine(mob/user)
. = ..()
+2 -5
View File
@@ -15,7 +15,7 @@ GLOBAL_LIST_INIT(blacklisted_automated_baseturfs, typecacheof(list(
if(turf_type)
var/turf/newT = ChangeTurf(turf_type, baseturf_type, flags)
CALCULATE_ADJACENT_TURFS(newT)
newT.ImmediateCalculateAdjacentTurfs()
/turf/proc/copyTurf(turf/T)
if(T.type != type)
@@ -285,10 +285,7 @@ GLOBAL_LIST_INIT(blacklisted_automated_baseturfs, typecacheof(list(
//If you modify this function, ensure it works correctly with lateloaded map templates.
/turf/proc/AfterChange(flags) //called after a turf has been replaced in ChangeTurf()
levelupdate()
if(flags & CHANGETURF_RECALC_ADJACENT)
ImmediateCalculateAdjacentTurfs()
else
CALCULATE_ADJACENT_TURFS(src)
ImmediateCalculateAdjacentTurfs()
//update firedoor adjacency
var/list/turfs_to_check = get_adjacent_open_turfs(src) | src
+2 -2
View File
@@ -75,7 +75,7 @@ GLOBAL_LIST_EMPTY(station_turfs)
add_overlay(/obj/effect/fullbright)
if(requires_activation)
CALCULATE_ADJACENT_TURFS(src)
ImmediateCalculateAdjacentTurfs()
if (light_power && light_range)
update_light()
@@ -111,7 +111,7 @@ GLOBAL_LIST_EMPTY(station_turfs)
/turf/proc/set_temperature()
/turf/proc/Initalize_Atmos(times_fired)
CALCULATE_ADJACENT_TURFS(src)
ImmediateCalculateAdjacentTurfs()
/turf/Destroy(force)
. = QDEL_HINT_IWILLGC
@@ -40,16 +40,12 @@
return FALSE
/turf/proc/ImmediateCalculateAdjacentTurfs()
if(SSair.thread_running())
CALCULATE_ADJACENT_TURFS(src)
return
var/canpass = CANATMOSPASS(src, src)
var/canvpass = CANVERTICALATMOSPASS(src, src)
for(var/direction in GLOB.cardinals_multiz)
var/turf/T = get_step_multiz(src, direction)
if(!istype(T))
continue
var/opp_dir = REVERSE_DIR(direction)
if(isopenturf(T) && !(blocks_air || T.blocks_air) && ((direction & (UP|DOWN))? (canvpass && CANVERTICALATMOSPASS(T, src)) : (canpass && CANATMOSPASS(T, src))) )
LAZYINITLIST(atmos_adjacent_turfs)
LAZYINITLIST(T.atmos_adjacent_turfs)
@@ -280,7 +280,11 @@ we use a hook instead
parse_gas_string(model.initial_gas_mix)
return 1
/datum/gas_mixture/proc/__auxtools_parse_gas_string(gas_string)
/datum/gas_mixture/parse_gas_string(gas_string)
return __auxtools_parse_gas_string(gas_string)
/*
gas_string = SSair.preprocess_gas_string(gas_string)
var/list/gas = params2list(gas_string)
@@ -295,6 +299,7 @@ we use a hook instead
set_moles(id, text2num(gas[id]))
archive()
return 1
*/
/*
/datum/gas_mixture/react(datum/holder)
. = NO_REACTION
+1 -1
View File
@@ -138,7 +138,7 @@ GLOBAL_LIST_INIT(duplicate_forbidden_vars_by_type, typecacheof_assoc_list(list(
if(toupdate.len)
for(var/turf/T1 in toupdate)
CALCULATE_ADJACENT_TURFS(T1)
T1.ImmediateCalculateAdjacentTurfs()
return copiedobjs
@@ -952,7 +952,7 @@ GLOBAL_DATUM(main_supermatter_engine, /obj/machinery/power/supermatter_crystal)
playsound(T, 'sound/effects/supermatter.ogg', 50, 1)
T.visible_message("<span class='danger'>[T] smacks into [src] and rapidly flashes to ash.</span>",\
"<span class='italics'>You hear a loud crack as you are washed with a wave of heat.</span>")
CALCULATE_ADJACENT_TURFS(T)
T.ImmediateCalculateAdjacentTurfs()
//Do not blow up our internal radio
/obj/machinery/power/supermatter_crystal/contents_explosion(severity, target, origin)