[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 <yougotreallyowned@gmail.com>
This commit is contained in:
SkyratBot
2020-12-11 10:37:34 +01:00
committed by GitHub
co-authored by Whoneedspacee
parent 7d850123a2
commit a71d2aca24
3 changed files with 8 additions and 3 deletions
+1
View File
@@ -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()
@@ -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)
@@ -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)