Skip to content

Commit

Permalink
[MIRROR] Added more slapcraft recipes, improved its component, fixed …
Browse files Browse the repository at this point in the history
…base cowboy hat type [MDB IGNORE] (#24410)

* 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:

* Added more slapcraft recipes, improved its component, fixed base cowboy hat type

---------

Co-authored-by: carlarctg <[email protected]>
  • Loading branch information
2 people authored and FFMirrorBot committed Oct 18, 2023
1 parent e4f69d1 commit ed799dd
Show file tree
Hide file tree
Showing 8 changed files with 88 additions and 10 deletions.
12 changes: 8 additions & 4 deletions code/datums/components/crafting/slapcrafting.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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 = ""
Expand Down
11 changes: 11 additions & 0 deletions code/game/machinery/pipe/construction.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
9 changes: 9 additions & 0 deletions code/game/objects/items/pillow.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
30 changes: 27 additions & 3 deletions code/game/objects/items/stacks/sheets/leather.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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."
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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)
Expand All @@ -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)
14 changes: 14 additions & 0 deletions code/game/objects/items/stacks/sheets/sheet_types.dm
Original file line number Diff line number Diff line change
Expand Up @@ -761,6 +761,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, 20, check_density = FALSE, category = CAT_TILES), \
new /datum/stack_recipe("folding plastic chair", /obj/structure/chair/plastic, 2, check_density = FALSE, category = CAT_FURNITURE), \
Expand Down
8 changes: 6 additions & 2 deletions code/modules/clothing/head/hat.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
14 changes: 13 additions & 1 deletion code/modules/clothing/head/jobs.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Binary file modified icons/obj/clothing/head/cowboy.dmi
Binary file not shown.

0 comments on commit ed799dd

Please sign in to comment.