diff --git a/.gitignore b/.gitignore index da85a131..77a08ead 100644 --- a/.gitignore +++ b/.gitignore @@ -16,3 +16,5 @@ maps/newmedical tgstation2.dmm *.bak2 maps/tgstation2_medbayrework_final.dmm Outpost.dmm +config/admins.txt +config/admin_ranks.txt diff --git a/code/datums/supplypacks.dm b/code/datums/supplypacks.dm index 25cd881e..87f36323 100644 --- a/code/datums/supplypacks.dm +++ b/code/datums/supplypacks.dm @@ -1118,7 +1118,7 @@ var/list/all_supply_groups = list("Operations","Security","Hospitality","Enginee /datum/supply_packs/atmos_freezer name = "Gas Cooling Unit" - contains = list() //MAKE A FREEZER THAT IS, BY DEFAULT, UNANCHORED! + contains = list(/obj/machinery/atmospherics/unary/cold_sink/freezer/cargo) //MAKE A FREEZER THAT IS, BY DEFAULT, UNANCHORED! cost = 50 containertype = /obj/structure/closet/crate/secure/large //Test if this works ((should)) containername = "gas cooling unit crate" @@ -1127,7 +1127,7 @@ var/list/all_supply_groups = list("Operations","Security","Hospitality","Enginee /datum/supply_packs/atmos_heater name = "Gas Heating Unit" - contains = list() //MAKE A COOLER THAT IS, BY DEFAULT, UNANCHORED! + contains = list(/obj/machinery/atmospherics/unary/heat_reservoir/heater/cargo) //MAKE A COOLER THAT IS, BY DEFAULT, UNANCHORED! cost = 50 containertype = /obj/structure/closet/crate/secure/large //Test if this works ((should)) containername = "gas heating unit crate" diff --git a/code/game/machinery/Freezer.dm b/code/game/machinery/Freezer.dm index dcfbcd7b..8d044d9d 100644 --- a/code/game/machinery/Freezer.dm +++ b/code/game/machinery/Freezer.dm @@ -36,13 +36,22 @@ return /obj/machinery/atmospherics/unary/cold_sink/freezer/attack_ai(mob/user as mob) - src.ui_interact(user) + if(anchored == 1) + src.ui_interact(user) + else + user << "The machine is not wrenched down, you cannot interface with it." /obj/machinery/atmospherics/unary/cold_sink/freezer/attack_paw(mob/user as mob) - src.ui_interact(user) + if(anchored == 1) + src.ui_interact(user) + else + user << "You should wrench the machine down before trying to switch it on." /obj/machinery/atmospherics/unary/cold_sink/freezer/attack_hand(mob/user as mob) - src.ui_interact(user) + if(anchored == 1) + src.ui_interact(user) + else + user << "You should wrench the machine down before trying to switch it on." /obj/machinery/atmospherics/unary/cold_sink/freezer/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null) // this is the data which will be sent to the ui @@ -53,7 +62,7 @@ data["minGasTemperature"] = round(T0C - 200) data["maxGasTemperature"] = round(T20C) data["targetGasTemperature"] = round(current_temperature) - + var/temp_class = "good" if (air_contents.temperature > (T0C - 20)) temp_class = "bad" @@ -74,7 +83,7 @@ // auto update every Master Controller tick ui.set_auto_update(1) -/obj/machinery/atmospherics/unary/cold_sink/freezer/Topic(href, href_list) +/obj/machinery/atmospherics/unary/cold_sink/freezer/Topic(href, href_list) if (href_list["toggleStatus"]) src.on = !src.on update_icon() @@ -91,6 +100,28 @@ /obj/machinery/atmospherics/unary/cold_sink/freezer/process() ..() +/obj/machinery/atmospherics/unary/cold_sink/freezer/attackby(var/obj/item/W as obj, var/mob/user as mob) + if(src.on) + user << "You need to turn the machine off before unwrenching it." + else + if(istype(W, /obj/item/weapon/wrench)) + switch(anchored) + if(0) + playsound(src.loc, 'sound/items/Ratchet.ogg', 75, 1) + spawn(10) + user.visible_message("[user.name] secures [src.name] to the floor.", "You secure [src.name] to the floor.", "You hear a ratchet") + anchored = 1 + initialize_directions = dir + if(1) + playsound(src.loc, 'sound/items/Ratchet.ogg', 75, 1) + spawn(10) + user.visible_message("[user.name] unsecures [src.name] reinforcing bolts from the floor.", "You unsecure [src.name] from the floor.", "You hear a ratchet") + anchored = 0 + return + +/obj/machinery/atmospherics/unary/cold_sink/freezer/cargo + anchored = 0 + /obj/machinery/atmospherics/unary/heat_reservoir/heater name = "gas heating system" icon = 'icons/obj/Cryogenic2.dmi' @@ -129,14 +160,23 @@ return /obj/machinery/atmospherics/unary/heat_reservoir/heater/attack_ai(mob/user as mob) - src.ui_interact(user) + if(anchored == 1) + src.ui_interact(user) + else + user << "The machine is not wrenched down, you cannot interface with it." /obj/machinery/atmospherics/unary/heat_reservoir/heater/attack_paw(mob/user as mob) - src.ui_interact(user) + if(anchored == 1) + src.ui_interact(user) + else + user << "The machine is not wrenched down, you cannot interface with it." /obj/machinery/atmospherics/unary/heat_reservoir/heater/attack_hand(mob/user as mob) - src.ui_interact(user) - + if(anchored == 1) + src.ui_interact(user) + else + user << "The machine is not wrenched down, you cannot interface with it." + /obj/machinery/atmospherics/unary/heat_reservoir/heater/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null) // this is the data which will be sent to the ui var/data[0] @@ -146,7 +186,7 @@ data["minGasTemperature"] = round(T20C) data["maxGasTemperature"] = round(T20C+280) data["targetGasTemperature"] = round(current_temperature) - + var/temp_class = "normal" if (air_contents.temperature > (T20C+40)) temp_class = "bad" @@ -175,9 +215,31 @@ src.current_temperature = min((T20C+280), src.current_temperature+amount) else src.current_temperature = max(T20C, src.current_temperature+amount) - + src.add_fingerprint(usr) return 1 /obj/machinery/atmospherics/unary/heat_reservoir/heater/process() - ..() \ No newline at end of file + ..() + +/obj/machinery/atmospherics/unary/heat_reservoir/heater/attackby(var/obj/item/W as obj, var/mob/user as mob) + if(src.on) + user << "You need to turn the machine off before unwrenching it." + else + if(istype(W, /obj/item/weapon/wrench)) + switch(anchored) + if(0) + playsound(src.loc, 'sound/items/Ratchet.ogg', 75, 1) + spawn(10) + user.visible_message("[user.name] secures [src.name] to the floor.", "You secure [src.name] to the floor.", "You hear a ratchet") + anchored = 1 + initialize_directions = dir + if(1) + playsound(src.loc, 'sound/items/Ratchet.ogg', 75, 1) + spawn(10) + user.visible_message("[user.name] unsecures [src.name] reinforcing bolts from the floor.", "You unsecure [src.name] from the floor.", "You hear a ratchet") + anchored = 0 + return + +/obj/machinery/atmospherics/unary/heat_reservoir/heater/cargo + anchored = 0 \ No newline at end of file diff --git a/code/game/machinery/machinery.dm b/code/game/machinery/machinery.dm index 427e4256..46ca6d45 100644 --- a/code/game/machinery/machinery.dm +++ b/code/game/machinery/machinery.dm @@ -261,18 +261,20 @@ Class Procs: state(text, "blue") playsound(src.loc, 'sound/machines/ping.ogg', 50, 0) -/obj/machinery/attack_by(obj/item/W, mob/user) +/obj/machinery/attackby(obj/item/W, mob/user) if(istype(W, /obj/item/weapon/wrench)) if(moveable == 1) switch(anchored) if(0) + playsound(src.loc, 'sound/items/Ratchet.ogg', 75, 1) + spawn(10) + user.visible_message("[user.name] secures [src.name] to the floor.", "You secure [src.name] to the floor.", "You hear a ratchet") anchored = 1 - playsound(src.loc, 'sound/items/Ratchet.ogg', 75, 1) - user.visible_message("[user.name] secures [src.name] to the floor.", \"You secure [src.name] to the floor.", \"You hear a ratchet") if(1) - anchored = 0 playsound(src.loc, 'sound/items/Ratchet.ogg', 75, 1) - user.visible_message("[user.name] unsecures [src.name] reinforcing bolts from the floor.", \"You unsecure [src.name] from the floor.", \"You hear a ratchet") + spawn(10) + user.visible_message("[user.name] unsecures [src.name] reinforcing bolts from the floor.", "You unsecure [src.name] from the floor.", "You hear a ratchet") + anchored = 0 return else user << "The item is secured to the floor too firmly." diff --git a/code/modules/aurora/banner.dm b/code/modules/aurora/banner.dm index 6a457610..a3365b1a 100644 --- a/code/modules/aurora/banner.dm +++ b/code/modules/aurora/banner.dm @@ -36,13 +36,9 @@ if(0) anchored = 1 playsound(src.loc, 'sound/items/Ratchet.ogg', 75, 1) - user.visible_message("[user.name] secures [src.name] to the floor.", \ - "You secure [src.name] to the floor.", \ - "You hear a ratchet") + user.visible_message("[user.name] secures [src.name] to the floor.", "You secure [src.name] to the floor.", "You hear a ratchet") if(1) anchored = 0 playsound(src.loc, 'sound/items/Ratchet.ogg', 75, 1) - user.visible_message("[user.name] unsecures [src.name] reinforcing bolts from the floor.", \ - "You unsecure [src.name] from the floor.", \ - "You hear a ratchet") + user.visible_message("[user.name] unsecures [src.name] reinforcing bolts from the floor.", "You unsecure [src.name] from the floor.", "You hear a ratchet") return diff --git a/code/modules/reagents/Chemistry-Machinery.dm b/code/modules/reagents/Chemistry-Machinery.dm index 3ba573f6..35337683 100644 --- a/code/modules/reagents/Chemistry-Machinery.dm +++ b/code/modules/reagents/Chemistry-Machinery.dm @@ -181,7 +181,7 @@ add_fingerprint(usr) return 1 // update UIs attached to this object -/obj/machinery/chem_dispenser/attackby(var/obj/item/weapon/reagent_containers/B as obj, var/mob/user as mob) +/obj/machinery/chem_dispenser/attackby(var/obj/item/weapon/B as obj, var/mob/user as mob) if(isrobot(user)) return @@ -209,6 +209,20 @@ user << "You set [B] on the machine." nanomanager.update_uis(src) // update all UIs attached to src return + if(istype(B, /obj/item/weapon/wrench)) + if(moveable == 1) + switch(anchored) + if(0) + playsound(src.loc, 'sound/items/Ratchet.ogg', 75, 1) + spawn(10) + user.visible_message("[user.name] secures [src.name] to the floor.", "You secure [src.name] to the floor.", "You hear a ratchet") + anchored = 1 + if(1) + playsound(src.loc, 'sound/items/Ratchet.ogg', 75, 1) + spawn(10) + user.visible_message("[user.name] unsecures [src.name] reinforcing bolts from the floor.", "You unsecure [src.name] from the floor.", "You hear a ratchet") + anchored = 0 + return /obj/machinery/chem_dispenser/attack_ai(mob/user as mob) return src.attack_hand(user) @@ -327,6 +341,21 @@ /obj/machinery/chem_master/attackby(var/obj/item/weapon/B as obj, var/mob/user as mob) + if(istype(B, /obj/item/weapon/wrench)) + if(moveable == 1) + switch(anchored) + if(0) + playsound(src.loc, 'sound/items/Ratchet.ogg', 75, 1) + spawn(10) + user.visible_message("[user.name] secures [src.name] to the floor.", "You secure [src.name] to the floor.", "You hear a ratchet") + anchored = 1 + if(1) + playsound(src.loc, 'sound/items/Ratchet.ogg', 75, 1) + spawn(10) + user.visible_message("[user.name] unsecures [src.name] reinforcing bolts from the floor.", "You unsecure [src.name] from the floor.", "You hear a ratchet") + anchored = 0 + return + if(istype(B, /obj/item/weapon/reagent_containers/glass)) if(src.beaker) @@ -338,8 +367,7 @@ user << "You add the beaker to the machine!" src.updateUsrDialog() icon_state = "mixer1" - - else if(istype(B, /obj/item/weapon/storage/pill_bottle)) + if(istype(B, /obj/item/weapon/storage/pill_bottle)) if(src.loaded_pill_bottle) user << "A pill bottle is already loaded into the machine."