Adjustments to freezer/heater celsius display, ensure empty AI core is taken off the list when destroyed

This commit is contained in:
Markolie
2015-02-21 23:56:10 +01:00
parent cb732b2b2d
commit a2abae19cf
3 changed files with 11 additions and 2 deletions
+7 -1
View File
@@ -98,6 +98,8 @@
data["gasPressure"] = round(air_contents.return_pressure())
data["gasTemperature"] = round(air_contents.temperature)
data["gasTemperatureCelsius"] = round(air_contents.temperature - T0C)
if(air_contents.total_moles == 0 && air_contents.temperature == 0)
data["gasTemperatureCelsius"] = 0
data["minGasTemperature"] = round(min_temperature)
data["maxGasTemperature"] = round(T20C)
data["targetGasTemperature"] = round(current_temperature)
@@ -252,9 +254,13 @@
data["on"] = on ? 1 : 0
data["gasPressure"] = round(air_contents.return_pressure())
data["gasTemperature"] = round(air_contents.temperature)
data["gasTemperatureCelsius"] = round(air_contents.temperature - T0C)
if(air_contents.total_moles == 0 && air_contents.temperature == 0)
data["gasTemperatureCelsius"] = 0
data["minGasTemperature"] = round(T20C)
data["maxGasTemperature"] = round(T20C+max_temperature)
data["targetGasTemperature"] = round(current_temperature)
data["targetGasTemperatureCelsius"] = round(current_temperature - T0C)
var/temp_class = "normal"
if (air_contents.temperature > (T20C+40))
@@ -266,7 +272,7 @@
if (!ui)
// the ui does not exist, so we'll create a new() one
// for a list of parameters and their descriptions see the code docs in \code\modules\nano\nanoui.dm
ui = new(user, src, ui_key, "freezer.tmpl", "Gas Heating System", 440, 300)
ui = new(user, src, ui_key, "freezer.tmpl", "Gas Heating System", 520, 300)
// when the ui is first opened this is the data it will use
ui.set_initial_data(data)
// open the new ui window
+3
View File
@@ -174,6 +174,9 @@
icon_state = "ai-empty"
anchored = 1
state = 20//So it doesn't interact based on the above. Not really necessary.
/obj/structure/AIcore/deactivated/Destroy()
empty_playable_ai_cores -= src
/obj/structure/AIcore/deactivated/attackby(var/obj/item/W, var/mob/user)
if(istype(W, /obj/item/device/aicard))//Is it?