auxtools atmos works now

This commit is contained in:
Putnam
2020-10-31 02:55:31 -07:00
parent 46c4c347f9
commit 90e3be2a12
7 changed files with 11 additions and 15 deletions
BIN
View File
Binary file not shown.
BIN
View File
Binary file not shown.
+6 -9
View File
@@ -6,7 +6,9 @@ SUBSYSTEM_DEF(air)
flags = SS_BACKGROUND
runlevels = RUNLEVEL_GAME | RUNLEVEL_POSTGAME
var/cost_copy_from = 0
var/cost_turfs = 0
var/cost_copy_to = 0
var/cost_groups = 0
var/cost_highpressure = 0
var/cost_hotspots = 0
@@ -44,25 +46,20 @@ SUBSYSTEM_DEF(air)
/datum/controller/subsystem/air/stat_entry(msg)
msg += "C:{"
msg += "EQ:[round(cost_equalize,1)]|"
msg += "CF:[round(cost_copy_from,1)]|"
msg += "AT:[round(cost_turfs,1)]|"
msg += "EG:[round(cost_groups,1)]|"
msg += "CT:[round(cost_copy_to,1)]|"
msg += "HP:[round(cost_highpressure,1)]|"
msg += "HS:[round(cost_hotspots,1)]|"
msg += "SC:[round(cost_superconductivity,1)]|"
msg += "PN:[round(cost_pipenets,1)]|"
msg += "AM:[round(cost_atmos_machinery,1)]"
msg += "} "
var/active_turfs_len = get_amt_active_turfs()
msg += "AT:[active_turfs_len]|"
msg += "EG:[get_amt_excited_groups()]|"
msg += "HS:[hotspots.len]|"
msg += "PN:[networks.len]|"
msg += "HP:[high_pressure_delta.len]|"
msg += "AS:[active_super_conductivity.len]|"
msg += "GA:[get_amt_gas_mixes()]|"
msg += "MG:[get_max_gas_mixes()]|"
msg += "AT/MS:[round((cost ? active_turfs_len/cost : 0),0.1)]"
return ..()
/datum/controller/subsystem/air/Initialize(timeofday)
@@ -123,11 +120,11 @@ SUBSYSTEM_DEF(air)
timer = TICK_USAGE_REAL
process_turfs(resumed)
cost_turfs = MC_AVERAGE(cost_turfs, TICK_DELTA_TO_MS(TICK_USAGE_REAL - timer))
resumed = 0
currentpart = SSAIR_HIGHPRESSURE
MC_TICK_CHECK
if(state != SS_RUNNING)
return
resumed = 0
currentpart = SSAIR_HIGHPRESSURE
if(currentpart == SSAIR_EXCITEDGROUPS)
timer = TICK_USAGE_REAL
+1 -1
View File
@@ -148,7 +148,7 @@ GLOBAL_LIST_INIT(blacklisted_automated_baseturfs, typecacheof(list(
. = ..()
if (!.) // changeturf failed or didn't do anything
QDEL_NULL(stashed_air)
update_air_ref(TRUE)
update_air_ref(planetary_atmos ? 1 : 2)
return
var/turf/open/newTurf = .
newTurf.air.copy_from(stashed_air)
+1 -1
View File
@@ -27,7 +27,7 @@
/turf/open/space/Initialize()
icon_state = SPACE_ICON_STATE
air = space_gas
update_air_ref(FALSE)
update_air_ref(0)
vis_contents.Cut() //removes inherited overlays
visibilityChanged()
@@ -38,7 +38,7 @@
if(!blocks_air)
air = new(2500,src)
air.copy_from_turf(src)
update_air_ref(!planetary_atmos)
update_air_ref(planetary_atmos ? 1 : 2)
. = ..()
/turf/open/Destroy()
@@ -121,7 +121,7 @@
if (nonoverlaying_gases[id])
continue
var/gas_overlay = GLOB.meta_gas_overlays[id]
if(gas_overlay && air.get_moles(id) > GLOB.meta_gas_visibility[META_GAS_MOLES_VISIBLE])
if(gas_overlay && air.get_moles(id) > GLOB.meta_gas_visibility[id])
new_overlay_types += gas_overlay[min(FACTOR_GAS_VISIBLE_MAX, CEILING(air.get_moles(id) / MOLES_GAS_VISIBLE_STEP, 1))]
if (atmos_overlay_types)
@@ -112,10 +112,9 @@ GLOBAL_LIST_INIT(auxtools_atmos_initialized,FALSE)
message_admins("[key_name(usr)] modified gas mixture [REF(src)]: Changed volume to [volume].")
set_volume(volume)
/*
/datum/gas_mixture/Del()
__gasmixture_unregister()
. = ..()*/
. = ..()
/datum/gas_mixture/proc/__gasmixture_unregister()
/datum/gas_mixture/proc/__gasmixture_register()