mirror of
https://github.com/vgstation-coders/vgstation13.git
synced 2025-12-10 10:21:11 +00:00
-Redid icons to be more optimized at compile by setting icon = 'icons/folder/icon.dmi' instead of just icon = 'icon.dmi', meaning that Dream Maker doesn't have to search through every single file for every single .dmi. This shouldn't lead to any errors because of how I went about it, plus the fact that Dream Maker would have freaked out if I screwed something up. Also moved around 2 icons that weren't sorted well. r4146 compile time: 1 minute, 40 seconds r4147 compile time: 45 seconds [VGTG] git-svn-id: http://tgstation13.googlecode.com/svn/trunk@4147 316c924e-a436-60f5-8080-3fe189b3f50e
49 lines
956 B
Plaintext
49 lines
956 B
Plaintext
obj/machinery/atmospherics/unary/oxygen_generator
|
|
icon = 'icons/obj/atmospherics/oxygen_generator.dmi'
|
|
icon_state = "intact_off"
|
|
density = 1
|
|
|
|
name = "Oxygen Generator"
|
|
desc = ""
|
|
|
|
dir = SOUTH
|
|
initialize_directions = SOUTH
|
|
|
|
var/on = 0
|
|
|
|
var/oxygen_content = 10
|
|
|
|
update_icon()
|
|
if(node)
|
|
icon_state = "intact_[on?("on"):("off")]"
|
|
else
|
|
icon_state = "exposed_off"
|
|
|
|
on = 0
|
|
|
|
return
|
|
|
|
New()
|
|
..()
|
|
|
|
air_contents.volume = 50
|
|
|
|
process()
|
|
..()
|
|
if(!on)
|
|
return 0
|
|
|
|
var/total_moles = air_contents.total_moles()
|
|
|
|
if(total_moles < oxygen_content)
|
|
var/current_heat_capacity = air_contents.heat_capacity()
|
|
|
|
var/added_oxygen = oxygen_content - total_moles
|
|
|
|
air_contents.temperature = (current_heat_capacity*air_contents.temperature + 20*added_oxygen*T0C)/(current_heat_capacity+20*added_oxygen)
|
|
air_contents.oxygen += added_oxygen
|
|
|
|
if(network)
|
|
network.update = 1
|
|
|
|
return 1 |