Merge pull request #5094 from Verkister/patch-97

fixes solarmoth space runtime spam
This commit is contained in:
Razgriz
2022-10-09 12:29:31 -07:00
committed by GitHub

View File

@@ -99,23 +99,25 @@
/mob/living/simple_mob/vore/solarmoth/Life()
. = ..()
if(icon_state != icon_dead) //I mean on death() Life() should disable but i guess doesnt hurt to make sure -shark
var/datum/gas_mixture/env = loc.return_air() //Gets all the information on the local air.
var/transfer_moles = 0.25 * env.total_moles //The bigger the room, the harder it is to heat the room.
var/datum/gas_mixture/removed = env.remove(transfer_moles)
var/heat_transfer = removed.get_thermal_energy_change(set_temperature)
if(heat_transfer > 0 && env.temperature < T0C + 200) //This should start heating the room at a moderate pace up to 200 degrees celsius.
heat_transfer = min(heat_transfer , heating_power) //limit by the power rating of the heater
removed.add_thermal_energy(heat_transfer)
var/turf/moth_loc = get_turf(src)
if(isturf(moth_loc) && moth_loc.air)
var/datum/gas_mixture/env = moth_loc.return_air() //Gets all the information on the local air.
var/transfer_moles = 0.25 * env.total_moles //The bigger the room, the harder it is to heat the room.
var/datum/gas_mixture/removed = env.remove(transfer_moles)
var/heat_transfer = removed.get_thermal_energy_change(set_temperature)
if(heat_transfer > 0 && env.temperature < T0C + 200) //This should start heating the room at a moderate pace up to 200 degrees celsius.
heat_transfer = min(heat_transfer , heating_power) //limit by the power rating of the heater
removed.add_thermal_energy(heat_transfer)
else if(heat_transfer > 0 && env.temperature < set_temperature) //Set temperature is 10,000 degrees celsius. So this thing will start cooking crazy hot between the temperatures of 200C and 10,000C.
heating_power = original_temp*100 //Changed to work variable -shark //FLAME ON! This will make the moth heat up the room at an incredible rate.
heat_transfer = min(heat_transfer , heating_power) //limit by the power rating of the heater. Except it's hot, so yeah.
removed.add_thermal_energy(heat_transfer)
else if(heat_transfer > 0 && env.temperature < set_temperature) //Set temperature is 10,000 degrees celsius. So this thing will start cooking crazy hot between the temperatures of 200C and 10,000C.
heating_power = original_temp*100 //Changed to work variable -shark //FLAME ON! This will make the moth heat up the room at an incredible rate.
heat_transfer = min(heat_transfer , heating_power) //limit by the power rating of the heater. Except it's hot, so yeah.
removed.add_thermal_energy(heat_transfer)
else
return
else
return
env.merge(removed)
env.merge(removed)