mirror of
https://github.com/vgstation-coders/vgstation13.git
synced 2025-12-10 10:21:11 +00:00
-Gave request consoles an off sprite. git-svn-id: http://tgstation13.googlecode.com/svn/trunk@5421 316c924e-a436-60f5-8080-3fe189b3f50e
43 lines
1.2 KiB
Plaintext
43 lines
1.2 KiB
Plaintext
/obj/machinery/atmospherics/unary/heat_reservoir
|
|
//currently the same code as cold_sink but anticipating process() changes
|
|
|
|
icon = 'icons/obj/atmospherics/cold_sink.dmi'
|
|
icon_state = "intact_off"
|
|
density = 1
|
|
use_power = 1
|
|
|
|
name = "Heat Reservoir"
|
|
desc = "Heats gas when connected to pipe network"
|
|
|
|
var/on = 0
|
|
|
|
var/current_temperature = T20C
|
|
var/current_heat_capacity = 50000 //totally random
|
|
|
|
update_icon()
|
|
if(node)
|
|
icon_state = "intact_[on?("on"):("off")]"
|
|
else
|
|
icon_state = "exposed"
|
|
|
|
on = 0
|
|
|
|
return
|
|
|
|
process()
|
|
..()
|
|
if(!on)
|
|
return 0
|
|
var/air_heat_capacity = air_contents.heat_capacity()
|
|
var/combined_heat_capacity = current_heat_capacity + air_heat_capacity
|
|
var/old_temperature = air_contents.temperature
|
|
|
|
if(combined_heat_capacity > 0)
|
|
var/combined_energy = current_temperature*current_heat_capacity + air_heat_capacity*air_contents.temperature
|
|
air_contents.temperature = combined_energy/combined_heat_capacity
|
|
|
|
//todo: have current temperature affected. require power to bring up current temperature again
|
|
|
|
if(abs(old_temperature-air_contents.temperature) > 1)
|
|
network.update = 1
|
|
return 1 |