From ae62566dce949de6d47d1005d6abaedfc37a00ad Mon Sep 17 00:00:00 2001 From: Ghom <42542238+Ghommie@users.noreply.github.com> Date: Thu, 28 May 2020 09:37:22 +0200 Subject: [PATCH] Fixing some issues with the now unneeded hack for looms. (#12350) --- .../items/stacks/sheets/sheet_types.dm | 9 +++------ .../objects/items/stacks/sheets/sheets.dm | 3 --- code/game/objects/structures/loom.dm | 20 +++++++++---------- 3 files changed, 13 insertions(+), 19 deletions(-) diff --git a/code/game/objects/items/stacks/sheets/sheet_types.dm b/code/game/objects/items/stacks/sheets/sheet_types.dm index f26f3587a4..41822491f8 100644 --- a/code/game/objects/items/stacks/sheets/sheet_types.dm +++ b/code/game/objects/items/stacks/sheets/sheet_types.dm @@ -404,8 +404,6 @@ GLOBAL_LIST_INIT(cloth_recipes, list ( \ resistance_flags = FLAMMABLE force = 0 throwforce = 0 - pull_effort = 90 - is_fabric = TRUE merge_type = /obj/item/stack/sheet/cloth /obj/item/stack/sheet/cloth/get_main_recipes() @@ -426,7 +424,7 @@ GLOBAL_LIST_INIT(durathread_recipes, list ( \ new/datum/stack_recipe("durathread beret", /obj/item/clothing/head/beret/durathread, 2, time = 40), \ new/datum/stack_recipe("durathread beanie", /obj/item/clothing/head/beanie/durathread, 2, time = 40), \ new/datum/stack_recipe("durathread bandana", /obj/item/clothing/mask/bandana/durathread, 1, time = 25), \ - new/datum/stack_recipe("durathread string", /obj/item/weaponcrafting/durathread_string, 1, time = 40) \ + new/datum/stack_recipe("durathread string", /obj/item/weaponcrafting/durathread_string, 1, time = 40), \ )) /obj/item/stack/sheet/durathread @@ -818,13 +816,12 @@ new /datum/stack_recipe("paper frame door", /obj/structure/mineral_door/paperfra max_amount = 80 singular_name = "raw cotton ball" icon_state = "sheet-cotton" - is_fabric = TRUE resistance_flags = FLAMMABLE force = 0 throwforce = 0 merge_type = /obj/item/stack/sheet/cotton - pull_effort = 30 - loom_result = /obj/item/stack/sheet/cloth + var/pull_effort = 30 + var/loom_result = /obj/item/stack/sheet/cloth /obj/item/stack/sheet/cotton/ten amount = 10 diff --git a/code/game/objects/items/stacks/sheets/sheets.dm b/code/game/objects/items/stacks/sheets/sheets.dm index 378855707e..dfba533247 100644 --- a/code/game/objects/items/stacks/sheets/sheets.dm +++ b/code/game/objects/items/stacks/sheets/sheets.dm @@ -13,9 +13,6 @@ mats_per_stack = MINERAL_MATERIAL_AMOUNT var/sheettype = null //this is used for girders in the creation of walls/false walls var/point_value = 0 //turn-in value for the gulag stacker - loosely relative to its rarity - var/is_fabric = FALSE //is this a valid material for the loom? - var/loom_result //result from pulling on the loom - var/pull_effort = 0 //amount of delay when pulling on the loom var/shard_type // the shard debris typepath left over by solar panels and windows etc. /obj/item/stack/sheet/Initialize(mapload, new_amount, merge) diff --git a/code/game/objects/structures/loom.dm b/code/game/objects/structures/loom.dm index ad128b01c2..164e597117 100644 --- a/code/game/objects/structures/loom.dm +++ b/code/game/objects/structures/loom.dm @@ -21,21 +21,21 @@ return TRUE ///Handles the weaving. -/obj/structure/loom/proc/weave(obj/item/stack/sheet/S, mob/user) - if(!istype(S) || !S.is_fabric) +/obj/structure/loom/proc/weave(obj/item/stack/sheet/cotton/W, mob/user) + if(!istype(W)) return FALSE if(!anchored) user.show_message("The loom needs to be wrenched down.", MSG_VISUAL) return FALSE - if(S.amount < FABRIC_PER_SHEET) - user.show_message("You need at least [FABRIC_PER_SHEET] units of fabric before using this.", 1) + if(W.amount < FABRIC_PER_SHEET) + user.show_message("You need at least [FABRIC_PER_SHEET] units of fabric before using this.", MSG_VISUAL) return FALSE - user.show_message("You start weaving \the [S.name] through the loom..", MSG_VISUAL) - if(S.use_tool(src, user, S.pull_effort)) - if(S.amount >= FABRIC_PER_SHEET) - new S.loom_result(drop_location()) - S.use(FABRIC_PER_SHEET) - user.show_message("You weave \the [S.name] into a workable fabric.", MSG_VISUAL) + user.show_message("You start weaving \the [W.name] through the loom..", MSG_VISUAL) + if(W.use_tool(src, user, W.pull_effort)) + if(W.amount >= FABRIC_PER_SHEET) + new W.loom_result(drop_location()) + W.use(FABRIC_PER_SHEET) + user.show_message("You weave \the [W.name] into a workable fabric.", MSG_VISUAL) return TRUE #undef FABRIC_PER_SHEET \ No newline at end of file