From a71d2aca24aabc978ce528f61899f2e6d78a1b02 Mon Sep 17 00:00:00 2001 From: SkyratBot <59378654+SkyratBot@users.noreply.github.com> Date: Fri, 11 Dec 2020 10:37:34 +0100 Subject: [PATCH] [MIRROR] Planetary Atmos Changes (#2135) * Planetary Atmos Changes (#55398) This PR sets several Icebox turfs to be planetary atmos turfs, such as the openspace, to return the gas mix to a standard, and reduce the number of active turfs overall. To aid in this, planetary atmos calculations are a seperate share from the main 4 turf share now, and instead re-archive and share 4/5 of their difference in moles to the atmosphere, as well as temperature sharing with a higher heat capacity. This should result in the planetary atmos turfs returning to their standard much faster than before. Before at most planetary turfs would keep 0.8 of their difference after sharing, compared to the 0.2 difference they will keep now, log(0.2) / log(0.8) showing this is sharing about 7 times faster in getting rid of gas diffs. This should also reduce the effects of continuous fires and limit their active turfs to a certain region on the planet, ex: the incinerator outlet wouldn't spread to the entire planets turfs. This also makes behavior more like space for the purposes of cooling and venting gas for toxins. This might also make gas farming slightly faster since the gas will also come back faster, but considering most of the expensive gasses have been removed and this will also reduce the lag from gas farms, I think it is a worthwhile change. It can't be worse than making the turfs immutable anyways since that would be the fastest. Reduces lag and makes gameplay more in-line with space stations in ways that improve quality of life but still preserve uniqueness by not making the planetary turfs completely immutable. * Planetary Atmos Changes Co-authored-by: Whoneedspacee --- code/game/turfs/open/openspace.dm | 1 + .../atmospherics/environmental/LINDA_turf_tile.dm | 9 ++++++--- code/modules/ruins/icemoonruin_code/hotsprings.dm | 1 + 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/code/game/turfs/open/openspace.dm b/code/game/turfs/open/openspace.dm index 2fe516f714e..1761593c3de 100644 --- a/code/game/turfs/open/openspace.dm +++ b/code/game/turfs/open/openspace.dm @@ -150,6 +150,7 @@ GLOBAL_DATUM_INIT(openspace_backdrop_one_for_all, /atom/movable/openspace_backdr name = "ice chasm" baseturfs = /turf/open/openspace/icemoon initial_gas_mix = ICEMOON_DEFAULT_ATMOS + planetary_atmos = TRUE var/replacement_turf = /turf/open/floor/plating/asteroid/snow/icemoon /turf/open/openspace/icemoon/Initialize() diff --git a/code/modules/atmospherics/environmental/LINDA_turf_tile.dm b/code/modules/atmospherics/environmental/LINDA_turf_tile.dm index d32f929861b..ebd5d27302d 100644 --- a/code/modules/atmospherics/environmental/LINDA_turf_tile.dm +++ b/code/modules/atmospherics/environmental/LINDA_turf_tile.dm @@ -186,8 +186,6 @@ var/cached_atmos_cooldown = atmos_cooldown + 1 var/planet_atmos = planetary_atmos - if (planet_atmos) - adjacent_turfs_length++ var/datum/gas_mixture/our_air = air @@ -245,12 +243,17 @@ var/datum/gas_mixture/G = new G.copy_from_turf(src) G.archive() + // archive ourself again so we don't accidentally share more gas than we currently have + archive() if(our_air.compare(G)) if(!our_excited_group) var/datum/excited_group/EG = new EG.add_turf(src) our_excited_group = excited_group - our_air.share(G, adjacent_turfs_length) + // shares 4/5 of our difference in moles with the atmosphere + our_air.share(G, 0.25) + // temperature share with the atmosphere with an inflated heat capacity to simulate faster sharing with a large atmosphere + our_air.temperature_share(G, OPEN_HEAT_TRANSFER_COEFFICIENT, G.temperature_archived, G.heat_capacity() * 5) LAST_SHARE_CHECK our_air.react(src) diff --git a/code/modules/ruins/icemoonruin_code/hotsprings.dm b/code/modules/ruins/icemoonruin_code/hotsprings.dm index e3c0aae9ea9..a318f5bb1a4 100644 --- a/code/modules/ruins/icemoonruin_code/hotsprings.dm +++ b/code/modules/ruins/icemoonruin_code/hotsprings.dm @@ -14,6 +14,7 @@ GLOBAL_LIST_EMPTY(cursed_minds) /turf/open/water/cursed_spring baseturfs = /turf/open/water/cursed_spring + planetary_atmos = TRUE initial_gas_mix = ICEMOON_DEFAULT_ATMOS /turf/open/water/cursed_spring/Entered(atom/movable/thing, atom/oldLoc)