mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-26 14:39:58 +01:00
[NO GBP] Fix superconduction overflow (#67684)
* Documentation, parentheses, and more * Better comment for the inside multiplication * Even more parentheses Co-authored-by: LemonInTheDark <58055496+LemonInTheDark@users.noreply.github.com> * Nicer commenting methinks Co-authored-by: LemonInTheDark <58055496+LemonInTheDark@users.noreply.github.com>
This commit is contained in:
co-authored by
LemonInTheDark
parent
9c6a4cec3b
commit
af29d599ae
@@ -650,7 +650,8 @@ Then we space some of our heat, and think about if we should stop conducting.
|
||||
if(heat_capacity <= 0 || abs(delta_temperature) <= MINIMUM_TEMPERATURE_DELTA_TO_CONSIDER)
|
||||
return
|
||||
// Heat should be positive in most cases
|
||||
var/heat = thermal_conductivity * CALCULATE_CONDUCTION_ENERGY(delta_temperature, HEAT_CAPACITY_VACUUM, heat_capacity)
|
||||
// coefficient applied first because some turfs have very big heat caps.
|
||||
var/heat = CALCULATE_CONDUCTION_ENERGY(thermal_conductivity * delta_temperature, HEAT_CAPACITY_VACUUM, heat_capacity)
|
||||
temperature -= heat / heat_capacity
|
||||
|
||||
/turf/open/proc/temperature_share_open_to_solid(turf/sharer)
|
||||
|
||||
@@ -443,7 +443,8 @@ GLOBAL_LIST_INIT(gaslist_cache, init_gaslist_cache())
|
||||
sharer_heat_capacity = sharer_heat_capacity || sharer.heat_capacity(ARCHIVE)
|
||||
|
||||
if((sharer_heat_capacity > MINIMUM_HEAT_CAPACITY) && (self_heat_capacity > MINIMUM_HEAT_CAPACITY))
|
||||
var/heat = conduction_coefficient * CALCULATE_CONDUCTION_ENERGY(temperature_delta, sharer_heat_capacity, self_heat_capacity)
|
||||
// coefficient applied first because some turfs have very big heat caps.
|
||||
var/heat = CALCULATE_CONDUCTION_ENERGY(conduction_coefficient * temperature_delta, sharer_heat_capacity, self_heat_capacity)
|
||||
|
||||
temperature = max(temperature - heat/self_heat_capacity, TCMB)
|
||||
sharer_temperature = max(sharer_temperature + heat/sharer_heat_capacity, TCMB)
|
||||
|
||||
Reference in New Issue
Block a user