Bug and runtime fixes

This commit is contained in:
LatD
2016-05-25 21:43:19 +03:00
parent f36237a67d
commit ac11d35ea2
3 changed files with 13 additions and 18 deletions
+2 -2
View File
@@ -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")
@@ -65,4 +65,5 @@ Note: Must be placed within 3 tiles of the R&D Console
user << "<span class='notice'>You add the [O.name] to the [src.name]!</span>"
flick("d_analyzer_la", src)
spawn(10)
icon_state = "d_analyzer_l"
busy = 0
+10 -16
View File
@@ -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 << "<span class='danger'>Protolathe is busy at the moment.</span>"
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("<span class='notice'>The [src.name] beeps, \"Something went wrong, production halted!\"</span>")
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 << "<span class='danger'>Circuit Imprinter is busy at the moment.</span>"
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("<span class='notice'>The [src.name] beeps, \"Something went wrong, production halted!\"</span>")
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)