Files
GS13NG/code/game/objects/items/stacks/tiles/light.dm
2017-08-24 19:24:25 -07:00

31 lines
806 B
Plaintext

/obj/item/stack/tile/light
name = "light tile"
singular_name = "light floor tile"
desc = "A floor tile, made out of glass. It produces light."
icon_state = "tile_e"
flags_1 = CONDUCT_1
attack_verb = list("bashed", "battered", "bludgeoned", "thrashed", "smashed")
turf_type = /turf/open/floor/light
var/state = 0
/obj/item/stack/tile/light/Initialize(mapload, new_amount, merge = TRUE)
. = ..()
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(obj/item/O, mob/user, params)
if(istype(O, /obj/item/crowbar))
new/obj/item/stack/sheet/metal(user.loc)
amount--
new/obj/item/stack/light_w(user.loc)
if(amount <= 0)
qdel(src)
else
return ..()