mirror of
https://github.com/yogstation13/Yogstation.git
synced 2025-02-26 09:04:50 +00:00
Update auxmos to fix bugs
This commit is contained in:
BIN
auxmos.dll
BIN
auxmos.dll
Binary file not shown.
BIN
auxmos.pdb
BIN
auxmos.pdb
Binary file not shown.
@@ -473,13 +473,6 @@
|
||||
T.pixel_x = (PipingLayer - PIPING_LAYER_DEFAULT) * PIPING_LAYER_P_X;\
|
||||
T.pixel_y = (PipingLayer - PIPING_LAYER_DEFAULT) * PIPING_LAYER_P_Y;
|
||||
|
||||
#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
|
||||
|
||||
GLOBAL_LIST_INIT(pipe_paint_colors, list(
|
||||
"amethyst" = rgb(130,43,255), //supplymain
|
||||
"blue" = rgb(0,0,255),
|
||||
|
||||
@@ -1,54 +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()
|
||||
var/list/disable_queue = list()
|
||||
|
||||
/datum/controller/subsystem/adjacent_air/stat_entry()
|
||||
#ifdef TESTING
|
||||
. = ..("P:[length(queue)], S:[GLOB.atmos_adjacent_savings[1]], T:[GLOB.atmos_adjacent_savings[2]]")
|
||||
#else
|
||||
. = ..("P:[length(queue)]")
|
||||
#endif
|
||||
|
||||
/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/disable_queue = src.disable_queue
|
||||
|
||||
while (length(disable_queue))
|
||||
var/turf/terf = disable_queue[1]
|
||||
var/arg = disable_queue[terf]
|
||||
disable_queue.Cut(1,2)
|
||||
|
||||
terf.ImmediateDisableAdjacency(arg)
|
||||
|
||||
if(mc_check)
|
||||
if(MC_TICK_CHECK)
|
||||
return
|
||||
else
|
||||
CHECK_TICK
|
||||
|
||||
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
|
||||
@@ -428,18 +428,10 @@ SUBSYSTEM_DEF(air)
|
||||
map_loading = FALSE
|
||||
|
||||
/datum/controller/subsystem/air/proc/pause_z(z_level)
|
||||
LAZYADD(paused_z_levels, z_level)
|
||||
var/list/turfs_to_disable = block(locate(1, 1, z_level), locate(world.maxx, world.maxy, z_level))
|
||||
for(var/turf/T as anything in turfs_to_disable)
|
||||
T.ImmediateDisableAdjacency(FALSE)
|
||||
CHECK_TICK
|
||||
can_fire = FALSE
|
||||
|
||||
/datum/controller/subsystem/air/proc/unpause_z(z_level)
|
||||
var/list/turfs_to_reinit = block(locate(1, 1, z_level), locate(world.maxx, world.maxy, z_level))
|
||||
for(var/turf/T as anything in turfs_to_reinit)
|
||||
T.Initalize_Atmos()
|
||||
CHECK_TICK
|
||||
LAZYREMOVE(paused_z_levels, z_level)
|
||||
can_fire = TRUE
|
||||
|
||||
/datum/controller/subsystem/air/proc/setup_allturfs()
|
||||
var/list/turfs_to_init = block(locate(1, 1, 1), locate(world.maxx, world.maxy, world.maxz))
|
||||
|
||||
@@ -511,7 +511,6 @@
|
||||
T.visible_message(span_danger("[T] smacks into [src] and rapidly flashes to ash."),\
|
||||
span_italics("You hear a loud crack as you are washed with a wave of heat."))
|
||||
shard.Consume()
|
||||
CALCULATE_ADJACENT_TURFS(T)
|
||||
|
||||
/obj/item/melee/supermatter_sword/add_blood_DNA(list/blood_dna)
|
||||
return FALSE
|
||||
|
||||
@@ -14,8 +14,7 @@ GLOBAL_LIST_INIT(blacklisted_automated_baseturfs, typecacheof(list(
|
||||
qdel(thing, force=TRUE)
|
||||
|
||||
if(turf_type)
|
||||
var/turf/newT = ChangeTurf(turf_type, baseturf_type, flags)
|
||||
CALCULATE_ADJACENT_TURFS(newT)
|
||||
ChangeTurf(turf_type, baseturf_type, flags)
|
||||
|
||||
/turf/proc/copyTurf(turf/T, copy_air, flags)
|
||||
if(T.type != type)
|
||||
@@ -286,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
|
||||
|
||||
@@ -66,7 +66,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()
|
||||
@@ -95,12 +95,14 @@ GLOBAL_LIST_EMPTY(station_turfs)
|
||||
|
||||
/turf/proc/__auxtools_update_turf_temp_info()
|
||||
|
||||
/turf/proc/__auxtools_update_turf_infos(immediate)
|
||||
|
||||
/turf/return_temperature()
|
||||
|
||||
/turf/proc/set_temperature()
|
||||
|
||||
/turf/proc/Initalize_Atmos(times_fired)
|
||||
CALCULATE_ADJACENT_TURFS(src)
|
||||
ImmediateCalculateAdjacentTurfs()
|
||||
|
||||
/turf/Destroy(force)
|
||||
. = QDEL_HINT_IWILLGC
|
||||
|
||||
@@ -40,9 +40,6 @@
|
||||
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)
|
||||
@@ -61,28 +58,10 @@
|
||||
if (T.atmos_adjacent_turfs)
|
||||
T.atmos_adjacent_turfs -= src
|
||||
UNSETEMPTY(T.atmos_adjacent_turfs)
|
||||
T.set_sleeping(T.blocks_air)
|
||||
T.__update_auxtools_turf_adjacency_info(isspaceturf(T.get_z_base_turf()), -1)
|
||||
T.__auxtools_update_turf_infos(FALSE)
|
||||
UNSETEMPTY(atmos_adjacent_turfs)
|
||||
src.atmos_adjacent_turfs = atmos_adjacent_turfs
|
||||
set_sleeping(blocks_air)
|
||||
__update_auxtools_turf_adjacency_info(isspaceturf(get_z_base_turf()))
|
||||
|
||||
/turf/proc/ImmediateDisableAdjacency(disable_adjacent = TRUE)
|
||||
if(SSair.thread_running())
|
||||
SSadjacent_air.disable_queue[src] = disable_adjacent
|
||||
return
|
||||
if(disable_adjacent)
|
||||
for(var/direction in GLOB.cardinals_multiz)
|
||||
var/turf/T = get_step_multiz(src, direction)
|
||||
if(!istype(T))
|
||||
continue
|
||||
if (T.atmos_adjacent_turfs)
|
||||
T.atmos_adjacent_turfs -= src
|
||||
UNSETEMPTY(T.atmos_adjacent_turfs)
|
||||
T.__update_auxtools_turf_adjacency_info(isspaceturf(T.get_z_base_turf()), -1)
|
||||
LAZYCLEARLIST(atmos_adjacent_turfs)
|
||||
__update_auxtools_turf_adjacency_info(isspaceturf(get_z_base_turf()))
|
||||
__auxtools_update_turf_infos(FALSE)
|
||||
|
||||
/turf/proc/set_sleeping(should_sleep)
|
||||
|
||||
|
||||
@@ -133,7 +133,6 @@ GLOBAL_LIST_INIT(duplicate_forbidden_vars,list(
|
||||
|
||||
if(toupdate.len)
|
||||
for(var/turf/T1 in toupdate)
|
||||
CALCULATE_ADJACENT_TURFS(T1)
|
||||
|
||||
T1.ImmediateCalculateAdjacentTurfs()
|
||||
|
||||
return copiedobjs
|
||||
|
||||
BIN
libauxmos.so
BIN
libauxmos.so
Binary file not shown.
@@ -264,7 +264,6 @@
|
||||
#include "code\controllers\configuration\entries\resources.dm"
|
||||
#include "code\controllers\subsystem\achievements.dm"
|
||||
#include "code\controllers\subsystem\acid.dm"
|
||||
#include "code\controllers\subsystem\adjacent_air.dm"
|
||||
#include "code\controllers\subsystem\air.dm"
|
||||
#include "code\controllers\subsystem\assets.dm"
|
||||
#include "code\controllers\subsystem\atoms.dm"
|
||||
|
||||
Reference in New Issue
Block a user