From 3aef9bd9051c140e2e55eeec7a10c499b7a30b37 Mon Sep 17 00:00:00 2001 From: carlarctg <53100513+carlarctg@users.noreply.github.com> Date: Tue, 17 Oct 2023 21:55:39 -0300 Subject: [PATCH] Added more slapcraft recipes, improved its component, fixed base cowboy hat type (#78854) ## About The Pull Request Added slapcraft recipes for: Pillow suits, pillow helmets, bone and sinew tailoring/weaponry, pipeguns, ghetto jetpacks, and pneumatic cannons. The base type of cowboy hats no longer looks and is named like a bounty hunter hat, clarifying the recipe for the heroic laser musket. Fixed an issue where if a slapcraft recipe required more than one instance of its 'primary' slapcrafting item, it wouldn't show the additional instance when examining its recipes. ## Why It's Good For The Game Idk lol ## Changelog :cl: qol: Added slapcraft recipes for: Pillow suits, pillow helmets, bone and sinew tailoring/weaponry, pipeguns, ghetto jetpacks, and pneumatic cannons. code: The base type of cowboy hats no longer looks and is named like a bounty hunter hat, clarifying the recipe for the heroic laser musket. They need cowboy hats not bounty hats. fix: Fixed an issue where if a slapcraft recipe required more than one instance of its 'primary' slapcrafting item, it wouldn't show the additional instance when examining its recipes. /:cl: --- .../components/crafting/slapcrafting.dm | 12 ++++--- code/game/machinery/pipe/construction.dm | 11 +++++++ code/game/objects/items/pillow.dm | 9 ++++++ .../objects/items/stacks/sheets/leather.dm | 30 ++++++++++++++++-- .../items/stacks/sheets/sheet_types.dm | 14 ++++++++ code/modules/clothing/head/hat.dm | 8 +++-- code/modules/clothing/head/jobs.dm | 14 +++++++- icons/obj/clothing/head/cowboy.dmi | Bin 2820 -> 2764 bytes 8 files changed, 88 insertions(+), 10 deletions(-) diff --git a/code/datums/components/crafting/slapcrafting.dm b/code/datums/components/crafting/slapcrafting.dm index 32a901dc73e..e08fa3ad6c6 100644 --- a/code/datums/components/crafting/slapcrafting.dm +++ b/code/datums/components/crafting/slapcrafting.dm @@ -172,16 +172,20 @@ var/amount = initial(cur_recipe.reqs[reagent_ingredient]) string_ingredient_list += "[amount] unit[amount > 1 ? "s" : ""] of [initial(reagent_ingredient.name)]\n" - // Redundant! - if(parent.type == valid_type) - continue var/atom/ingredient = valid_type var/amount = initial(cur_recipe.reqs[ingredient]) + + // If we're about to describe the ingredient that the component is based on, lower the described amount by 1 or remove it outright. + if(parent.type == valid_type) + if(amount > 1) + amount-- + else + continue string_ingredient_list += "[amount > 1 ? ("[amount]" + " of") : "a"] [initial(ingredient.name)]\n" // If we did find ingredients then add them onto the list. if(length(string_ingredient_list)) - to_chat(user, span_boldnotice("Ingredients:")) + to_chat(user, span_boldnotice("Extra Ingredients:")) to_chat(user, examine_block(span_notice(string_ingredient_list))) var/list/tool_list = "" diff --git a/code/game/machinery/pipe/construction.dm b/code/game/machinery/pipe/construction.dm index fc646a3483e..22f66fd1de7 100644 --- a/code/game/machinery/pipe/construction.dm +++ b/code/game/machinery/pipe/construction.dm @@ -104,6 +104,17 @@ Buildable meters //Flipping handled manually due to custom handling for trinary pipes AddComponent(/datum/component/simple_rotation, ROTATION_NO_FLIPPING) + + // Only 'normal' pipes + if(type != /obj/item/pipe/quaternary) + return ..() + var/static/list/slapcraft_recipe_list = list(/datum/crafting_recipe/ghettojetpack, /datum/crafting_recipe/pipegun, /datum/crafting_recipe/smoothbore_disabler, /datum/crafting_recipe/improvised_pneumatic_cannon) + + AddComponent( + /datum/component/slapcrafting,\ + slapcraft_recipes = slapcraft_recipe_list,\ + ) + return ..() /obj/item/pipe/proc/make_from_existing(obj/machinery/atmospherics/make_from) diff --git a/code/game/objects/items/pillow.dm b/code/game/objects/items/pillow.dm index ea7463e210f..5364905bdc9 100644 --- a/code/game/objects/items/pillow.dm +++ b/code/game/objects/items/pillow.dm @@ -32,6 +32,15 @@ force_wielded = 10, \ ) + var/static/list/slapcraft_recipe_list = list(\ + /datum/crafting_recipe/pillow_suit, /datum/crafting_recipe/pillow_hood,\ + ) + + AddComponent( + /datum/component/slapcrafting,\ + slapcraft_recipes = slapcraft_recipe_list,\ + ) + /obj/item/pillow/Destroy(force) . = ..() QDEL_NULL(pillow_trophy) diff --git a/code/game/objects/items/stacks/sheets/leather.dm b/code/game/objects/items/stacks/sheets/leather.dm index bff5e52f0a1..659cee172d1 100644 --- a/code/game/objects/items/stacks/sheets/leather.dm +++ b/code/game/objects/items/stacks/sheets/leather.dm @@ -247,6 +247,20 @@ GLOBAL_LIST_INIT(leather_recipes, list ( \ novariants = TRUE merge_type = /obj/item/stack/sheet/sinew +/obj/item/stack/sheet/sinew/Initialize(mapload, new_amount, merge, list/mat_override, mat_amt) + . = ..() + + // As bone and sinew have just a little too many recipes for this, we'll just split them up. + // Sinew slapcrafting will mostly-sinew recipes, and bones will have mostly-bones recipes. + var/static/list/slapcraft_recipe_list = list(\ + /datum/crafting_recipe/goliathcloak, /datum/crafting_recipe/skilt, /datum/crafting_recipe/drakecloak,\ + ) + + AddComponent( + /datum/component/slapcrafting,\ + slapcraft_recipes = slapcraft_recipe_list,\ + ) + /obj/item/stack/sheet/sinew/wolf name = "wolf sinew" desc = "Long stringy filaments which came from the insides of a wolf." @@ -297,6 +311,16 @@ GLOBAL_LIST_INIT(sinew_recipes, list ( \ layer = MOB_LAYER merge_type = /obj/item/stack/sheet/animalhide/ashdrake +/obj/item/stack/sheet/animalhide/ashdrake/Initialize(mapload, new_amount, merge, list/mat_override, mat_amt) + . = ..() + + var/static/list/slapcraft_recipe_list = list(/datum/crafting_recipe/drakecloak) + + AddComponent( + /datum/component/slapcrafting,\ + slapcraft_recipes = slapcraft_recipe_list,\ + ) + //Step one - dehairing. /obj/item/stack/sheet/animalhide/attackby(obj/item/W, mob/user, params) @@ -354,8 +378,8 @@ GLOBAL_LIST_INIT(sinew_recipes, list ( \ AddComponent(/datum/component/bakeable, /obj/item/stack/sheet/leather, rand(15 SECONDS, 20 SECONDS), TRUE, TRUE) /obj/item/stack/sheet/wethide/burn() - visible_message(span_notice("[src] burns up, leaving a sheet of leather behind!")) - new /obj/item/stack/sheet/leather(loc) // only one sheet remains to incentivise not burning your wethide to dry it + visible_message(span_notice("[src] dries up!")) + new /obj/item/stack/sheet/leather(loc, amount) // all the sheets to incentivize not losing your whole stack by accident qdel(src) /obj/item/stack/sheet/wethide/should_atmos_process(datum/gas_mixture/air, exposed_temperature) @@ -364,6 +388,6 @@ GLOBAL_LIST_INIT(sinew_recipes, list ( \ /obj/item/stack/sheet/wethide/atmos_expose(datum/gas_mixture/air, exposed_temperature) wetness-- if(wetness == 0) - new /obj/item/stack/sheet/leather(drop_location(), 1) + new /obj/item/stack/sheet/leather(drop_location(), amount) wetness = initial(wetness) use(1) diff --git a/code/game/objects/items/stacks/sheets/sheet_types.dm b/code/game/objects/items/stacks/sheets/sheet_types.dm index 182666862eb..4b5c3fe9682 100644 --- a/code/game/objects/items/stacks/sheets/sheet_types.dm +++ b/code/game/objects/items/stacks/sheets/sheet_types.dm @@ -760,6 +760,20 @@ GLOBAL_LIST_INIT(bronze_recipes, list ( \ merge_type = /obj/item/stack/sheet/bone material_type = /datum/material/bone +/obj/item/stack/sheet/bone/Initialize(mapload, new_amount, merge, list/mat_override, mat_amt) + . = ..() + + // As bone and sinew have just a little too many recipes for this, we'll just split them up. + // Sinew slapcrafting will mostly-sinew recipes, and bones will have mostly-bones recipes. + var/static/list/slapcraft_recipe_list = list(\ + /datum/crafting_recipe/bonedagger, /datum/crafting_recipe/bonespear, /datum/crafting_recipe/boneaxe,\ + /datum/crafting_recipe/bonearmor, /datum/crafting_recipe/skullhelm, /datum/crafting_recipe/bracers + ) + + AddComponent( + /datum/component/slapcrafting,\ + slapcraft_recipes = slapcraft_recipe_list,\ + ) GLOBAL_LIST_INIT(plastic_recipes, list( new /datum/stack_recipe("plastic floor tile", /obj/item/stack/tile/plastic, 1, 4, time = 2 SECONDS, check_density = FALSE, category = CAT_TILES), \ new /datum/stack_recipe("thermoplastic tram tile", /obj/item/stack/thermoplastic, 1, 2, time = 4 SECONDS, check_density = FALSE, placement_checks = STACK_CHECK_TRAM_EXCLUSIVE, category = CAT_TILES), \ diff --git a/code/modules/clothing/head/hat.dm b/code/modules/clothing/head/hat.dm index 89244adcf31..2eaed3bfc2f 100644 --- a/code/modules/clothing/head/hat.dm +++ b/code/modules/clothing/head/hat.dm @@ -90,11 +90,11 @@ inhand_icon_state = null /obj/item/clothing/head/cowboy - name = "bounty hunting hat" + name = "cowboy hat" desc = "Ain't nobody gonna cheat the hangman in my town." icon = 'icons/obj/clothing/head/cowboy.dmi' worn_icon = 'icons/mob/clothing/head/cowboy.dmi' - icon_state = "cowboy" + icon_state = "cowboy_hat_brown" worn_icon_state = "hunter" inhand_icon_state = null armor_type = /datum/armor/head_cowboy @@ -126,6 +126,10 @@ /// Bounty hunter's hat, very likely to intercept bullets /obj/item/clothing/head/cowboy/bounty + name = "bounty hunting hat" + desc = "Reach for the skies, pardner." + icon_state = "bounty_hunter" + worn_icon_state = "hunter" deflect_chance = 50 /obj/item/clothing/head/cowboy/black diff --git a/code/modules/clothing/head/jobs.dm b/code/modules/clothing/head/jobs.dm index 3c26de45e64..1f7bc689812 100644 --- a/code/modules/clothing/head/jobs.dm +++ b/code/modules/clothing/head/jobs.dm @@ -343,9 +343,21 @@ /obj/item/clothing/head/hats/hos/cap name = "head of security cap" - desc = "The robust standard-issue cap of the Head of Security. For showing the officers who's in charge." + desc = "The robust standard-issue cap of the Head of Security. For showing the officers who's in charge. Looks a bit stout." icon_state = "hoscap" +/obj/item/clothing/head/hats/hos/cap/Initialize(mapload) + . = ..() + // Give it a little publicity + var/static/list/slapcraft_recipe_list = list(\ + /datum/crafting_recipe/sturdy_shako,\ + ) + + AddComponent( + /datum/component/slapcrafting,\ + slapcraft_recipes = slapcraft_recipe_list,\ + ) + /datum/armor/hats_hos melee = 40 bullet = 30 diff --git a/icons/obj/clothing/head/cowboy.dmi b/icons/obj/clothing/head/cowboy.dmi index 66c0767294101be6f07c633b5c3b930c0c03bb0a..1a330eba0f80130a1c14c6030b799279486f60d4 100644 GIT binary patch delta 2756 zcmZ{kc|6mP92`+I#~-{;@w@8^jV9TG`L0QnJiP7h6dg1v(71wOnN@HYq)mS^h_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