diff --git a/code/modules/research/designs.dm b/code/modules/research/designs.dm index a2e11a7552e..ac8f6b91fb1 100644 --- a/code/modules/research/designs.dm +++ b/code/modules/research/designs.dm @@ -303,7 +303,7 @@ datum/design/diagnostic_hud id = "dianostic_hud" req_tech = list("magnets" = 3, "engineering" = 2) build_type = PROTOLATHE - materials = list("metal" = 500, "glass" = 500) + materials = list(MAT_METAL = 500, MAT_GLASS = 500) build_path = /obj/item/clothing/glasses/hud/diagnostic category = list("Equipment") @@ -313,7 +313,7 @@ datum/design/diagnostic_hud_night id = "dianostic_hud_night" req_tech = list("magnets" = 5, "plasmatech" = 4, "engineering" = 6, "powerstorage" = 4) build_type = PROTOLATHE - materials = list("metal" = 600, "glass" = 600, "uranium" = 1000, "plasma" = 300) + materials = list(MAT_METAL = 600, MAT_GLASS = 600, MAT_URANIUM = 1000, MAT_PLASMA = 300) build_path = /obj/item/clothing/glasses/hud/diagnostic/night category = list("Equipment") diff --git a/code/modules/research/destructive_analyzer.dm b/code/modules/research/destructive_analyzer.dm index 3220b5b654f..958dd671d4d 100644 --- a/code/modules/research/destructive_analyzer.dm +++ b/code/modules/research/destructive_analyzer.dm @@ -65,4 +65,5 @@ Note: Must be placed within 3 tiles of the R&D Console user << "You add the [O.name] to the [src.name]!" flick("d_analyzer_la", src) spawn(10) + icon_state = "d_analyzer_l" busy = 0 diff --git a/code/modules/research/rdconsole.dm b/code/modules/research/rdconsole.dm index 57c21e9b1b2..d85ab69ac13 100644 --- a/code/modules/research/rdconsole.dm +++ b/code/modules/research/rdconsole.dm @@ -353,15 +353,12 @@ proc/CallMaterialName(ID) sync = !sync else if(href_list["build"]) //Causes the Protolathe to build something. - var/coeff - - if(linked_lathe) - coeff = linked_lathe.efficiency_coeff - else - coeff = 1 - - var/g2g = 1 if(linked_lathe) + if(linked_lathe.busy) + usr << "Protolathe is busy at the moment." + return + var/coeff = linked_lathe.efficiency_coeff + var/g2g = 1 var/datum/design/being_built = files.known_designs[href_list["build"]] if(being_built) var/power = 2000 @@ -372,15 +369,11 @@ proc/CallMaterialName(ID) power += round(being_built.materials[M] * amount / 5) power = max(2000, power) screen = 0.3 - if(linked_lathe.busy) - g2g = 0 var/key = usr.key //so we don't lose the info during the spawn delay if (!(being_built.build_type & PROTOLATHE)) g2g = 0 message_admins("Protolathe exploit attempted by [key_name(usr, usr.client)]!") - - if (g2g) //If input is incorrect, nothing happens var/enough_materials = 1 linked_lathe.busy = 1 @@ -423,16 +416,19 @@ proc/CallMaterialName(ID) feedback_add_details("item_printed","[new_item.type]|[amount]") already_logged = 1 screen = old_screen + linked_lathe.busy = 0 else src.visible_message("The [src.name] beeps, \"Something went wrong, production halted!\"") screen = 1.0 - linked_lathe.busy = 0 updateUsrDialog() else if(href_list["imprint"]) //Causes the Circuit Imprinter to build something. var/coeff = linked_imprinter.efficiency_coeff var/g2g = 1 if(linked_imprinter) + if(linked_lathe.busy) + usr << "Circuit Imprinter is busy at the moment." + return var/datum/design/being_built = files.known_designs[href_list["imprint"]] if(being_built) var/power = 2000 @@ -441,8 +437,6 @@ proc/CallMaterialName(ID) power += round(being_built.materials[M] / 5) power = max(2000, power) screen = 0.4 - if (linked_imprinter.busy) - g2g = 0 if (!(being_built.build_type & IMPRINTER)) g2g = 0 message_admins("Circuit imprinter exploit attempted by [key_name(usr, usr.client)]!") @@ -475,10 +469,10 @@ proc/CallMaterialName(ID) new_item.loc = linked_imprinter.loc feedback_add_details("circuit_printed","[new_item.type]") screen = old_screen + linked_imprinter.busy = 0 else src.visible_message("The [src.name] beeps, \"Something went wrong, production halted!\"") screen = 1.0 - linked_imprinter.busy = 0 updateUsrDialog() else if(href_list["disposeI"] && linked_imprinter) //Causes the circuit imprinter to dispose of a single reagent (all of it)