From f55ef6a755a919e9b5b2c11fefd30e13b4897d09 Mon Sep 17 00:00:00 2001 From: Sishen Date: Sun, 30 Jun 2019 16:10:54 -0400 Subject: [PATCH 1/6] Update thermomachine.dm --- .../components/unary_devices/thermomachine.dm | 44 ++++++++++++++++--- 1 file changed, 39 insertions(+), 5 deletions(-) diff --git a/code/modules/atmospherics/machinery/components/unary_devices/thermomachine.dm b/code/modules/atmospherics/machinery/components/unary_devices/thermomachine.dm index 8a1bae5e68..47261e406e 100644 --- a/code/modules/atmospherics/machinery/components/unary_devices/thermomachine.dm +++ b/code/modules/atmospherics/machinery/components/unary_devices/thermomachine.dm @@ -1,18 +1,22 @@ /obj/machinery/atmospherics/components/unary/thermomachine - name = "thermomachine" - desc = "Heats or cools gas in connected pipes." icon = 'icons/obj/atmospherics/components/thermomachine.dmi' icon_state = "freezer" - var/icon_state_off = "freezer" - var/icon_state_on = "freezer_1" - var/icon_state_open = "freezer-o" + + name = "thermomachine" + desc = "Heats or cools gas in connected pipes." + density = TRUE max_integrity = 300 armor = list("melee" = 0, "bullet" = 0, "laser" = 0, "energy" = 100, "bomb" = 0, "bio" = 100, "rad" = 100, "fire" = 80, "acid" = 30) layer = OBJ_LAYER circuit = /obj/item/circuitboard/machine/thermomachine + pipe_flags = PIPING_ONE_PER_TURF | PIPING_DEFAULT_LAYER_ONLY + var/icon_state_off = "freezer" + var/icon_state_on = "freezer_1" + var/icon_state_open = "freezer-o" + var/min_temperature = 0 var/max_temperature = 0 var/target_temperature = T20C @@ -45,6 +49,13 @@ if(showpipe) add_overlay(getpipeimage(icon, "scrub_cap", initialize_directions)) +/obj/machinery/atmospherics/components/unary/thermomachine/examine(mob/user) + . = ..() + . += "The thermostat is set to [target_temperature]K ([(T0C-target_temperature)*-1]C)." + if(in_range(user, src) || isobserver(user)) + . += "The status display reads: Efficiency [(heat_capacity/5000)*100]%." + . += "Temperature range [min_temperature]K - [max_temperature]K ([(T0C-min_temperature)*-1]C - [(T0C-max_temperature)*-1]C)." + /obj/machinery/atmospherics/components/unary/thermomachine/process_atmos() ..() if(!on || !nodes[1]) @@ -155,6 +166,12 @@ update_icon() +/obj/machinery/atmospherics/components/unary/thermomachine/CtrlClick(mob/living/user) + if(!istype(user) || !user.canUseTopic(src, BE_CLOSE)) + return + on = !on + update_icon() + /obj/machinery/atmospherics/components/unary/thermomachine/freezer name = "freezer" icon_state = "freezer" @@ -174,6 +191,13 @@ if(target_temperature == initial(target_temperature)) target_temperature = min_temperature +/obj/machinery/atmospherics/components/unary/thermomachine/freezer/on/coldroom + name = "cold room freezer" + +/obj/machinery/atmospherics/components/unary/thermomachine/freezer/on/coldroom/Initialize() + . = ..() + target_temperature = T0C-80 + /obj/machinery/atmospherics/components/unary/thermomachine/freezer/RefreshParts() ..() var/L @@ -181,6 +205,11 @@ L += M.rating min_temperature = max(T0C - (initial(min_temperature) + L * 15), TCMB) //73.15K with T1 stock parts +/obj/machinery/atmospherics/components/unary/thermomachine/freezer/AltClick(mob/living/user) + if(!istype(user) || !user.canUseTopic(src, BE_CLOSE)) + return + target_temperature = min_temperature + /obj/machinery/atmospherics/components/unary/thermomachine/heater name = "heater" icon_state = "heater" @@ -201,3 +230,8 @@ for(var/obj/item/stock_parts/micro_laser/M in component_parts) L += M.rating max_temperature = T20C + (initial(max_temperature) * L) //573.15K with T1 stock parts + +/obj/machinery/atmospherics/components/unary/thermomachine/heater/AltClick(mob/living/user) + if(!istype(user) || !user.canUseTopic(src, BE_CLOSE)) + return + target_temperature = max_temperature From a9f5b99510b5d4a7fbb1a5e9703376a5ae3d7172 Mon Sep 17 00:00:00 2001 From: Sishen Date: Wed, 3 Jul 2019 16:55:14 -0400 Subject: [PATCH 2/6] Update thermomachine.dm --- .../machinery/components/unary_devices/thermomachine.dm | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/code/modules/atmospherics/machinery/components/unary_devices/thermomachine.dm b/code/modules/atmospherics/machinery/components/unary_devices/thermomachine.dm index 47261e406e..8464a5881e 100644 --- a/code/modules/atmospherics/machinery/components/unary_devices/thermomachine.dm +++ b/code/modules/atmospherics/machinery/components/unary_devices/thermomachine.dm @@ -171,6 +171,7 @@ return on = !on update_icon() + investigate_log("was turned [on ? "on" : "off"] by [key_name(usr)]", INVESTIGATE_ATMOS) /obj/machinery/atmospherics/components/unary/thermomachine/freezer name = "freezer" @@ -208,7 +209,8 @@ /obj/machinery/atmospherics/components/unary/thermomachine/freezer/AltClick(mob/living/user) if(!istype(user) || !user.canUseTopic(src, BE_CLOSE)) return - target_temperature = min_temperature + target_temperature = min_temperature + investigate_log("was set to [target_temperature] K by [key_name(usr)]", INVESTIGATE_ATMOS) /obj/machinery/atmospherics/components/unary/thermomachine/heater name = "heater" @@ -235,3 +237,4 @@ if(!istype(user) || !user.canUseTopic(src, BE_CLOSE)) return target_temperature = max_temperature + investigate_log("was set to [target_temperature] K by [key_name(usr)]", INVESTIGATE_ATMOS) From df75f9f2890bbc8e5d16dcac17013c9fe4b86c5b Mon Sep 17 00:00:00 2001 From: Sishen Date: Wed, 3 Jul 2019 17:38:19 -0400 Subject: [PATCH 3/6] Update thermomachine.dm --- .../machinery/components/unary_devices/thermomachine.dm | 2 ++ 1 file changed, 2 insertions(+) diff --git a/code/modules/atmospherics/machinery/components/unary_devices/thermomachine.dm b/code/modules/atmospherics/machinery/components/unary_devices/thermomachine.dm index 8464a5881e..fb407a1f16 100644 --- a/code/modules/atmospherics/machinery/components/unary_devices/thermomachine.dm +++ b/code/modules/atmospherics/machinery/components/unary_devices/thermomachine.dm @@ -211,6 +211,7 @@ return target_temperature = min_temperature investigate_log("was set to [target_temperature] K by [key_name(usr)]", INVESTIGATE_ATMOS) + message_admins("[src.name], was minimized by [ADMIN_LOOKUPFLW(usr)] at [ADMIN_COORDJMP(T)], [A]") /obj/machinery/atmospherics/components/unary/thermomachine/heater name = "heater" @@ -238,3 +239,4 @@ return target_temperature = max_temperature investigate_log("was set to [target_temperature] K by [key_name(usr)]", INVESTIGATE_ATMOS) + message_admins("[src.name], was maximized by [ADMIN_LOOKUPFLW(usr)] at [ADMIN_COORDJMP(T)], [A]") From 9e514bfab5e6f568907aecf63d1312ad1ef5f68f Mon Sep 17 00:00:00 2001 From: Sishen Date: Wed, 3 Jul 2019 17:39:41 -0400 Subject: [PATCH 4/6] Update thermomachine.dm --- .../machinery/components/unary_devices/thermomachine.dm | 1 + 1 file changed, 1 insertion(+) diff --git a/code/modules/atmospherics/machinery/components/unary_devices/thermomachine.dm b/code/modules/atmospherics/machinery/components/unary_devices/thermomachine.dm index fb407a1f16..babc65403d 100644 --- a/code/modules/atmospherics/machinery/components/unary_devices/thermomachine.dm +++ b/code/modules/atmospherics/machinery/components/unary_devices/thermomachine.dm @@ -172,6 +172,7 @@ on = !on update_icon() investigate_log("was turned [on ? "on" : "off"] by [key_name(usr)]", INVESTIGATE_ATMOS) + message_admins("[src.name], was turned [on ? "on" : "off"] [ADMIN_LOOKUPFLW(usr)] at [ADMIN_COORDJMP(T)], [A]") /obj/machinery/atmospherics/components/unary/thermomachine/freezer name = "freezer" From 4fa244e8e4c5956d7484aa698ca0fea3dd8ef777 Mon Sep 17 00:00:00 2001 From: Sishen Date: Wed, 3 Jul 2019 17:41:27 -0400 Subject: [PATCH 5/6] Update thermomachine.dm --- .../machinery/components/unary_devices/thermomachine.dm | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/code/modules/atmospherics/machinery/components/unary_devices/thermomachine.dm b/code/modules/atmospherics/machinery/components/unary_devices/thermomachine.dm index babc65403d..36a5a3f94e 100644 --- a/code/modules/atmospherics/machinery/components/unary_devices/thermomachine.dm +++ b/code/modules/atmospherics/machinery/components/unary_devices/thermomachine.dm @@ -167,6 +167,8 @@ update_icon() /obj/machinery/atmospherics/components/unary/thermomachine/CtrlClick(mob/living/user) + var/area/A = get_area(src) + var/turf/T = get_turf(src) if(!istype(user) || !user.canUseTopic(src, BE_CLOSE)) return on = !on @@ -208,6 +210,8 @@ min_temperature = max(T0C - (initial(min_temperature) + L * 15), TCMB) //73.15K with T1 stock parts /obj/machinery/atmospherics/components/unary/thermomachine/freezer/AltClick(mob/living/user) + var/area/A = get_area(src) + var/turf/T = get_turf(src) if(!istype(user) || !user.canUseTopic(src, BE_CLOSE)) return target_temperature = min_temperature @@ -236,6 +240,8 @@ max_temperature = T20C + (initial(max_temperature) * L) //573.15K with T1 stock parts /obj/machinery/atmospherics/components/unary/thermomachine/heater/AltClick(mob/living/user) + var/area/A = get_area(src) + var/turf/T = get_turf(src) if(!istype(user) || !user.canUseTopic(src, BE_CLOSE)) return target_temperature = max_temperature From e5cd1bd7c2c8cf86d859ff66637cc406638a6c9f Mon Sep 17 00:00:00 2001 From: Sishen Date: Wed, 3 Jul 2019 17:46:05 -0400 Subject: [PATCH 6/6] Update thermomachine.dm --- .../machinery/components/unary_devices/thermomachine.dm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/code/modules/atmospherics/machinery/components/unary_devices/thermomachine.dm b/code/modules/atmospherics/machinery/components/unary_devices/thermomachine.dm index 36a5a3f94e..b52dc158e4 100644 --- a/code/modules/atmospherics/machinery/components/unary_devices/thermomachine.dm +++ b/code/modules/atmospherics/machinery/components/unary_devices/thermomachine.dm @@ -174,7 +174,7 @@ on = !on update_icon() investigate_log("was turned [on ? "on" : "off"] by [key_name(usr)]", INVESTIGATE_ATMOS) - message_admins("[src.name], was turned [on ? "on" : "off"] [ADMIN_LOOKUPFLW(usr)] at [ADMIN_COORDJMP(T)], [A]") + message_admins("[src.name] was turned [on ? "on" : "off"] [ADMIN_LOOKUPFLW(usr)] at [ADMIN_COORDJMP(T)], [A]") /obj/machinery/atmospherics/components/unary/thermomachine/freezer name = "freezer" @@ -216,7 +216,7 @@ return target_temperature = min_temperature investigate_log("was set to [target_temperature] K by [key_name(usr)]", INVESTIGATE_ATMOS) - message_admins("[src.name], was minimized by [ADMIN_LOOKUPFLW(usr)] at [ADMIN_COORDJMP(T)], [A]") + message_admins("[src.name] was minimized by [ADMIN_LOOKUPFLW(usr)] at [ADMIN_COORDJMP(T)], [A]") /obj/machinery/atmospherics/components/unary/thermomachine/heater name = "heater" @@ -246,4 +246,4 @@ return target_temperature = max_temperature investigate_log("was set to [target_temperature] K by [key_name(usr)]", INVESTIGATE_ATMOS) - message_admins("[src.name], was maximized by [ADMIN_LOOKUPFLW(usr)] at [ADMIN_COORDJMP(T)], [A]") + message_admins("[src.name] was maximized by [ADMIN_LOOKUPFLW(usr)] at [ADMIN_COORDJMP(T)], [A]")