bb9c09df46
*TABLEPASS was already totally obsolete. FPRINT was used, but it was on virtually everything anyway. Removes those flags from every instance where they were used. Also assigned and removed other flags where it made sense. If it is desired, I can revive the flag as NOFPRINT, which would retain the original functionality, though inverted. That way it would be be used only where it was intentional (holodeck items could use this for example).
36 lines
978 B
Plaintext
36 lines
978 B
Plaintext
/obj/item/stack/tile/light
|
|
name = "light tile"
|
|
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 = 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) |