Files
BatrachophrenoandGitHub 5277251959 Tool behaviors port (#21663)
For a robust crafting system, I need a new materials framework.
For a new materials framework, I need to clean up reagents.
To clean up reagents, I need to pare down foods from reagent holders.
To pare down foods from reagent holders, I need to port edibility
components.
To port edibility components, I need to port processing components.
To port processing components, I need to port tool behaviors.

This is all back-end code, no new features or functionality from this.
2026-01-27 08:44:49 +00:00

38 lines
1.1 KiB
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"
attack_verb = list("bashed", "battered", "bludgeoned", "thrashed", "smashed")
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/attacking_item, mob/user)
if(attacking_item.tool_behaviour == TOOL_CROWBAR)
amount--
to_chat(user, SPAN_NOTICE("You pry off the steel sheet from the [name]."))
attacking_item.play_tool_sound(get_turf(src), 100)
new /obj/item/stack/material/glass/wired(user.loc)
new /obj/item/stack/material/steel(user.loc)
if(amount <= 0)
qdel(src)
else
return ..()
/obj/item/stack/tile/light/attack_self(mob/user)
amount--
playsound(src.loc, 'sound/items/Deconstruct.ogg', 80, 1)
new /obj/machinery/floor_light(user.loc)
if(amount <= 0)
qdel(src)