diff --git a/code/game/objects/items_drying.dm b/code/game/objects/items_drying.dm index cf5552eac9a..c1126919ff7 100644 --- a/code/game/objects/items_drying.dm +++ b/code/game/objects/items_drying.dm @@ -6,6 +6,8 @@ var/drying_threshold_temperature = 500 // If set to a type, drying this item will convert it to that type. var/dried_type + // Set if colour should be passed to dried product. + var/dried_product_takes_color = TRUE /obj/item/proc/is_dryable() return drying_wetness > 0 @@ -20,17 +22,23 @@ // Returns null for no change, or an instance for a successful drying. /obj/item/proc/dry_out(var/obj/rack, var/drying_power = 1, var/fire_exposed = FALSE, var/silent = FALSE) - if(!dried_type) + + if(!dried_type || !is_dryable()) return + if(drying_wetness > 0) drying_wetness -= drying_power if(drying_wetness > 0) return + var/obj/item/thing = get_dried_product() - if(color) + if(!thing) + return + + if(color && dried_product_takes_color) thing.color = color - if(!silent && rack) - rack.visible_message(SPAN_NOTICE("The [src] is dry!")) + if(isturf(loc) && !silent) + visible_message(SPAN_NOTICE("\The [src] [gender == PLURAL ? "are" : "is"] dry!")) if(thing != src) qdel(src) return thing diff --git a/code/game/objects/structures/wood_fire.dm b/code/game/objects/structures/wood_fire.dm index f9b7dfb33fb..1d7b4c4a97c 100644 --- a/code/game/objects/structures/wood_fire.dm +++ b/code/game/objects/structures/wood_fire.dm @@ -202,19 +202,12 @@ if(burning) // Draw our actual fire icon. - var/fire_state - if(fuel_amount >= 10) - fire_state = "[base_icon_state]_intense" - else if(fuel_amount >= 5) - fire_state = "[base_icon_state]_hot" - else - fire_state = "[base_icon_state]_warm" - var/image/I = image(icon, fire_state) + var/image/I = image(icon, ((fuel_amount >= 5) ? "[base_icon_state]_hot" : "[base_icon_state]_warm")) I.appearance_flags = RESET_COLOR | KEEP_APART add_overlay(I) // If we're capable of burning buckled mobs (usually via a stake), - // draw a second intense fire overlay and offset it to cover the mob. + // draw an intense fire overlay and offset it to cover the mob. if(fire_is_burning_mobs()) I = image(icon, "[base_icon_state]_intense") I.pixel_y = 13 @@ -386,4 +379,9 @@ /obj/structure/wood_fire/fireplace/stove/get_fuel_overlay(var/fuel_amount) . = ..() - LAZYADD(., "[base_icon_state]_cover") + if(!.) + . = "[base_icon_state]_cover" + else if(islist(.)) + . += "[base_icon_state]_cover" + else + . = list(., "[base_icon_state]_cover") diff --git a/code/modules/food/food/snacks.dm b/code/modules/food/food/snacks.dm index e9a19302804..dc635959a01 100644 --- a/code/modules/food/food/snacks.dm +++ b/code/modules/food/food/snacks.dm @@ -4,6 +4,10 @@ desc = "yummy" icon = 'icons/obj/food.dmi' icon_state = null + center_of_mass = list("x"=16, "y"=16) + w_class = ITEMSIZE_SMALL + force = 0 + var/bitesize = 1 var/bitecount = 0 var/trash = null @@ -23,9 +27,18 @@ var/package = FALSE // If this has a wrapper on it. If true, it will print a message and ask you to remove it var/package_trash // Packaged meals drop this trash type item when opened, if set var/package_open_state// Packaged meals switch to this state when opened, if set - center_of_mass = list("x"=16, "y"=16) - w_class = ITEMSIZE_SMALL - force = 0 + + // Halfassed version of Crabs' cooking system on Cit, should + // be folded into that if it is ported to Polaris. + + /// What object type the food cooks into. + var/backyard_grilling_product = /obj/item/reagent_containers/food/snacks/badrecipe + /// How many SSobj ticks it takes for the food to cook. + var/backyard_grilling_rawness = 30 + /// The message shown when the food cooks. + var/backyard_grilling_announcement = "smokes and chars!" + /// The span class used for the message above. Burned food defaults to SPAN_DANGER. + var/backyard_grilling_span = "notice" /obj/item/reagent_containers/food/snacks/Initialize() . = ..() @@ -57,47 +70,37 @@ return "almost dried" return "dehydrated" -/obj/item/reagent_containers/food/snacks/dry_out(var/obj/rack, var/drying_power = 1, var/fire_exposed = FALSE, var/silent = FALSE) +/obj/item/reagent_containers/food/snacks/proc/get_backyard_grilling_text(var/obj/rack) + var/moistness = backyard_grilling_rawness / initial(backyard_grilling_rawness) + if(moistness > 0.65) + return "uncooked" + if(moistness > 0.35) + return "half-cooked" + if(moistness) + return "nearly cooked" + return "cooked" - // If it's a direct fire, cook the food instead. - if(fire_exposed) - return grill(rack) +/obj/item/reagent_containers/food/snacks/examine(mob/user) + . = ..() + if(backyard_grilling_rawness > 0 && backyard_grilling_rawness != initial(backyard_grilling_rawness)) + . += "\The [src] is [get_backyard_grilling_text()]." - // Otherwise, try to dry it out. - if(!dried_type || dry) - return null - if(dried_type == type) +/obj/item/reagent_containers/food/snacks/get_dried_product() + if(dried_type == type && !dry) dry = TRUE name = "dried [name]" color = "#aaaaaa" - if(rack && !silent) - rack.visible_message(SPAN_NOTICE("\The [src] is dry!")) return src - return ..() -/obj/item/reagent_containers/food/snacks - - // Halfassed version of Crabs' cooking system on Cit, should - // be folded into that if it is ported to Polaris. - - /// How many SSobj ticks of cooking the food has experienced. - var/backyard_grilling_progress = 0 - /// What object type the food cooks into. - var/backyard_grilling_product = /obj/item/reagent_containers/food/snacks/badrecipe - /// How many SSobj ticks it takes for the food to cook. - var/backyard_grilling_threshold = 10 - /// The message shown when the food cooks. - var/backyard_grilling_announcement = "smokes and chars!" - /// The span class used for the message above. Burned food defaults to SPAN_DANGER. - var/backyard_grilling_span = "notice" +/obj/item/reagent_containers/food/snacks/dry_out(var/obj/rack, var/drying_power = 1, var/fire_exposed = FALSE, var/silent = FALSE) + return fire_exposed ? grill(rack) : ..() /obj/item/reagent_containers/food/snacks/proc/grill(var/atom/heat_source) - if(!backyard_grilling_product || !backyard_grilling_threshold) + if(!backyard_grilling_product || backyard_grilling_rawness <= 0) return null - backyard_grilling_progress++ - if(backyard_grilling_progress >= backyard_grilling_threshold) - backyard_grilling_progress = 0 + backyard_grilling_rawness-- + if(backyard_grilling_rawness <= 0) var/obj/item/food = new backyard_grilling_product food.dropInto(loc) if(backyard_grilling_announcement) @@ -916,7 +919,8 @@ filling_color = "#FFDEFE" center_of_mass = list("x"=17, "y"=13) bitesize = 2 - drying_wetness = 20 + drying_wetness = 60 + dried_type = /obj/item/reagent_containers/food/snacks/jerky/fish backyard_grilling_product = /obj/item/reagent_containers/food/snacks/grilledfish backyard_grilling_announcement = "steams gently." @@ -1033,7 +1037,7 @@ bitesize = 6 backyard_grilling_product = /obj/item/reagent_containers/food/snacks/xenomeat/spidermeat/charred backyard_grilling_announcement = "smokes as the poison burns away." - drying_wetness = 20 + drying_wetness = 60 dried_type = /obj/item/reagent_containers/food/snacks/jerky/spider/poison /obj/item/reagent_containers/food/snacks/xenomeat/spidermeat/add_venom() @@ -1044,9 +1048,8 @@ name = "charred spider meat" desc = "A slab of green meat with char lines. The poison has been burned out of it." color = COLOR_LIGHT_RED - drying_wetness = null - dried_type = null backyard_grilling_product = /obj/item/reagent_containers/food/snacks/badrecipe + dried_product_takes_color = FALSE dried_type = /obj/item/reagent_containers/food/snacks/jerky/spider /obj/item/reagent_containers/food/snacks/xenomeat/spidermeat/charred/add_venom() @@ -1094,9 +1097,9 @@ /obj/item/reagent_containers/food/snacks/donkpocket/grill(var/atom/heat_source) - backyard_grilling_progress++ - if(backyard_grilling_progress >= backyard_grilling_threshold) - backyard_grilling_progress = 0 + backyard_grilling_rawness-- + if(backyard_grilling_rawness <= 0) + backyard_grilling_rawness = initial(backyard_grilling_rawness) // We're already warm, so we burn. if(warm) @@ -1696,9 +1699,10 @@ center_of_mass = list("x"=16, "y"=12) bitesize = 2 backyard_grilling_product = null + backyard_grilling_rawness = 10 /obj/item/reagent_containers/food/snacks/badrecipe/grill(var/atom/heat_source) - if(!backyard_grilling_progress) // Smoke on our first grill + if(backyard_grilling_rawness <= 0) // Smoke on our first grill // Produce nasty smoke. var/datum/effect_system/smoke_spread/bad/burntfood/smoke = new /datum/effect_system/smoke_spread/bad/burntfood playsound(src, 'sound/effects/smoke.ogg', 20, 1) @@ -1709,8 +1713,8 @@ var/obj/machinery/firealarm/FA = locate() in get_area(src) if(FA) FA.alarm() - backyard_grilling_progress++ - if(backyard_grilling_progress >= backyard_grilling_threshold) + backyard_grilling_rawness-- + if(backyard_grilling_rawness <= 0) qdel(src) /obj/item/reagent_containers/food/snacks/badrecipe/Initialize() @@ -8184,6 +8188,6 @@ nutriment_desc = list("flaky grilled fish" = 5) /obj/item/reagent_containers/food/snacks/grilledfish/sivian - desc = "A lightly grilled fish fillet. This one is blue; it's probably an illegally fished native species." + desc = "A lightly grilled fish fillet. This one is blue, so you can expect a visit from the Sif Department of Fisheries." icon_state = "grilledsiffish" nutriment_desc = list("flaky grilled fish" = 5, "a mild, musky aftertaste" = 1) diff --git a/code/modules/food/food/snacks/meat.dm b/code/modules/food/food/snacks/meat.dm index be102ca7e93..523bc847caf 100644 --- a/code/modules/food/food/snacks/meat.dm +++ b/code/modules/food/food/snacks/meat.dm @@ -5,7 +5,7 @@ health = 180 filling_color = "#FF1C1C" center_of_mass = list("x"=16, "y"=14) - drying_wetness = 20 + drying_wetness = 60 dried_type = /obj/item/reagent_containers/food/snacks/jerky/meat /obj/item/reagent_containers/food/snacks/meat/get_drying_state() @@ -46,7 +46,7 @@ center_of_mass = list("x"=17, "y"=20) backyard_grilling_product = /obj/item/reagent_containers/food/snacks/cutlet backyard_grilling_announcement = "sizzles as it is grilled through." - drying_wetness = 10 + drying_wetness = 30 dried_type = /obj/item/reagent_containers/food/snacks/jerky/cutlet /obj/item/reagent_containers/food/snacks/rawcutlet/Initialize() diff --git a/code/modules/hydroponics/grown.dm b/code/modules/hydroponics/grown.dm index be9f5930a23..e51218446c4 100644 --- a/code/modules/hydroponics/grown.dm +++ b/code/modules/hydroponics/grown.dm @@ -9,7 +9,7 @@ slot_flags = SLOT_HOLSTER drop_sound = 'sound/items/drop/herb.ogg' pickup_sound = 'sound/items/pickup/herb.ogg' - drying_wetness = 20 + drying_wetness = 45 var/plantname var/datum/seed/seed @@ -40,7 +40,7 @@ name = "[seed.seed_name]" trash = seed.get_trash_type() backyard_grilling_product = seed.backyard_grilling_product - backyard_grilling_threshold = seed.backyard_grilling_threshold + backyard_grilling_rawness = seed.backyard_grilling_rawness backyard_grilling_announcement = seed.backyard_grilling_announcement update_icon() diff --git a/code/modules/hydroponics/seed.dm b/code/modules/hydroponics/seed.dm index f626e350868..77340c7765f 100644 --- a/code/modules/hydroponics/seed.dm +++ b/code/modules/hydroponics/seed.dm @@ -28,7 +28,7 @@ var/force_layer // Backyard grilling vars. Not passed through genetics. - var/backyard_grilling_threshold = 5 + var/backyard_grilling_rawness = 20 var/backyard_grilling_product = /obj/item/reagent_containers/food/snacks/badrecipe var/backyard_grilling_announcement = "smokes and chars!" diff --git a/code/modules/materials/materials/organic/wood.dm b/code/modules/materials/materials/organic/wood.dm index 62c31b0d56f..49a5ea10473 100644 --- a/code/modules/materials/materials/organic/wood.dm +++ b/code/modules/materials/materials/organic/wood.dm @@ -20,6 +20,7 @@ destruction_desc = "splinters" sheet_singular_name = "plank" sheet_plural_name = "planks" + var/drying_rack_type = /obj/structure/drying_rack/wood /datum/material/wood/generate_recipes() ..() @@ -42,7 +43,7 @@ new /datum/stack_recipe("coilgun stock", /obj/item/coilgun_assembly, 5, pass_stack_color = TRUE, recycle_material = "[name]"), new /datum/stack_recipe("crude fishing rod", /obj/item/material/fishing_rod/built, 8, time = 10 SECONDS, pass_stack_color = TRUE, recycle_material = "[name]"), new /datum/stack_recipe("noticeboard", /obj/structure/noticeboard, 1, recycle_material = "[name]"), - new /datum/stack_recipe("drying rack", /obj/structure/drying_rack, 3, one_per_turf = TRUE, time = 20, on_floor = TRUE, supplied_material = "[name]"), + new /datum/stack_recipe("drying rack", drying_rack_type, 3, one_per_turf = TRUE, time = 20, on_floor = TRUE, supplied_material = "[name]"), new /datum/stack_recipe("roofing tile", /obj/item/stack/tile/roofing, 3, 4, 20, recycle_material = "[name]"), new /datum/stack_recipe("shovel", /obj/item/shovel/wood, 2, time = 10, on_floor = TRUE, supplied_material = "[name]") ) @@ -52,6 +53,7 @@ stack_type = /obj/item/stack/material/fuel/wood/sif icon_colour = "#0099cc" // Cyan-ish stack_origin_tech = list(TECH_MATERIAL = 2, TECH_BIO = 2) // Alien wood would presumably be more interesting to the analyzer. + drying_rack_type = /obj/structure/drying_rack/sifwood /datum/material/wood/sif/generate_recipes() ..() diff --git a/code/modules/materials/sheets/organic/tanning/leather_wet.dm b/code/modules/materials/sheets/organic/tanning/leather_wet.dm index 421ec67ac45..a806cb0ca60 100644 --- a/code/modules/materials/sheets/organic/tanning/leather_wet.dm +++ b/code/modules/materials/sheets/organic/tanning/leather_wet.dm @@ -11,7 +11,7 @@ no_variants = FALSE max_amount = 20 stacktype = "wetleather" - drying_wetness = 30 + drying_wetness = 120 dried_type = /obj/item/stack/material/leather /obj/item/stack/wetleather/get_drying_state(var/obj/rack) diff --git a/code/modules/materials/sheets/organic/tanning/tanning_rack.dm b/code/modules/materials/sheets/organic/tanning/tanning_rack.dm index 5ada3e6298a..cf535042157 100644 --- a/code/modules/materials/sheets/organic/tanning/tanning_rack.dm +++ b/code/modules/materials/sheets/organic/tanning/tanning_rack.dm @@ -1,10 +1,20 @@ /obj/structure/drying_rack name = "drying rack" - desc = "A rack used to stretch leather out and hold it taut during the tanning process." + 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" + var/dismantle_product = /obj/item/stack/material/steel + var/dismantle_amount = 3 var/obj/item/drying +/obj/structure/drying_rack/wood + icon_state = "rack_wooden" + dismantle_product = /obj/item/stack/material/fuel/wood + +/obj/structure/drying_rack/sifwood + icon_state = "rack_wooden_sif" + dismantle_product = /obj/item/stack/material/fuel/wood/sif + /obj/structure/drying_rack/Initialize() . = ..() START_PROCESSING(SSobj, src) // SSObj fires ~every 2s , starting from wetness 30 takes ~1m @@ -36,13 +46,28 @@ if(drying_state) add_overlay(drying_state) -/obj/structure/drying_rack/attackby(var/obj/item/I, var/mob/user) - if(istype(I) && I.is_dryable() && !istype(I, /obj/item/stack/material/fuel)) - if(user.unEquip(I)) - I.forceMove(src) - drying = I +/obj/structure/drying_rack/attackby(var/obj/item/W, var/mob/user) + + if(W.is_wrench()) + playsound(src, W.usesound, 75, 1) + visible_message(SPAN_NOTICE("\The [user] begins dismantling \the [src].")) + if(do_after(user, 5 SECONDS * W.toolspeed)) + visible_message(SPAN_NOTICE("\The [user] dismantles \the [src].")) + if(drying) + drying.dropInto(loc) + drying = null + if(dismantle_product && dismantle_amount) + new dismantle_product(loc, dismantle_amount) + qdel(src) + return TRUE + + if(!drying && W.is_dryable() && !istype(W, /obj/item/stack/material/fuel)) + if(user.unEquip(W)) + W.forceMove(src) + drying = W update_icon() return TRUE + return ..() /obj/structure/drying_rack/attack_hand(var/mob/user) diff --git a/code/modules/materials/sheets/organic/wood.dm b/code/modules/materials/sheets/organic/wood.dm index 7e8def218d7..8f2d6d38829 100644 --- a/code/modules/materials/sheets/organic/wood.dm +++ b/code/modules/materials/sheets/organic/wood.dm @@ -20,7 +20,7 @@ drop_sound = 'sound/items/drop/wooden.ogg' pickup_sound = 'sound/items/pickup/wooden.ogg' no_variants = FALSE - drying_wetness = 50 + drying_wetness = 120 dried_type = /obj/item/stack/material/fuel/wood/dried bonfire_fuel_time = 3 MINUTES @@ -57,7 +57,7 @@ description_info = "Use inhand to craft things, or use a sharp and edged object on this to convert it into two wooden planks." drop_sound = 'sound/items/drop/wooden.ogg' pickup_sound = 'sound/items/pickup/wooden.ogg' - drying_wetness = 80 + drying_wetness = 180 dried_type = /obj/item/stack/material/fuel/log/dried bonfire_fuel_time = 4 MINUTES var/plank_type = /obj/item/stack/material/fuel/wood diff --git a/icons/obj/drying_rack.dmi b/icons/obj/drying_rack.dmi index 950ada402ed..618b0ae5d65 100644 Binary files a/icons/obj/drying_rack.dmi and b/icons/obj/drying_rack.dmi differ diff --git a/icons/obj/wood_fire.dmi b/icons/obj/wood_fire.dmi index d859afc6a63..85c0963d279 100644 Binary files a/icons/obj/wood_fire.dmi and b/icons/obj/wood_fire.dmi differ diff --git a/maps/cynosure/cynosure-7.dmm b/maps/cynosure/cynosure-7.dmm index 4cdd454d051..4f4132d47ee 100644 --- a/maps/cynosure/cynosure-7.dmm +++ b/maps/cynosure/cynosure-7.dmm @@ -205,7 +205,7 @@ /turf/simulated/floor/water/deep, /area/surface/outside/river/gautelfr) "zq" = ( -/obj/structure/drying_rack, +/obj/structure/drying_rack/sifwood, /turf/simulated/floor/outdoors/dirt/sif/planetuse, /area/surface/outside/wilderness/normal) "zS" = (