Fixing some issues with the now unneeded hack for looms. (#12350)

This commit is contained in:
Ghom
2020-05-28 09:37:22 +02:00
committed by GitHub
parent 8be491f32f
commit ae62566dce
3 changed files with 13 additions and 19 deletions

View File

@@ -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

View File

@@ -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)

View File

@@ -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("<span class='notice'>The loom needs to be wrenched down.</span>", MSG_VISUAL)
return FALSE
if(S.amount < FABRIC_PER_SHEET)
user.show_message("<span class='notice'>You need at least [FABRIC_PER_SHEET] units of fabric before using this.</span>", 1)
if(W.amount < FABRIC_PER_SHEET)
user.show_message("<span class='notice'>You need at least [FABRIC_PER_SHEET] units of fabric before using this.</span>", MSG_VISUAL)
return FALSE
user.show_message("<span class='notice'>You start weaving \the [S.name] through the loom..</span>", 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("<span class='notice'>You weave \the [S.name] into a workable fabric.</span>", MSG_VISUAL)
user.show_message("<span class='notice'>You start weaving \the [W.name] through the loom..</span>", 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("<span class='notice'>You weave \the [W.name] into a workable fabric.</span>", MSG_VISUAL)
return TRUE
#undef FABRIC_PER_SHEET