mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2025-12-26 10:02:28 +00:00
git-svn-id: http://tgstation13.googlecode.com/svn/trunk@5434 316c924e-a436-60f5-8080-3fe189b3f50e
36 lines
1000 B
Plaintext
36 lines
1000 B
Plaintext
/obj/item/stack/tile/light
|
|
name = "light tiles"
|
|
singular_name = "light floor tile"
|
|
desc = "A floor tile, made out off glass. It produces light."
|
|
icon_state = "tile_e"
|
|
w_class = 3.0
|
|
force = 3.0
|
|
throwforce = 5.0
|
|
throw_speed = 5
|
|
throw_range = 20
|
|
flags = FPRINT | TABLEPASS | CONDUCT
|
|
max_amount = 60
|
|
attack_verb = list("bashed", "battered", "bludgeoned", "thrashed", "smashed")
|
|
var/on = 1
|
|
var/state //0 = fine, 1 = flickering, 2 = breaking, 3 = broken
|
|
|
|
/obj/item/stack/tile/light/New(var/loc, var/amount=null)
|
|
..()
|
|
if(prob(5))
|
|
state = 3 //broken
|
|
else if(prob(5))
|
|
state = 2 //breaking
|
|
else if(prob(10))
|
|
state = 1 //flickering occasionally
|
|
else
|
|
state = 0 //fine
|
|
|
|
/obj/item/stack/tile/light/attackby(var/obj/item/O as obj, var/mob/user as mob)
|
|
..()
|
|
if(istype(O,/obj/item/weapon/crowbar))
|
|
new/obj/item/stack/sheet/metal(user.loc)
|
|
amount--
|
|
new/obj/item/stack/light_w(user.loc)
|
|
if(amount <= 0)
|
|
user.drop_from_inventory(src)
|
|
del(src) |