|
4 | 4 | desc = "yummy"
|
5 | 5 | icon = 'icons/obj/food.dmi'
|
6 | 6 | icon_state = null
|
| 7 | + center_of_mass = list("x"=16, "y"=16) |
| 8 | + w_class = ITEMSIZE_SMALL |
| 9 | + force = 0 |
| 10 | + |
7 | 11 | var/bitesize = 1
|
8 | 12 | var/bitecount = 0
|
9 | 13 | var/trash = null
|
|
23 | 27 | var/package = FALSE // If this has a wrapper on it. If true, it will print a message and ask you to remove it
|
24 | 28 | var/package_trash // Packaged meals drop this trash type item when opened, if set
|
25 | 29 | var/package_open_state// Packaged meals switch to this state when opened, if set
|
26 |
| - center_of_mass = list("x"=16, "y"=16) |
27 |
| - w_class = ITEMSIZE_SMALL |
28 |
| - force = 0 |
| 30 | + |
| 31 | + // Halfassed version of Crabs' cooking system on Cit, should |
| 32 | + // be folded into that if it is ported to Polaris. |
| 33 | + |
| 34 | + /// What object type the food cooks into. |
| 35 | + var/backyard_grilling_product = /obj/item/reagent_containers/food/snacks/badrecipe |
| 36 | + /// How many SSobj ticks it takes for the food to cook. |
| 37 | + var/backyard_grilling_rawness = 30 |
| 38 | + /// The message shown when the food cooks. |
| 39 | + var/backyard_grilling_announcement = "smokes and chars!" |
| 40 | + /// The span class used for the message above. Burned food defaults to SPAN_DANGER. |
| 41 | + var/backyard_grilling_span = "notice" |
29 | 42 |
|
30 | 43 | /obj/item/reagent_containers/food/snacks/Initialize()
|
31 | 44 | . = ..()
|
|
57 | 70 | return "almost dried"
|
58 | 71 | return "dehydrated"
|
59 | 72 |
|
60 |
| -/obj/item/reagent_containers/food/snacks/dry_out(var/obj/rack, var/drying_power = 1, var/fire_exposed = FALSE, var/silent = FALSE) |
| 73 | +/obj/item/reagent_containers/food/snacks/proc/get_backyard_grilling_text(var/obj/rack) |
| 74 | + var/moistness = backyard_grilling_rawness / initial(backyard_grilling_rawness) |
| 75 | + if(moistness > 0.65) |
| 76 | + return "uncooked" |
| 77 | + if(moistness > 0.35) |
| 78 | + return "half-cooked" |
| 79 | + if(moistness) |
| 80 | + return "nearly cooked" |
| 81 | + return "cooked" |
61 | 82 |
|
62 |
| - // If it's a direct fire, cook the food instead. |
63 |
| - if(fire_exposed) |
64 |
| - return grill(rack) |
| 83 | +/obj/item/reagent_containers/food/snacks/examine(mob/user) |
| 84 | + . = ..() |
| 85 | + if(backyard_grilling_rawness > 0 && backyard_grilling_rawness != initial(backyard_grilling_rawness)) |
| 86 | + . += "\The [src] is [get_backyard_grilling_text()]." |
65 | 87 |
|
66 |
| - // Otherwise, try to dry it out. |
67 |
| - if(!dried_type || dry) |
68 |
| - return null |
69 |
| - if(dried_type == type) |
| 88 | +/obj/item/reagent_containers/food/snacks/get_dried_product() |
| 89 | + if(dried_type == type && !dry) |
70 | 90 | dry = TRUE
|
71 | 91 | name = "dried [name]"
|
72 | 92 | color = "#aaaaaa"
|
73 |
| - if(rack && !silent) |
74 |
| - rack.visible_message(SPAN_NOTICE("\The [src] is dry!")) |
75 | 93 | return src
|
76 |
| - |
77 | 94 | return ..()
|
78 | 95 |
|
79 |
| -/obj/item/reagent_containers/food/snacks |
80 |
| - |
81 |
| - // Halfassed version of Crabs' cooking system on Cit, should |
82 |
| - // be folded into that if it is ported to Polaris. |
83 |
| - |
84 |
| - /// How many SSobj ticks of cooking the food has experienced. |
85 |
| - var/backyard_grilling_progress = 0 |
86 |
| - /// What object type the food cooks into. |
87 |
| - var/backyard_grilling_product = /obj/item/reagent_containers/food/snacks/badrecipe |
88 |
| - /// How many SSobj ticks it takes for the food to cook. |
89 |
| - var/backyard_grilling_threshold = 10 |
90 |
| - /// The message shown when the food cooks. |
91 |
| - var/backyard_grilling_announcement = "smokes and chars!" |
92 |
| - /// The span class used for the message above. Burned food defaults to SPAN_DANGER. |
93 |
| - var/backyard_grilling_span = "notice" |
| 96 | +/obj/item/reagent_containers/food/snacks/dry_out(var/obj/rack, var/drying_power = 1, var/fire_exposed = FALSE, var/silent = FALSE) |
| 97 | + return fire_exposed ? grill(rack) : ..() |
94 | 98 |
|
95 | 99 | /obj/item/reagent_containers/food/snacks/proc/grill(var/atom/heat_source)
|
96 |
| - if(!backyard_grilling_product || !backyard_grilling_threshold) |
| 100 | + if(!backyard_grilling_product || backyard_grilling_rawness <= 0) |
97 | 101 | return null
|
98 |
| - backyard_grilling_progress++ |
99 |
| - if(backyard_grilling_progress >= backyard_grilling_threshold) |
100 |
| - backyard_grilling_progress = 0 |
| 102 | + backyard_grilling_rawness-- |
| 103 | + if(backyard_grilling_rawness <= 0) |
101 | 104 | var/obj/item/food = new backyard_grilling_product
|
102 | 105 | food.dropInto(loc)
|
103 | 106 | if(backyard_grilling_announcement)
|
|
916 | 919 | filling_color = "#FFDEFE"
|
917 | 920 | center_of_mass = list("x"=17, "y"=13)
|
918 | 921 | bitesize = 2
|
919 |
| - drying_wetness = 20 |
| 922 | + drying_wetness = 60 |
| 923 | + |
920 | 924 | dried_type = /obj/item/reagent_containers/food/snacks/jerky/fish
|
921 | 925 | backyard_grilling_product = /obj/item/reagent_containers/food/snacks/grilledfish
|
922 | 926 | backyard_grilling_announcement = "steams gently."
|
|
1033 | 1037 | bitesize = 6
|
1034 | 1038 | backyard_grilling_product = /obj/item/reagent_containers/food/snacks/xenomeat/spidermeat/charred
|
1035 | 1039 | backyard_grilling_announcement = "smokes as the poison burns away."
|
1036 |
| - drying_wetness = 20 |
| 1040 | + drying_wetness = 60 |
1037 | 1041 | dried_type = /obj/item/reagent_containers/food/snacks/jerky/spider/poison
|
1038 | 1042 |
|
1039 | 1043 | /obj/item/reagent_containers/food/snacks/xenomeat/spidermeat/add_venom()
|
|
1044 | 1048 | name = "charred spider meat"
|
1045 | 1049 | desc = "A slab of green meat with char lines. The poison has been burned out of it."
|
1046 | 1050 | color = COLOR_LIGHT_RED
|
1047 |
| - drying_wetness = null |
1048 |
| - dried_type = null |
1049 | 1051 | backyard_grilling_product = /obj/item/reagent_containers/food/snacks/badrecipe
|
| 1052 | + dried_product_takes_color = FALSE |
1050 | 1053 | dried_type = /obj/item/reagent_containers/food/snacks/jerky/spider
|
1051 | 1054 |
|
1052 | 1055 | /obj/item/reagent_containers/food/snacks/xenomeat/spidermeat/charred/add_venom()
|
|
1094 | 1097 |
|
1095 | 1098 | /obj/item/reagent_containers/food/snacks/donkpocket/grill(var/atom/heat_source)
|
1096 | 1099 |
|
1097 |
| - backyard_grilling_progress++ |
1098 |
| - if(backyard_grilling_progress >= backyard_grilling_threshold) |
1099 |
| - backyard_grilling_progress = 0 |
| 1100 | + backyard_grilling_rawness-- |
| 1101 | + if(backyard_grilling_rawness <= 0) |
| 1102 | + backyard_grilling_rawness = initial(backyard_grilling_rawness) |
1100 | 1103 |
|
1101 | 1104 | // We're already warm, so we burn.
|
1102 | 1105 | if(warm)
|
|
1696 | 1699 | center_of_mass = list("x"=16, "y"=12)
|
1697 | 1700 | bitesize = 2
|
1698 | 1701 | backyard_grilling_product = null
|
| 1702 | + backyard_grilling_rawness = 10 |
1699 | 1703 |
|
1700 | 1704 | /obj/item/reagent_containers/food/snacks/badrecipe/grill(var/atom/heat_source)
|
1701 |
| - if(!backyard_grilling_progress) // Smoke on our first grill |
| 1705 | + if(backyard_grilling_rawness <= 0) // Smoke on our first grill |
1702 | 1706 | // Produce nasty smoke.
|
1703 | 1707 | var/datum/effect_system/smoke_spread/bad/burntfood/smoke = new /datum/effect_system/smoke_spread/bad/burntfood
|
1704 | 1708 | playsound(src, 'sound/effects/smoke.ogg', 20, 1)
|
|
1709 | 1713 | var/obj/machinery/firealarm/FA = locate() in get_area(src)
|
1710 | 1714 | if(FA)
|
1711 | 1715 | FA.alarm()
|
1712 |
| - backyard_grilling_progress++ |
1713 |
| - if(backyard_grilling_progress >= backyard_grilling_threshold) |
| 1716 | + backyard_grilling_rawness-- |
| 1717 | + if(backyard_grilling_rawness <= 0) |
1714 | 1718 | qdel(src)
|
1715 | 1719 |
|
1716 | 1720 | /obj/item/reagent_containers/food/snacks/badrecipe/Initialize()
|
|
8184 | 8188 | nutriment_desc = list("flaky grilled fish" = 5)
|
8185 | 8189 |
|
8186 | 8190 | /obj/item/reagent_containers/food/snacks/grilledfish/sivian
|
8187 |
| - desc = "A lightly grilled fish fillet. This one is blue; it's probably an illegally fished native species." |
| 8191 | + desc = "A lightly grilled fish fillet. This one is blue, so you can expect a visit from the Sif Department of Fisheries." |
8188 | 8192 | icon_state = "grilledsiffish"
|
8189 | 8193 | nutriment_desc = list("flaky grilled fish" = 5, "a mild, musky aftertaste" = 1)
|
0 commit comments