mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-08-28 22:48:38 +01:00
Stack update
This commit is contained in:
@@ -34,25 +34,29 @@
|
||||
..()
|
||||
if(istype(W,/obj/item/stack/cable_coil))
|
||||
var/obj/item/stack/cable_coil/CC = W
|
||||
if(CC.amount < 5)
|
||||
user << "\b There is not enough wire in this coil. You need 5 lengths."
|
||||
if (get_amount() < 1 || CC.get_amount() < 5)
|
||||
user << "<span class='warning>You need five lengths of coil and one sheet of glass to make wired glass.</span>"
|
||||
return
|
||||
CC.use(5)
|
||||
user << "\blue You attach wire to the [name]."
|
||||
use(1)
|
||||
user << "<span class='notice'>You attach wire to the [name].</span>"
|
||||
new /obj/item/stack/light_w(user.loc)
|
||||
src.use(1)
|
||||
else if( istype(W, /obj/item/stack/rods) )
|
||||
else if(istype(W, /obj/item/stack/rods))
|
||||
var/obj/item/stack/rods/V = W
|
||||
var/obj/item/stack/sheet/rglass/RG = new (user.loc)
|
||||
RG.add_fingerprint(user)
|
||||
RG.add_to_stacks(user)
|
||||
V.use(1)
|
||||
var/obj/item/stack/sheet/glass/G = src
|
||||
src = null
|
||||
var/replace = (user.get_inactive_hand()==G)
|
||||
G.use(1)
|
||||
if (!G && !RG && replace)
|
||||
user.put_in_hands(RG)
|
||||
if (V.get_amount() >= 1 && get_amount() >= 1)
|
||||
var/obj/item/stack/sheet/rglass/RG = new (user.loc)
|
||||
RG.add_fingerprint(user)
|
||||
RG.add_to_stacks(user)
|
||||
var/obj/item/stack/sheet/glass/G = src
|
||||
src = null
|
||||
var/replace = (user.get_inactive_hand()==G)
|
||||
V.use(1)
|
||||
G.use(1)
|
||||
if (!G && replace)
|
||||
user.put_in_hands(RG)
|
||||
else
|
||||
user << "<span class='warning'>You need one rod and one sheet of glass to make reinforced glass.</span>"
|
||||
return
|
||||
else
|
||||
return ..()
|
||||
|
||||
|
||||
@@ -24,12 +24,10 @@
|
||||
|
||||
if(istype(O,/obj/item/stack/sheet/metal))
|
||||
var/obj/item/stack/sheet/metal/M = O
|
||||
M.amount--
|
||||
if(M.amount <= 0)
|
||||
user.drop_from_inventory(M)
|
||||
del(M)
|
||||
amount--
|
||||
new/obj/item/stack/tile/light(user.loc)
|
||||
if(amount <= 0)
|
||||
user.drop_from_inventory(src)
|
||||
del(src)
|
||||
if (M.use(1))
|
||||
use(1)
|
||||
new/obj/item/stack/tile/light(user.loc)
|
||||
user << "<span class='notice'>You make a light tile.</span>"
|
||||
else
|
||||
user << "<span class='warning'>You need one metal sheet to finish the light tile.</span>"
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user