From 5ef9779bacbc89691698033f5b71c110d5da5f79 Mon Sep 17 00:00:00 2001 From: Aronai Sieyes Date: Sun, 11 Jul 2021 15:04:14 -0400 Subject: [PATCH] Primitive bandages and cloth recipes --- code/datums/components/crafting/recipes.dm | 15 ++++----------- .../components/crafting/recipes/primitive.dm | 13 +++++++++++++ .../datums/components/crafting/recipes/weapons.dm | 9 +++++++++ vorestation.dme | 2 ++ 4 files changed, 28 insertions(+), 11 deletions(-) create mode 100644 code/datums/components/crafting/recipes/primitive.dm create mode 100644 code/datums/components/crafting/recipes/weapons.dm diff --git a/code/datums/components/crafting/recipes.dm b/code/datums/components/crafting/recipes.dm index 5d4cd12c613..bd5aec33954 100644 --- a/code/datums/components/crafting/recipes.dm +++ b/code/datums/components/crafting/recipes.dm @@ -5,7 +5,10 @@ /datum/crafting_recipe var/name = "" //in-game display name - var/list/reqs = list() //type paths of items consumed associated with how many are needed + /// type paths of items consumed associated with how many are needed + /// Note that stacks have special handling: the logic accounts for having '23' available + /// in the case of just having one stack of 23 amount, so stack/steel = 23 is fine + var/list/reqs = list() var/list/blacklist = list() //type paths of items explicitly not allowed as an ingredient var/result //type path of item resulting from this craft /// String defines of items needed but not consumed. Lazy list. @@ -44,13 +47,3 @@ /datum/crafting_recipe/proc/on_craft_completion(mob/user, atom/result) return - -/datum/crafting_recipe/stunprod - name = "Stunprod" - result = /obj/item/weapon/melee/baton/cattleprod - reqs = list(/obj/item/weapon/handcuffs/cable = 1, - /obj/item/stack/rods = 1, - /obj/item/weapon/tool/wirecutters = 1) - time = 40 - category = CAT_WEAPONRY - subcategory = CAT_WEAPON \ No newline at end of file diff --git a/code/datums/components/crafting/recipes/primitive.dm b/code/datums/components/crafting/recipes/primitive.dm new file mode 100644 index 00000000000..064fd63020b --- /dev/null +++ b/code/datums/components/crafting/recipes/primitive.dm @@ -0,0 +1,13 @@ +/datum/crafting_recipe/cloth + name = "Cloth bolt" + result = /obj/item/stack/material/cloth + reqs = list(/obj/item/stack/material/fiber = 3) + time = 40 + category = CAT_PRIMAL + +/datum/crafting_recipe/crude_bandage + name = "Crude bandages (x10)" + result = /obj/item/stack/medical/crude_pack + reqs = list(/obj/item/stack/material/cloth = 2) + time = 40 + category = CAT_PRIMAL diff --git a/code/datums/components/crafting/recipes/weapons.dm b/code/datums/components/crafting/recipes/weapons.dm new file mode 100644 index 00000000000..32a8b2cc4e6 --- /dev/null +++ b/code/datums/components/crafting/recipes/weapons.dm @@ -0,0 +1,9 @@ +/datum/crafting_recipe/stunprod + name = "Stunprod" + result = /obj/item/weapon/melee/baton/cattleprod + reqs = list(/obj/item/weapon/handcuffs/cable = 1, + /obj/item/stack/rods = 1, + /obj/item/weapon/tool/wirecutters = 1) + time = 40 + category = CAT_WEAPONRY + subcategory = CAT_WEAPON \ No newline at end of file diff --git a/vorestation.dme b/vorestation.dme index 6ff4fb50850..2229a80cbd1 100644 --- a/vorestation.dme +++ b/vorestation.dme @@ -356,6 +356,8 @@ #include "code\datums\components\crafting\crafting_external.dm" #include "code\datums\components\crafting\recipes.dm" #include "code\datums\components\crafting\tool_quality.dm" +#include "code\datums\components\crafting\recipes\primitive.dm" +#include "code\datums\components\crafting\recipes\weapons.dm" #include "code\datums\elements\_element.dm" #include "code\datums\elements\light_blocking.dm" #include "code\datums\elements\turf_transparency.dm"