Implement remove_item_from_storage properly, syndi toolbox tool color update

This commit is contained in:
Markolie
2015-09-16 01:54:34 +02:00
parent 2098933ee4
commit 0741669bd6
7 changed files with 29 additions and 18 deletions
+4
View File
@@ -731,8 +731,12 @@ obj/item/toy/cards/deck/MouseDrop(atom/over_object)
else if(istype(over_object, /obj/screen))
switch(over_object.name)
if("l_hand")
if(!remove_item_from_storage(M))
M.unEquip(src)
M.put_in_l_hand(src)
else if("r_hand")
if(!remove_item_from_storage(M))
M.unEquip(src)
M.put_in_r_hand(src)
usr << "<span class='notice'>You pick up the deck.</span>"
else
+2 -1
View File
@@ -131,7 +131,8 @@ var/last_chew = 0
var/obj/item/stack/rods/R = I
if (R.use(1))
var/obj/item/weapon/wirerod/W = new /obj/item/weapon/wirerod
user.unEquip(src)
if(!remove_item_from_storage(user))
user.unEquip(src)
user.put_in_hands(W)
user << "<span class='notice'>You wrap the cable restraint around the top of the rod.</span>"
qdel(src)
@@ -84,10 +84,10 @@
New()
..()
new /obj/item/weapon/screwdriver(src)
new /obj/item/weapon/screwdriver(src, "red")
new /obj/item/weapon/wrench(src)
new /obj/item/weapon/weldingtool/largetank(src)
new /obj/item/weapon/crowbar(src)
new /obj/item/weapon/wirecutters(src)
new /obj/item/weapon/crowbar/red(src)
new /obj/item/weapon/wirecutters(src, "red")
new /obj/item/device/multitool(src)
new /obj/item/clothing/gloves/combat(src)
+3 -2
View File
@@ -112,8 +112,9 @@
sharp = 1
edge = 1
/obj/item/weapon/wirecutters/New()
if(prob(50))
/obj/item/weapon/wirecutters/New(loc, var/param_color = null)
..()
if((!param_color && prob(50)) || param_color == "yellow")
icon_state = "cutters-y"
item_state = "cutters_yellow"
+5 -3
View File
@@ -159,9 +159,10 @@ obj/item/weapon/wirerod/attackby(var/obj/item/I, mob/user as mob, params)
..()
if(istype(I, /obj/item/weapon/shard))
var/obj/item/weapon/twohanded/spear/S = new /obj/item/weapon/twohanded/spear
if(!remove_item_from_storage(user))
user.unEquip(src)
user.unEquip(I)
user.unEquip(src)
user.put_in_hands(S)
user << "<span class='notice'>You fasten the glass shard to the top of the rod with the cable.</span>"
@@ -171,8 +172,9 @@ obj/item/weapon/wirerod/attackby(var/obj/item/I, mob/user as mob, params)
else if(istype(I, /obj/item/weapon/wirecutters))
var/obj/item/weapon/melee/baton/cattleprod/P = new /obj/item/weapon/melee/baton/cattleprod
if(!remove_item_from_storage(user))
user.unEquip(src)
user.unEquip(I)
user.unEquip(src)
user.put_in_hands(P)
user << "<span class='notice'>You fasten the wirecutters to the top of the rod with the cable, prongs outward.</span>"