Files
Bubberstation/code/game/objects/structures/loom.dm
SkyratBot fc5d5a9fe3 [MIRROR] Componentizes loomability [MDB IGNORE] (#20424)
* Componentizes loomability (#74552)

## About The Pull Request

As shrimple as the title might imply, the ability for an item to be
processed in a loom is now a component.

Behavior on looming cotton, durathread, and wool, should all be the
exact same in terms of cost, time, results, etc.
## Why It's Good For The Game

If, for any reason, someone might want to extend the behavior of "this
thing can be loomed" to other items, it can be done.
## Changelog
🆑
code: The ability for objects to be loomed is now a component, with all
of the looming behavior moved off of the structure and into said
component. The actual behavior for looming cotton (clicking on a loom
with cotton) is completely unchanged.
/🆑

---------

Co-authored-by: Zephyr <12817816+ZephyrTFA@ users.noreply.github.com>

* Componentizes loomability

---------

Co-authored-by: Paxilmaniac <82386923+Paxilmaniac@users.noreply.github.com>
Co-authored-by: Zephyr <12817816+ZephyrTFA@ users.noreply.github.com>
2023-04-09 02:29:51 +01:00

25 lines
820 B
Plaintext

///This is a loom. It's usually made out of wood and used to weave fabric like durathread or cotton into their respective cloth types.
/obj/structure/loom
name = "loom"
desc = "A simple device used to weave cloth and other thread-based fabrics together into usable material."
icon = 'icons/obj/hydroponics/equipment.dmi'
icon_state = "loom"
density = TRUE
anchored = TRUE
/obj/structure/loom/Initialize(mapload)
. = ..()
var/static/list/hovering_item_typechecks = list(
/obj/item/stack/sheet/cotton = list(
SCREENTIP_CONTEXT_LMB = "Weave",
),
)
AddElement(/datum/element/contextual_screentip_item_typechecks, hovering_item_typechecks)
/obj/structure/loom/wrench_act(mob/living/user, obj/item/tool)
. = ..()
default_unfasten_wrench(user, tool, time = 0.5 SECONDS)
return TOOL_ACT_TOOLTYPE_SUCCESS