Skip to content

Commit

Permalink
update auxmos to 2.2.2 and byond to 514.1589 (#2308)
Browse files Browse the repository at this point in the history
Co-authored-by: covertcorvid <[email protected]>
  • Loading branch information
red031000 and covertcorvid authored Apr 9, 2023
1 parent 3cdf298 commit 6b358aa
Show file tree
Hide file tree
Showing 20 changed files with 74 additions and 101 deletions.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# syntax=docker/dockerfile:1
FROM beestation/byond:514.1583 as base
FROM beestation/byond:514.1589 as base

# Install the tools needed to compile our rust dependencies
FROM base as rust-build
Expand Down
Binary file modified auxtools/auxmos.dll
Binary file not shown.
10 changes: 3 additions & 7 deletions code/__DEFINES/atmospherics.dm
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,9 @@
#define ATMOS_PASS_PROC -1 //ask CanAtmosPass()
#define ATMOS_PASS_DENSITY -2 //just check density

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

Expand Down Expand Up @@ -303,13 +306,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, sortList(list(
"amethyst" = rgb(130,43,255), //supplymain
"blue" = rgb(0,0,255),
Expand Down
4 changes: 2 additions & 2 deletions code/_compile_options.dm
Original file line number Diff line number Diff line change
Expand Up @@ -77,9 +77,9 @@

//Update this whenever the byond version is stable so people stop updating to hilariously broken versions
#define MAX_COMPILER_VERSION 514
#define MAX_COMPILER_BUILD 1584
#define MAX_COMPILER_BUILD 1589
#if DM_VERSION > MAX_COMPILER_VERSION || DM_BUILD > MAX_COMPILER_BUILD
#warn WARNING: Your BYOND version is over the recommended version (514.1584)! Stability is not guaranteed.
#warn WARNING: Your BYOND version is over the recommended version (514.1589)! Stability is not guaranteed.
#endif
//Log the full sendmaps profile on 514.1556+, any earlier and we get bugs or it not existing
#if DM_VERSION >= 514 && DM_BUILD >= 1556
Expand Down
54 changes: 0 additions & 54 deletions code/controllers/subsystem/adjacent_air.dm

This file was deleted.

5 changes: 4 additions & 1 deletion code/controllers/subsystem/air.dm
Original file line number Diff line number Diff line change
Expand Up @@ -346,7 +346,10 @@ SUBSYSTEM_DEF(air)
var/datum/callback/cb = cur_op[3]
cb.Invoke(air1, air2)
else
air1.transfer_ratio_to(air2, cur_op[3])
if(cur_op[3] == 0)
air1.transfer_to(air2, air1.total_moles())
else
air1.transfer_ratio_to(air2, cur_op[3])
if(MC_TICK_CHECK)
return

Expand Down
19 changes: 19 additions & 0 deletions code/game/machinery/doors/firedoor.dm
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
/obj/machinery/door/firedoor/Initialize(mapload)
. = ..()
CalculateAffectingAreas()
UpdateAdjacencyFlags()

/obj/machinery/door/firedoor/examine(mob/user)
. = ..()
Expand All @@ -58,6 +59,24 @@
var/area/A = I
LAZYADD(A.firedoors, src)

/obj/machinery/door/firedoor/proc/UpdateAdjacencyFlags()
var/turf/T = get_turf(src)
if(flags_1 & ON_BORDER_1)
for(var/t in T.atmos_adjacent_turfs)
if(get_dir(loc, t) == dir)
var/turf/open/T2 = t
if(T2 in T.atmos_adjacent_turfs)
T.atmos_adjacent_turfs[T2] |= ATMOS_ADJACENT_FIRELOCK
if(T in T2.atmos_adjacent_turfs)
T2.atmos_adjacent_turfs[T] |= ATMOS_ADJACENT_FIRELOCK
else
for(var/t in T.atmos_adjacent_turfs)
var/turf/open/T2 = t
if(T2 in T.atmos_adjacent_turfs)
T.atmos_adjacent_turfs[T2] |= ATMOS_ADJACENT_FIRELOCK
if(T in T2.atmos_adjacent_turfs)
T2.atmos_adjacent_turfs[T] |= ATMOS_ADJACENT_FIRELOCK

/obj/machinery/door/firedoor/closed
icon_state = "door_closed"
opacity = TRUE
Expand Down
2 changes: 1 addition & 1 deletion code/game/objects/items/melee/misc.dm
Original file line number Diff line number Diff line change
Expand Up @@ -661,7 +661,7 @@
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>")
shard.Consume()
CALCULATE_ADJACENT_TURFS(T)
T.ImmediateCalculateAdjacentTurfs()

/obj/item/melee/supermatter_sword/add_blood_DNA(list/blood_dna)
return FALSE
Expand Down
18 changes: 8 additions & 10 deletions code/game/turfs/change_turf.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -160,17 +160,18 @@ GLOBAL_LIST_INIT(blacklisted_automated_baseturfs, typecacheof(list(
return
var/turf/open/newTurf = .
newTurf.air.copy_from(stashed_air)
update_air_ref(planetary_atmos ? 1 : 2)
newTurf.update_air_ref(planetary_atmos ? 1 : 2)
QDEL_NULL(stashed_air)
else
flags |= CHANGETURF_RECALC_ADJACENT
if(ispath(path,/turf/closed))
flags |= CHANGETURF_RECALC_ADJACENT
update_air_ref(-1)
. = ..()
var/turf/open/newTurf = .
newTurf.update_air_ref(-1)
else
. = ..()
if(!istype(air,/datum/gas_mixture))
Initalize_Atmos(0)
var/turf/open/newTurf = .
newTurf.Initalize_Atmos(0)

/turf/closed/ChangeTurf(path, list/new_baseturfs, flags)
if(ispath(path,/turf/open))
Expand Down Expand Up @@ -298,10 +299,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
Expand Down
9 changes: 4 additions & 5 deletions code/game/turfs/open/_open.dm
Original file line number Diff line number Diff line change
Expand Up @@ -149,11 +149,10 @@
baseturfs = /turf/open/indestructible/airblock

/turf/open/Initalize_Atmos(times_fired)
if(!blocks_air)
if(!istype(air,/datum/gas_mixture/turf))
air = new(2500,src)
air.copy_from_turf(src)
update_air_ref(planetary_atmos ? 1 : 2)
if(!istype(air,/datum/gas_mixture/turf))
air = new(2500,src)
air.copy_from_turf(src)
update_air_ref(planetary_atmos ? 1 : 2)

update_visuals()

Expand Down
4 changes: 2 additions & 2 deletions code/game/turfs/turf.dm
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ GLOBAL_LIST_EMPTY(created_baseturf_lists)
add_overlay(/obj/effect/fullbright)

if(requires_activation)
CALCULATE_ADJACENT_TURFS(src)
ImmediateCalculateAdjacentTurfs()

if(color)
add_atom_colour(color, FIXED_COLOUR_PRIORITY)
Expand Down Expand Up @@ -124,7 +124,7 @@ GLOBAL_LIST_EMPTY(created_baseturf_lists)
/turf/proc/set_temperature()

/turf/proc/Initalize_Atmos(times_fired)
CALCULATE_ADJACENT_TURFS(src)
ImmediateCalculateAdjacentTurfs()

/turf/Destroy(force)
. = QDEL_HINT_IWILLGC
Expand Down
17 changes: 8 additions & 9 deletions code/modules/atmospherics/environmental/LINDA_system.dm
Original file line number Diff line number Diff line change
Expand Up @@ -40,21 +40,17 @@
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)
atmos_adjacent_turfs[T] = direction
T.atmos_adjacent_turfs[src] = opp_dir
atmos_adjacent_turfs[T] = ATMOS_ADJACENT_ANY
T.atmos_adjacent_turfs[src] = ATMOS_ADJACENT_ANY
else
if (atmos_adjacent_turfs)
atmos_adjacent_turfs -= T
Expand All @@ -66,12 +62,15 @@
UNSETEMPTY(atmos_adjacent_turfs)
src.atmos_adjacent_turfs = atmos_adjacent_turfs
set_sleeping(blocks_air)
for(var/t in atmos_adjacent_turfs)
var/turf/open/T = t
for(var/obj/machinery/door/firedoor/FD in T)
FD.UpdateAdjacencyFlags()
for(var/obj/machinery/door/firedoor/FD in src)
FD.UpdateAdjacencyFlags()
__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)
Expand Down
12 changes: 10 additions & 2 deletions code/modules/atmospherics/environmental/LINDA_turf_tile.dm
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,11 @@
if(!giver)
return FALSE
if(SSair.thread_running())
SSair.deferred_airs += list(list(giver, air, moles / giver.total_moles()))
var giver_moles = giver.total_moles()
if(giver_moles > 0)
SSair.deferred_airs += list(list(giver, air, moles / giver_moles))
else
SSair.deferred_airs += list(list(giver, air, 0))
else
giver.transfer_to(air, moles)
update_visuals()
Expand All @@ -70,7 +74,11 @@
if(!taker || !return_air()) // shouldn't transfer from space
return FALSE
if(SSair.thread_running())
SSair.deferred_airs += list(list(air, taker, moles / air.total_moles()))
var air_moles = air.total_moles()
if(air_moles > 0)
SSair.deferred_airs += list(list(air, taker, moles / air_moles))
else
SSair.deferred_airs += list(list(air, taker, 0))
else
air.transfer_to(taker, moles)
update_visuals()
Expand Down
6 changes: 5 additions & 1 deletion code/modules/atmospherics/gasmixtures/gas_mixture.dm
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,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)
/*
var/list/gas = params2list(gas_string)
if(gas["TEMP"])
var/temp = text2num(gas["TEMP"])
Expand All @@ -279,7 +283,7 @@ we use a hook instead
clear()
for(var/id in gas)
set_moles(id, text2num(gas[id]))
return 1
*/

/datum/gas_mixture/proc/set_analyzer_results(instability)
if(!analyzer_results)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,8 @@
air_update_turf()

var/datum/pipeline/parent1 = parents[1]
if(!parent1)
return
parent1.update = PIPENET_UPDATE_STATUS_RECONCILE_NEEDED

else //external -> output
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
else
var/turf/open/OT = T
environment_temperature = OT.GetTemperature()
else
else if(T != null)
environment_temperature = T.return_temperature()

if(pipe_air != null)
Expand Down
2 changes: 1 addition & 1 deletion code/modules/client/client_procs.dm
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@


#define UPLOAD_LIMIT 10485760 //Restricts client uploads to the server to 1MB //Could probably do with being lower.
#define MAX_RECOMMENDED_CLIENT 1583
#define MAX_RECOMMENDED_CLIENT 1589

GLOBAL_LIST_INIT(blacklisted_builds, list(
"1407" = "bug preventing client display overrides from working leads to clients being able to see things/mobs they shouldn't be able to see",
Expand Down
2 changes: 1 addition & 1 deletion code/modules/holodeck/area_copy.dm
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,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
4 changes: 2 additions & 2 deletions dependencies.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

# byond version
export BYOND_MAJOR=514
export BYOND_MINOR=1583
export BYOND_MINOR=1589

#rust version
export RUST_VERSION=1.54.0
Expand All @@ -21,7 +21,7 @@ export NODE_VERSION_PRECISE=12.22.4
export SPACEMAN_DMM_VERSION=suite-1.7.1

#auxmos version
export AUXMOS_VERSION=1.1.2
export AUXMOS_VERSION=2.2.2

# Python version for mapmerge and other tools
export PYTHON_VERSION=3.9.10
1 change: 0 additions & 1 deletion nsv13.dme
Original file line number Diff line number Diff line change
Expand Up @@ -330,7 +330,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\ambience.dm"
#include "code\controllers\subsystem\assets.dm"
Expand Down

0 comments on commit 6b358aa

Please sign in to comment.