-Fixed issue 673, it will delete the glass if none remains.

-Added issue 672 's enhancement request. Disposal systems should leave fingerprints and transfer prints when building/deconstructing.
-You can put the Light Replacer on your belt.
-Gave the Light Replacer FPRINT and CONDUCT flags.
-Gave the Light Replacer origin tech.
-The Science department can now research the Light Replacer and build it. You need a required tech of "magnets = 3" and "materials = 4" with a material construction cost of 1500 metal, 150 silver and 3000 glass.
-Fixed a bug where you cannot place more than one object into a turned-off disposal unit.

git-svn-id: http://tgstation13.googlecode.com/svn/trunk@4127 316c924e-a436-60f5-8080-3fe189b3f50e
This commit is contained in:
giacomand@gmail.com
2012-07-20 16:08:05 +00:00
parent f562b217ef
commit 82886383e3
5 changed files with 43 additions and 13 deletions
+12 -1
View File
@@ -47,6 +47,10 @@
icon_state = "lightreplacer0"
item_state = "electronic"
flags = FPRINT | CONDUCT
slot_flags = SLOT_BELT
origin_tech = "magnets=3;materials=2"
var/max_uses = 20
var/uses = 0
var/emagged = 0
@@ -75,7 +79,14 @@
if(istype(W, /obj/item/stack/sheet/glass))
var/obj/item/stack/sheet/glass/G = W
if(G.amount - decrement >= 0 && uses < max_uses)
G.amount -= decrement
var/remaining = max(G.amount - decrement, 0)
if(!remaining && !(G.amount - decrement) == 0)
user << "There isn't enough glass."
return
G.amount = remaining
if(!G.amount)
user.drop_item()
del(G)
AddUses(increment)
user << "You insert a piece of glass into the [src.name]. You have [uses] lights remaining."
return