Implements Tailoring

This commit is contained in:
Fox McCloud
2019-08-26 17:41:39 -04:00
parent 753f8433e9
commit eef0bc919d
46 changed files with 631 additions and 64 deletions
@@ -145,6 +145,11 @@
else
to_chat(user, "<span class='warning'>[affecting] is cut open, you'll need more than a bandage!</span>")
/obj/item/stack/medical/bruise_pack/improvised
name = "improvised gauze"
singular_name = "improvised gauze"
desc = "A roll of cloth roughly cut from something that can stop bleeding, but does not heal wounds."
stop_bleeding = 900
/obj/item/stack/medical/bruise_pack/advanced
name = "advanced trauma kit"
@@ -182,6 +182,7 @@ var/global/list/datum/stack_recipe/wood_recipes = list(
new /datum/stack_recipe("rake", /obj/item/cultivator/rake, 5, time = 10),
new /datum/stack_recipe("ore box", /obj/structure/ore_box, 4, time = 50, one_per_turf = TRUE, on_floor = TRUE),
new /datum/stack_recipe("baseball bat", /obj/item/melee/baseball_bat, 5, time = 15),
new /datum/stack_recipe("loom", /obj/structure/loom, 10, time = 15, one_per_turf = TRUE, on_floor = TRUE), \
new /datum/stack_recipe("fermenting barrel", /obj/structure/fermenting_barrel, 30, time = 50),
new /datum/stack_recipe("firebrand", /obj/item/match/firebrand, 2, time = 100)
)
@@ -204,8 +205,9 @@ var/global/list/datum/stack_recipe/wood_recipes = list(
* Cloth
*/
var/global/list/datum/stack_recipe/cloth_recipes = list ( \
new/datum/stack_recipe("grey jumpsuit", /obj/item/clothing/under/color/grey, 3), \
new/datum/stack_recipe("black shoes", /obj/item/clothing/shoes/black, 2), \
new/datum/stack_recipe("white jumpsuit", /obj/item/clothing/under/color/white, 3), \
new/datum/stack_recipe("white shoes", /obj/item/clothing/shoes/white, 2), \
new/datum/stack_recipe("white scarf", /obj/item/clothing/accessory/scarf/white, 1), \
null, \
new/datum/stack_recipe("backpack", /obj/item/storage/backpack, 4), \
new/datum/stack_recipe("dufflebag", /obj/item/storage/backpack/duffel, 6), \
@@ -216,11 +218,14 @@ var/global/list/datum/stack_recipe/cloth_recipes = list ( \
new/datum/stack_recipe("chemistry bag", /obj/item/storage/bag/chemistry, 4), \
new/datum/stack_recipe("bio bag", /obj/item/storage/bag/bio, 4), \
null, \
new/datum/stack_recipe("improvised gauze", /obj/item/stack/medical/bruise_pack/improvised, 1, 2, 6), \
new/datum/stack_recipe("rag", /obj/item/reagent_containers/glass/rag, 1), \
new/datum/stack_recipe("bedsheet", /obj/item/bedsheet, 3), \
null, \
new/datum/stack_recipe("fingerless gloves", /obj/item/clothing/gloves/fingerless, 1), \
new/datum/stack_recipe("black gloves", /obj/item/clothing/gloves/color/black, 3), \
new/datum/stack_recipe("white gloves", /obj/item/clothing/gloves/color/white, 3), \
new/datum/stack_recipe("white softcap", /obj/item/clothing/head/soft/mime, 2), \
new/datum/stack_recipe("white beanie", /obj/item/clothing/head/beanie, 2), \
null, \
new/datum/stack_recipe("blindfold", /obj/item/clothing/glasses/sunglasses/blindfold, 3), \
)
@@ -243,6 +248,49 @@ var/global/list/datum/stack_recipe/cloth_recipes = list ( \
/obj/item/stack/sheet/cloth/ten
amount = 10
GLOBAL_LIST_INIT(durathread_recipes, list ( \
new/datum/stack_recipe("durathread jumpsuit", /obj/item/clothing/under/misc/durathread, 4, time = 40),
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), \
))
/obj/item/stack/sheet/durathread
name = "durathread"
desc = "A fabric sown from incredibly durable threads, known for its usefulness in armor production."
singular_name = "durathread roll"
icon_state = "sheet-durathread"
item_state = "sheet-cloth"
resistance_flags = FLAMMABLE
force = 0
throwforce = 0
merge_type = /obj/item/stack/sheet/durathread
/obj/item/stack/sheet/durathread/Initialize(mapload, new_amount, merge = TRUE)
recipes = GLOB.durathread_recipes
return ..()
/obj/item/stack/sheet/cotton
name = "raw cotton bundle"
desc = "A bundle of raw cotton ready to be spun on the loom."
singular_name = "raw cotton ball"
icon_state = "sheet-cotton"
resistance_flags = FLAMMABLE
force = 0
throwforce = 0
merge_type = /obj/item/stack/sheet/cotton
var/pull_effort = 30
var/loom_result = /obj/item/stack/sheet/cloth
/obj/item/stack/sheet/cotton/durathread
name = "raw durathread bundle"
desc = "A bundle of raw durathread ready to be spun on the loom."
singular_name = "raw durathread ball"
icon_state = "sheet-durathreadraw"
merge_type = /obj/item/stack/sheet/cotton/durathread
pull_effort = 70
loom_result = /obj/item/stack/sheet/durathread
/*
* Cardboard
*/
@@ -251,7 +251,7 @@
new /obj/item/melee/baton/loaded(src)
new /obj/item/clothing/glasses/sunglasses(src)
new /obj/item/clothing/glasses/hud/security/sunglasses/read_only(src)
new /obj/item/clothing/glasses/hud/health/health_advanced
new /obj/item/clothing/glasses/hud/health/sunglasses
new /obj/item/clothing/head/beret/centcom/officer(src)
new /obj/item/clothing/head/beret/centcom/officer/navy(src)
new /obj/item/clothing/suit/armor/vest/blueshield(src)
+38
View File
@@ -0,0 +1,38 @@
#define FABRIC_PER_SHEET 4
///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/attackby(obj/item/I, mob/user)
if(default_unfasten_wrench(user, I, 5))
return
if(weave(I, user))
return
return ..()
///Handles the weaving.
/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>", 1)
return FALSE
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>", 1)
return FALSE
user.show_message("<span class='notice'>You start weaving \the [W.name] through the loom..</span>", 1)
if(do_after(user, W.pull_effort, target = src))
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>", 1)
return TRUE
#undef FABRIC_PER_SHEET