mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-29 08:08:49 +01:00
Righted some checks.
If newcolor
This commit is contained in:
@@ -568,13 +568,15 @@ Auto Patrol[]"},
|
||||
icon_state = "ed209_legs"
|
||||
|
||||
if(2)
|
||||
var/newcolor = ""
|
||||
if(istype(W, /obj/item/clothing/suit/redtag))
|
||||
lasercolor = "r"
|
||||
newcolor = "r"
|
||||
else if(istype(W, /obj/item/clothing/suit/bluetag))
|
||||
lasercolor = "b"
|
||||
if(lasercolor || istype(W, /obj/item/clothing/suit/armor/vest))
|
||||
newcolor = "b"
|
||||
if(newcolor || istype(W, /obj/item/clothing/suit/armor/vest))
|
||||
if(!user.unEquip(W))
|
||||
return
|
||||
lasercolor = newcolor
|
||||
qdel(W)
|
||||
build_step++
|
||||
user << "<span class='notice'>You add the armor to [src].</span>"
|
||||
@@ -638,23 +640,25 @@ Auto Patrol[]"},
|
||||
name = "wired ED-209 assembly"
|
||||
|
||||
if(7)
|
||||
var/newname = ""
|
||||
switch(lasercolor)
|
||||
if("b")
|
||||
if(!istype(W, /obj/item/weapon/gun/energy/laser/bluetag))
|
||||
return
|
||||
name = "bluetag ED-209 assembly"
|
||||
newname = "bluetag ED-209 assembly"
|
||||
if("r")
|
||||
if(!istype(W, /obj/item/weapon/gun/energy/laser/redtag))
|
||||
return
|
||||
name = "redtag ED-209 assembly"
|
||||
newname = "redtag ED-209 assembly"
|
||||
if("")
|
||||
if(!istype(W, /obj/item/weapon/gun/energy/gun/advtaser))
|
||||
return
|
||||
name = "taser ED-209 assembly"
|
||||
newname = "taser ED-209 assembly"
|
||||
else
|
||||
return
|
||||
if(!user.unEquip(W))
|
||||
return
|
||||
name = newname
|
||||
build_step++
|
||||
user << "<span class='notice'>You add [W] to [src].</span>"
|
||||
item_state = "[lasercolor]ed209_taser"
|
||||
|
||||
@@ -60,9 +60,9 @@
|
||||
..()
|
||||
if (istype(W, /obj/item/weapon/coin))
|
||||
var/obj/item/weapon/coin/C = W
|
||||
user << "<span class='notice'>You add the [C.name] into the bag.</span>"
|
||||
if(!user.drop_item())
|
||||
return
|
||||
user << "<span class='notice'>You add the [C.name] into the bag.</span>"
|
||||
contents += C
|
||||
if (istype(W, /obj/item/weapon/moneybag))
|
||||
var/obj/item/weapon/moneybag/C = W
|
||||
|
||||
@@ -532,9 +532,9 @@
|
||||
else if(U.locked)
|
||||
user << "<span class='warning'>The upgrade is locked and cannot be used yet!</span>"
|
||||
else
|
||||
if(!user.drop_item())
|
||||
return
|
||||
if(U.action(src))
|
||||
if(!user.drop_item())
|
||||
return
|
||||
user << "<span class='notice'>You apply the upgrade to [src].</span>"
|
||||
U.loc = src
|
||||
else
|
||||
|
||||
@@ -43,9 +43,9 @@
|
||||
|
||||
/obj/structure/filingcabinet/attackby(obj/item/P, mob/user, params)
|
||||
if(istype(P, /obj/item/weapon/paper) || istype(P, /obj/item/weapon/folder) || istype(P, /obj/item/weapon/photo) || istype(P, /obj/item/documents))
|
||||
user << "<span class='notice'>You put [P] in [src].</span>"
|
||||
if(!user.drop_item())
|
||||
return
|
||||
user << "<span class='notice'>You put [P] in [src].</span>"
|
||||
P.loc = src
|
||||
icon_state = "[initial(icon_state)]-open"
|
||||
sleep(5)
|
||||
|
||||
@@ -55,9 +55,9 @@
|
||||
/obj/item/weapon/hand_labeler/attackby(obj/item/I as obj, mob/user as mob, params)
|
||||
..()
|
||||
if(istype(I, /obj/item/hand_labeler_refill))
|
||||
user << "<span class='notice'>You insert [I] into [src].</span>"
|
||||
if(!user.unEquip(I))
|
||||
return
|
||||
user << "<span class='notice'>You insert [I] into [src].</span>"
|
||||
qdel(I)
|
||||
labels_left = initial(labels_left)
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user