fix infinite gas production (#55510)

No more infinite gas production due to a gas_mixture not clearing up
This commit is contained in:
Ghilker
2020-12-15 19:11:12 +01:00
committed by GitHub
parent 1c9281ebff
commit 241e9cf111
2 changed files with 3 additions and 6 deletions

View File

@@ -186,8 +186,6 @@
var/datum/gas_mixture/internal_fusion
///Stores the information of the moderators gasmix
var/datum/gas_mixture/moderator_internal
///Stores the information of the output gasmix
var/datum/gas_mixture/internal_output
///Set the filtering type of the waste remove
var/filter_type = null
@@ -311,7 +309,6 @@
internal_fusion = new
internal_fusion.assert_gases(/datum/gas/hydrogen, /datum/gas/tritium)
moderator_internal = new
internal_output = new
radio = new(src)
radio.keyslot = new radio_key
@@ -325,8 +322,6 @@
internal_fusion = null
if(moderator_internal)
moderator_internal = null
if(internal_output)
internal_output = null
if(linked_input)
QDEL_NULL(linked_input)
if(linked_output)
@@ -930,6 +925,7 @@
else
internal_fusion.temperature -= heat_limiter_modifier * 0.01 * delta_time
var/datum/gas_mixture/internal_output
//gas consumption and production
if(check_fuel())
var/fuel_consumption = clamp((fuel_injection_rate * 0.001) * 5 * power_level, 0.05, 30) * delta_time
@@ -1104,6 +1100,7 @@
internal_remove = internal_fusion.remove_specific(/datum/gas/antinoblium, internal_fusion.gases[/datum/gas/antinoblium][MOLES] * 0.05)
linked_output.airs[1].merge(internal_remove)
internal_fusion.garbage_collect()
moderator_internal.garbage_collect()
//Update pipenets

View File

@@ -398,8 +398,8 @@
#include "code\datums\ai\_ai_behavior.dm"
#include "code\datums\ai\_ai_controller.dm"
#include "code\datums\ai\generic_actions.dm"
#include "code\datums\ai\monkey\monkey_controller.dm"
#include "code\datums\ai\monkey\monkey_behaviors.dm"
#include "code\datums\ai\monkey\monkey_controller.dm"
#include "code\datums\atmosphere\_atmosphere.dm"
#include "code\datums\atmosphere\planetary.dm"
#include "code\datums\brain_damage\brain_trauma.dm"