Fixes gas turbine scaling its output mix thermal energy, and prevents it from creating power from thermal energy it can't take. (#71411)

## About The Pull Request
Removes errant mole scaling for the thermal energy loss of gases
entering the turbine. Limits the amount of work it can do to only cool
gas down to TCMB, preventing it from creating power from no thermal
energy.
## Why It's Good For The Game
It was too silly when the turbine can cool a raging fire down to 2.7
Kelvin. Creating power from energy it can't take was also too silly.
## Changelog
🆑
fix: Fix unnecessary mole scaling with gas turbine gas thermal energy
loss from work done.
fix: The gas turbine no longer creates power from thermal energy it
can't take.
/🆑
This commit is contained in:
Pickle-Coding
2022-11-29 09:05:05 +00:00
committed by GitHub
parent c03800e93f
commit d40c4e191f
+2 -1
View File
@@ -565,7 +565,8 @@
var/output_mix_heat_capacity = output_mix.heat_capacity()
if(!output_mix_heat_capacity)
return 0
output_mix.temperature = max((output_mix.temperature * output_mix_heat_capacity + work_done * output_mix.total_moles() * TURBINE_HEAT_CONVERSION_MULTIPLIER) / output_mix_heat_capacity, TCMB)
work_done = min(work_done, (output_mix_heat_capacity * output_mix.temperature - output_mix_heat_capacity * TCMB) / TURBINE_HEAT_CONVERSION_MULTIPLIER)
output_mix.temperature = max((output_mix.temperature * output_mix_heat_capacity + work_done * TURBINE_HEAT_CONVERSION_MULTIPLIER) / output_mix_heat_capacity, TCMB)
return work_done
/obj/item/paper/guides/jobs/atmos/turbine