-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

View File

@@ -55,6 +55,7 @@
var/p_dir = text2num(href_list["dir"])
var/obj/item/pipe/P = new (/*usr.loc*/ src.loc, pipe_type=p_type, dir=p_dir)
P.update()
P.add_fingerprint(usr)
wait = 1
spawn(10)
wait = 0
@@ -67,6 +68,7 @@
return
/obj/machinery/pipedispenser/attackby(var/obj/item/W as obj, var/mob/user as mob)
src.add_fingerprint(usr)
if (istype(W, /obj/item/pipe) || istype(W, /obj/item/pipe_meter))
usr << "\blue You put [W] back to [src]."
del(W)
@@ -183,7 +185,7 @@ Nah
if(7)
C.ptype = 8
C.density = 1
C.add_fingerprint(usr)
C.update()
wait = 1
spawn(15)

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

View File

@@ -132,6 +132,7 @@
attackby(var/obj/item/I, var/mob/user)
var/nicetype = "pipe"
var/ispipe = 0 // Indicates if we should change the level of this pipe
src.add_fingerprint(user)
switch(ptype)
if(6)
nicetype = "disposal bin"
@@ -203,6 +204,7 @@
var/pipetype = dpipetype()
var/obj/structure/disposalpipe/P = new pipetype(src.loc)
src.transfer_fingerprints_to(P)
P.base_icon_state = base_state
P.dir = dir
P.dpdir = dpdir
@@ -210,17 +212,20 @@
else if(ptype==6) // Disposal bin
var/obj/machinery/disposal/P = new /obj/machinery/disposal(src.loc)
src.transfer_fingerprints_to(P)
P.mode = 0 // start with pump off
else if(ptype==7) // Disposal outlet
var/obj/structure/disposaloutlet/P = new /obj/structure/disposaloutlet(src.loc)
src.transfer_fingerprints_to(P)
P.dir = dir
Trunk.linked = P
else if(ptype==8) // Disposal outlet
var/obj/machinery/disposal/deliveryChute/P = new /obj/machinery/disposal/deliveryChute(src.loc)
src.transfer_fingerprints_to(P)
P.dir = dir
del(src)

View File

@@ -47,12 +47,12 @@
if(isrobot(user) && !istype(I, /obj/item/weapon/trashbag))
return
src.add_fingerprint(user)
if(mode<=0) // It's off
if(istype(I, /obj/item/weapon/screwdriver))
if(contents.len > 0)
user << "Eject the items first!"
return
if(istype(I, /obj/item/weapon/screwdriver))
if(mode==0) // It's off but still not unscrewed
mode=-1 // Set it to doubleoff l0l
playsound(src.loc, 'Screwdriver.ogg', 50, 1)
@@ -64,6 +64,9 @@
user << "You attach the screws around the power connection."
return
else if(istype(I,/obj/item/weapon/weldingtool) && mode==-1)
if(contents.len > 0)
user << "Eject the items first!"
return
var/obj/item/weapon/weldingtool/W = I
if(W.remove_fuel(0,user))
playsound(src.loc, 'Welder2.ogg', 100, 1)
@@ -73,6 +76,7 @@
if(!src || !W.isOn()) return
user << "You sliced the floorweld off the disposal unit."
var/obj/structure/disposalconstruct/C = new (src.loc)
src.transfer_fingerprints_to(C)
C.ptype = 6 // 6 = disposal unit
C.anchored = 1
C.density = 1
@@ -131,7 +135,7 @@
MouseDrop_T(mob/target, mob/user)
if (!istype(target) || target.buckled || get_dist(user, src) > 1 || get_dist(user, target) > 1 || user.stat || istype(user, /mob/living/silicon/ai))
return
src.add_fingerprint(user)
var/msg
for (var/mob/V in viewers(usr))
if(target == user && !user.stat && !user.weakened && !user.stunned && !user.paralysis)
@@ -812,7 +816,7 @@
var/turf/T = src.loc
if(T.intact)
return // prevent interaction with T-scanner revealed pipes
src.add_fingerprint(user)
if(istype(I, /obj/item/weapon/weldingtool))
var/obj/item/weapon/weldingtool/W = I
@@ -849,7 +853,7 @@
C.ptype = 4
if("pipe-t")
C.ptype = 5
src.transfer_fingerprints_to(C)
C.dir = dir
C.density = 0
C.anchored = 1
@@ -1101,12 +1105,10 @@
if(C && C.anchored)
return
var/turf/T = src.loc
if(T.intact)
return // prevent interaction with T-scanner revealed pipes
src.add_fingerprint(user)
if(istype(I, /obj/item/weapon/weldingtool))
var/obj/item/weapon/weldingtool/W = I
@@ -1223,7 +1225,7 @@
attackby(var/obj/item/I, var/mob/user)
if(!I || !user)
return
src.add_fingerprint(user)
if(istype(I, /obj/item/weapon/screwdriver))
if(mode==0)
mode=1
@@ -1244,6 +1246,7 @@
if(!src || !W.isOn()) return
user << "You sliced the floorweld off the disposal outlet."
var/obj/structure/disposalconstruct/C = new (src.loc)
src.transfer_fingerprints_to(C)
C.ptype = 7 // 7 = outlet
C.update()
C.anchored = 1

View File

@@ -1096,6 +1096,15 @@ datum
materials = list("$metal" = 400, "$gold" = 150, "$silver" = 150, "$glass" = 70)
build_path = "/obj/item/weapon/cell/hyper"
light_replacer
name = "Light Replacer"
desc = "A device to automatically replace lights. Refill with working lightbulbs."
id = "light_replacer"
req_tech = list("magnets" = 3, "materials" = 4)
build_type = PROTOLATHE
materials = list("$metal" = 1500, "$silver" = 150, "$glass" = 3000)
build_path = "/obj/item/device/lightreplacer"
////////////////////////////////////////
//////////////MISC Boards///////////////
////////////////////////////////////////