This commit is contained in:
Fox-McCloud
2015-09-12 15:59:02 -04:00
parent 15fc8144e8
commit 54fc3d9aa2
2 changed files with 15 additions and 8 deletions
+9 -7
View File
@@ -123,10 +123,12 @@ Note: Must be placed west/left of and R&D console to function.
return
if (stat)
return 1
if(istype(O,/obj/item/stack/sheet))
if(!materials.has_space( materials.get_item_material_amount(O) ))
user << "<span class='warning'>The [src.name]'s material bin is full. Please remove material before adding more.</span>"
return 1
if(!istype(O,/obj/item/stack/sheet))
return 1
if(!materials.has_space( materials.get_item_material_amount(O) ))
user << "<span class='warning'>The [src.name]'s material bin is full! Please remove material before adding more.</span>"
return 1
var/obj/item/stack/sheet/stack = O
var/amount = round(input("How many sheets do you want to add?") as num)//No decimals
@@ -134,14 +136,14 @@ Note: Must be placed west/left of and R&D console to function.
return
var/amount_inserted = materials.insert_stack(O,amount)
if(!amount_inserted)
user << "<span class='warning'>You could not insert [O], it has no usable materials.</span>"
return 1
else
busy = 1
use_power(max(1000, (MINERAL_MATERIAL_AMOUNT*amount_inserted/10)))
user << "<span class='notice'>You add [amount_inserted] sheets to the [src.name].</span>"
overlays += "protolathe_[stack.name]"
var/stackname = stack.name
src.overlays += "protolathe_[stackname]"
sleep(10)
overlays -= "protolathe_[stack.name]"
src.overlays -= "protolathe_[stackname]"
busy = 0
updateUsrDialog()