Skip to content

Commit

Permalink
Merge pull request #4374 from MistakeNot4892/fix/dryingracks
Browse files Browse the repository at this point in the history
Tweaks and fixes to drying racks.
  • Loading branch information
out-of-phaze authored Aug 20, 2024
2 parents ac4dc5e + c49499c commit 2a48376
Show file tree
Hide file tree
Showing 9 changed files with 37 additions and 27 deletions.
2 changes: 1 addition & 1 deletion code/game/objects/structures/drying_rack.dm
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name = "drying rack"
desc = "A rack used to hold meat or vegetables for drying, or to stretch leather out and hold it taut during the tanning process."
icon = 'icons/obj/drying_rack.dmi'
icon_state = "rack"
icon_state = ICON_STATE_WORLD
material = /decl/material/solid/metal/steel
material_alteration = MAT_FLAG_ALTERATION_COLOR | MAT_FLAG_ALTERATION_NAME | MAT_FLAG_ALTERATION_DESC
var/obj/item/drying
Expand Down
14 changes: 8 additions & 6 deletions code/modules/butchery/butchery_hook.dm
Original file line number Diff line number Diff line change
Expand Up @@ -215,14 +215,19 @@
return FALSE

/obj/structure/meat_hook/attackby(var/obj/item/thing, var/mob/user)

if(!IS_KNIFE(thing))
return ..()

if(!occupant)
to_chat(user, SPAN_WARNING("There is nothing on \the [src] to butcher."))
return
if(!busy)
busy = TRUE
return TRUE

if(busy)
to_chat(user, SPAN_WARNING("\The [src] is already in use!"))
return TRUE

busy = TRUE
if(occupant_state == CARCASS_FRESH)
if(occupant.currently_has_skin())
do_butchery_step(user, thing, CARCASS_SKINNED, "skinning")
Expand All @@ -243,12 +248,9 @@
do_butchery_step(user, thing, CARCASS_EMPTY, "butchering")
else
set_carcass_state(CARCASS_EMPTY, apply_damage = FALSE)

busy = FALSE
return TRUE



#undef CARCASS_EMPTY
#undef CARCASS_FRESH
#undef CARCASS_SKINNED
Expand Down
14 changes: 14 additions & 0 deletions code/modules/butchery/butchery_products.dm
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,20 @@
if(meat_name)
set_meat_name(meat_name)

/obj/item/food/butchery/get_drying_state(var/obj/rack)
return "meat"

/obj/item/food/butchery/get_drying_overlay(var/obj/rack)
var/image/overlay = ..()
if(fat_material)
if(istext(overlay))
overlay = image('icons/obj/drying_rack.dmi', overlay)
var/drying_state = "[get_drying_state(rack)]_fat"
if(check_state_in_icon(drying_state, 'icons/obj/drying_rack.dmi'))
var/decl/material/fat_material_data = GET_DECL(fat_material)
overlay.overlays += overlay_image('icons/obj/drying_rack.dmi', drying_state, fat_material_data.color, RESET_COLOR)
return overlay

/obj/item/food/butchery/on_update_icon()
..()
underlays = null
Expand Down
6 changes: 4 additions & 2 deletions code/modules/butchery/butchery_products_cutlet.dm
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,20 @@
bitesize = 2
nutriment_amt = 1
center_of_mass = @'{"x":17,"y":20}'
material_alteration = MAT_FLAG_ALTERATION_NONE
slice_path = /obj/item/food/butchery/chopped
slice_num = 1
cooked_food = FOOD_COOKED
w_class = ITEM_SIZE_SMALL
color = "#81492e"
material_alteration = MAT_FLAG_ALTERATION_NONE


/obj/item/food/butchery/cutlet/raw
desc = "A thin piece of raw meat."
icon = 'icons/obj/items/butchery/rawcutlet.dmi'
cooked_food = FOOD_RAW
backyard_grilling_product = /obj/item/food/butchery/cutlet
backyard_grilling_announcement = "sizzles as it is grilled through."
drying_wetness = 30
dried_type = /obj/item/food/jerky/cutlet
nutriment_amt = 2
material_alteration = MAT_FLAG_ALTERATION_COLOR
28 changes: 10 additions & 18 deletions code/modules/reagents/reagent_containers/food/jerky.dm
Original file line number Diff line number Diff line change
@@ -1,13 +1,18 @@
/obj/item/food/jerky
name = "dried meat"
icon = 'icons/obj/food_jerky.dmi'
icon_state = "jerky"
bitesize = 2
w_class = ITEM_SIZE_TINY
dry = TRUE
nutriment_type = /decl/material/solid/organic/meat
nutriment_amt = 5
color = "#81492e"
var/meat_name = "meat"

/obj/item/food/jerky/get_drying_state()
return "meat"

/obj/item/food/jerky/Initialize(mapload, material_key, skip_plate = FALSE)
. = ..()
if(meat_name)
Expand All @@ -19,43 +24,30 @@

/obj/item/food/jerky/fish
desc = "A piece of dried fish, with a couple of scales still attached."
icon_state = "fishjerky"
meat_name = "fish"

/obj/item/food/jerky/fish/get_drying_state()
return "fish_dried"
color = "#ffd997"

/obj/item/food/jerky/meat
desc = "A piece of chewy dried meat. It has the texture of leather."
icon_state = "meatjerky"
meat_name = "beef"

/obj/item/food/jerky/meat/get_drying_state()
return "meat_dried"

/obj/item/food/jerky/cutlet
name = "dried meat stick"
desc = "A stick of chewy dried meat. Great for travel rations."
icon_state = "smallmeatjerky"
nutriment_amt = 2
color = "#81492e"

/obj/item/food/jerky/cutlet/set_meat_name(new_meat_name)
. = ..()
SetName("[name] stick")

/obj/item/food/jerky/cutlet/get_drying_state()
return "meat_dried_small"

/obj/item/food/jerky/spider
desc = "A piece of green, stringy dried meat, full of tubes. It smells faintly of acid."
icon_state = "spiderjerky_charred"
desc = "A piece of green, stringy, dried meat, full of tubes. It smells faintly of acid."
meat_name = "spider meat"

/obj/item/food/jerky/spider/get_drying_state()
return "meat_dried"
color = "#6f5b4a"

/obj/item/food/jerky/spider/poison
icon_state = "spiderjerky"
color = "#546145"

/obj/item/food/jerky/spider/poison/populate_reagents()
. = ..()
Expand Down
Binary file modified icons/obj/drying_rack.dmi
Binary file not shown.
Binary file modified icons/obj/food_jerky.dmi
Binary file not shown.
Binary file modified icons/obj/items/butchery/cutlet.dmi
Binary file not shown.
Binary file removed icons/obj/items/butchery/rawcutlet.dmi
Binary file not shown.

0 comments on commit 2a48376

Please sign in to comment.