[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>
This commit is contained in:
SkyratBot
2023-04-09 03:29:51 +02:00
committed by GitHub
parent b11ff5a47d
commit fc5d5a9fe3
4 changed files with 82 additions and 27 deletions
@@ -520,10 +520,14 @@ GLOBAL_LIST_INIT(durathread_recipes, list ( \
force = 0
throwforce = 0
merge_type = /obj/item/stack/sheet/cotton
var/pull_effort = 10
var/pull_effort = 1 SECONDS
var/loom_result = /obj/item/stack/sheet/cloth
grind_results = list(/datum/reagent/cellulose = 20)
/obj/item/stack/sheet/cotton/Initialize(mapload)
. = ..()
AddComponent(/datum/component/loomable, resulting_item = loom_result, loom_time = pull_effort)
/obj/item/stack/sheet/cotton/durathread
name = "raw durathread bundle"
desc = "A bundle of raw durathread ready to be spun on the loom."