mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2025-12-10 09:42:29 +00:00
[MIRROR] Fixes linda heat capacity errors [MDB IGNORE] (#16445)
* Fixes linda heat capacity errors (#70071) We make the assumption that a turf's heat capacity will never be 0. This is safe because we've got an override of /datum/gas_mixture for turfs that overrides 0 heat cap with 7000 (SPACE) This is done to make cold actually flow through empty tiles, because we are hacks. I forgot to include type in my gas mixture creation logic, so this was being dropped. FIXXXX * Fixes linda heat capacity errors Co-authored-by: LemonInTheDark <58055496+LemonInTheDark@users.noreply.github.com>
This commit is contained in:
@@ -671,16 +671,17 @@ GLOBAL_LIST_EMPTY(colored_images)
|
||||
atmos_gen[initial(atmostype.id)] = new atmostype
|
||||
|
||||
/// Takes a gas string, returns the matching mutable gas_mixture
|
||||
/datum/controller/subsystem/air/proc/parse_gas_string(gas_string)
|
||||
var/datum/gas_mixture/cached = strings_to_mix[gas_string]
|
||||
/datum/controller/subsystem/air/proc/parse_gas_string(gas_string, gastype = /datum/gas_mixture)
|
||||
var/datum/gas_mixture/cached = strings_to_mix["[gas_string]-[gastype]"]
|
||||
|
||||
if(cached)
|
||||
if(istype(cached, /datum/gas_mixture/immutable))
|
||||
return cached
|
||||
return cached.copy()
|
||||
|
||||
var/datum/gas_mixture/canonical_mix = new()
|
||||
var/datum/gas_mixture/canonical_mix = new gastype()
|
||||
// We set here so any future key changes don't fuck us
|
||||
strings_to_mix[gas_string] = canonical_mix
|
||||
strings_to_mix["[gas_string]-[gastype]"] = canonical_mix
|
||||
gas_string = preprocess_gas_string(gas_string)
|
||||
|
||||
var/list/gases = canonical_mix.gases
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
if(F.blocks_air)
|
||||
//skip walls
|
||||
continue
|
||||
var/datum/gas_mixture/GM = SSair.parse_gas_string(F.initial_gas_mix)
|
||||
var/datum/gas_mixture/GM = SSair.parse_gas_string(F.initial_gas_mix, /datum/gas_mixture/turf)
|
||||
F.copy_air(GM)
|
||||
F.update_visuals()
|
||||
|
||||
|
||||
@@ -212,7 +212,7 @@
|
||||
if(!text || !air)
|
||||
return
|
||||
|
||||
var/datum/gas_mixture/turf_mixture = SSair.parse_gas_string(text)
|
||||
var/datum/gas_mixture/turf_mixture = SSair.parse_gas_string(text, /datum/gas_mixture/turf)
|
||||
|
||||
air.merge(turf_mixture)
|
||||
archive()
|
||||
|
||||
@@ -77,7 +77,7 @@
|
||||
///Copies all gas info from the turf into a new gas_mixture, along with our temperature
|
||||
///Returns the created gas_mixture
|
||||
/turf/proc/create_gas_mixture()
|
||||
var/datum/gas_mixture/mix = SSair.parse_gas_string(initial_gas_mix)
|
||||
var/datum/gas_mixture/mix = SSair.parse_gas_string(initial_gas_mix, /datum/gas_mixture/turf)
|
||||
|
||||
//acounts for changes in temperature
|
||||
var/turf/parent = parent_type
|
||||
|
||||
Reference in New Issue
Block a user