mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-10 18:22:39 +00:00
Merge pull request #5094 from Verkister/patch-97
fixes solarmoth space runtime spam
This commit is contained in:
@@ -99,23 +99,25 @@
|
|||||||
/mob/living/simple_mob/vore/solarmoth/Life()
|
/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
|
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/turf/moth_loc = get_turf(src)
|
||||||
var/transfer_moles = 0.25 * env.total_moles //The bigger the room, the harder it is to heat the room.
|
if(isturf(moth_loc) && moth_loc.air)
|
||||||
var/datum/gas_mixture/removed = env.remove(transfer_moles)
|
var/datum/gas_mixture/env = moth_loc.return_air() //Gets all the information on the local air.
|
||||||
var/heat_transfer = removed.get_thermal_energy_change(set_temperature)
|
var/transfer_moles = 0.25 * env.total_moles //The bigger the room, the harder it is to heat the room.
|
||||||
if(heat_transfer > 0 && env.temperature < T0C + 200) //This should start heating the room at a moderate pace up to 200 degrees celsius.
|
var/datum/gas_mixture/removed = env.remove(transfer_moles)
|
||||||
heat_transfer = min(heat_transfer , heating_power) //limit by the power rating of the heater
|
var/heat_transfer = removed.get_thermal_energy_change(set_temperature)
|
||||||
removed.add_thermal_energy(heat_transfer)
|
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.
|
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.
|
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.
|
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)
|
removed.add_thermal_energy(heat_transfer)
|
||||||
|
|
||||||
else
|
else
|
||||||
return
|
return
|
||||||
|
|
||||||
env.merge(removed)
|
env.merge(removed)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user