Skip to content

Commit

Permalink
Merge pull request NebulaSS13#4542 from MistakeNot4892/atmosfix
Browse files Browse the repository at this point in the history
Prevents unsimulated turfs from accumulating CO2 or losing oxygen.
  • Loading branch information
out-of-phaze authored Oct 28, 2024
2 parents 7c18d3a + a2cfb0d commit cca47ba
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion code/modules/ZAS/Turf.dm
Original file line number Diff line number Diff line change
Expand Up @@ -226,6 +226,10 @@
/turf/return_air()
RETURN_TYPE(/datum/gas_mixture)

// TODO: immutable gas mixtures for stuff like this, to avoid creating new datums every time.
if(!simulated)
return make_air()

// ZAS participation
if(zone && !zone.invalid)
SSair.mark_zone_update(zone)
Expand Down Expand Up @@ -256,7 +260,7 @@
return FALSE

/turf/proc/make_air()
air = new/datum/gas_mixture
air = new /datum/gas_mixture
air.temperature = temperature
if(initial_gas)
air.gas = initial_gas.Copy()
Expand Down

0 comments on commit cca47ba

Please sign in to comment.