Files
Aurora.3/code/game/objects/items/stacks/sheets/light.dm
mwerezak 0ceb0e291d Fixes #10314
Replaces every check for a hardcoded material stack type with a check
for material of the stack.
2015-08-02 00:01:10 -04:00

34 lines
1.0 KiB
Plaintext

/obj/item/stack/light_w
name = "wired glass tile"
singular_name = "wired glass floor tile"
desc = "A glass tile, which is wired, somehow."
icon_state = "glass_wire"
w_class = 3.0
force = 3.0
throwforce = 5.0
throw_speed = 5
throw_range = 20
flags = CONDUCT
max_amount = 60
/obj/item/stack/light_w/attackby(var/obj/item/O as obj, var/mob/user as mob)
..()
if(istype(O,/obj/item/weapon/wirecutters))
var/obj/item/stack/cable_coil/CC = new/obj/item/stack/cable_coil(user.loc)
CC.amount = 5
amount--
new/obj/item/stack/material/glass(user.loc)
if(amount <= 0)
user.drop_from_inventory(src)
qdel(src)
if(istype(O,/obj/item/stack/material) && O.get_material_name() == DEFAULT_WALL_MATERIAL)
var/obj/item/stack/M = O
if (M.use(1))
use(1)
new/obj/item/stack/tile/light(get_turf(user))
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