mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2025-12-31 20:11:56 +00:00
* Tiles are now (mostly) pooled objects Floors no longer have a builtin_tile, but instead use PoolOrNew(). Also added a do-nothing SSpool so you can inspect the global pool. * Entries for time keeping * MORE STATISTICS * Stat tracking, auto filling * Code review I * Code review II * Code review III
39 lines
1.1 KiB
Plaintext
39 lines
1.1 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 = 'icons/obj/tiles.dmi'
|
|
icon_state = "glass_wire"
|
|
w_class = 3
|
|
force = 3
|
|
throwforce = 5
|
|
throw_speed = 3
|
|
throw_range = 7
|
|
flags = CONDUCT
|
|
max_amount = 60
|
|
|
|
/obj/item/stack/light_w/attackby(obj/item/O, mob/user, params)
|
|
|
|
if(istype(O,/obj/item/weapon/wirecutters))
|
|
var/obj/item/stack/cable_coil/CC = new (user.loc)
|
|
CC.amount = 5
|
|
CC.add_fingerprint(user)
|
|
amount--
|
|
var/obj/item/stack/sheet/glass/G = new (user.loc)
|
|
G.add_fingerprint(user)
|
|
if(amount <= 0)
|
|
user.unEquip(src, 1)
|
|
qdel(src)
|
|
|
|
else if(istype(O, /obj/item/stack/sheet/metal))
|
|
var/obj/item/stack/sheet/metal/M = O
|
|
if (M.use(1))
|
|
use(1)
|
|
var/obj/item/L = PoolOrNew(/obj/item/stack/tile/light, user.loc)
|
|
user << "<span class='notice'>You make a light tile.</span>"
|
|
L.add_fingerprint(user)
|
|
else
|
|
user << "<span class='warning'>You need one metal sheet to finish the light tile!</span>"
|
|
else
|
|
return ..()
|