[MIRROR] This kills the deep fried foods holder. Refactors deep frying to just make the thing edible but still functional. [MDB IGNORE] (#17848)

* This kills the deep fried foods holder. Refactors deep frying to just make the thing edible but still functional. (#71551)

## About The Pull Request

Refactors deepfrying, removing the gross Deep Fried Foods Holder Object
and replacing it with the edible component.

Now, deep frying a food will simply make the item edible directly. This
means it's still functional and doesn't become a dead item.

This follows the same method that grilling uses when applying its
effects. Tweaks grilling a bit so they line up better. Also, silver
foods can make grilled items.

![image](https://user-images.githubusercontent.com/51863163/204105022-ee66889b-f843-4dc2-b0dc-5f1eb5ba19c3.png)

I swear this is unrelated to the other 2 fried foods related PRs. I
started this a few weeks ago.

## Why It's Good For The Game

Tangibly better code (doesn't have to copy a million vars! Less
abusable!) at the price of removing a soulful piece of code. Also means
that deep frying an item doesn't irreversibly make it unusable / dead.
This is sad, but... damn the holder object sucks.

Unfortunate side effect is that anything that overrides `attack` to not
send signal will *not* be edible when deepfried. Maybe this encourages
better signal use?

Either that or fried foods can override `pre_attack` to hook directly
into eating. I can do that as well.

## Changelog

🆑 Melbert
refactor: Refactored deep fried foods. Deep fried foods are still
""usable"" as their normal item, but are just edible.
qol: Silver Slime stuff can spawn grilled as well as fried.
/🆑

* This kills the deep fried foods holder. Refactors deep frying to just make the thing edible but still functional.

Co-authored-by: MrMelbert <51863163+MrMelbert@users.noreply.github.com>
This commit is contained in:
SkyratBot
2022-12-01 01:11:20 +00:00
committed by GitHub
co-authored by MrMelbert
parent 1ba7b9f254
commit 810fef5fde
15 changed files with 204 additions and 163 deletions
+3
View File
@@ -103,9 +103,12 @@
#define COLOR_BROWN "#BA9F6D"
#define COLOR_DARK_BROWN "#997C4F"
#define COLOR_DARKER_BROWN "#330000"
#define COLOR_ORANGE_BROWN "#a9734f"
#define COLOR_CARGO_BROWN "#B18644"
#define COLOR_DRIED_TAN "#ad7257"
#define COLOR_LIGHT_BROWN "#996666"
#define COLOR_BROWNER_BROWN "#663300"
//Color defines used by the soapstone (based on readability against grey tiles)
#define COLOR_SOAPSTONE_PLASTIC "#a19d94"
+3 -3
View File
@@ -14,10 +14,10 @@
#define COMSIG_FOOD_INGREDIENT_ADDED "edible_ingredient_added"
// Deep frying foods
/// From obj/item/food/deepfryholder/Initialize
/// An item becomes fried - From /datum/element/fried_item/Attach: (fry_time)
#define COMSIG_ITEM_FRIED "item_fried"
/// Return to not burn the item
#define COMSIG_FRYING_HANDLED (1<<0)
/// An item entering the deep frying (not fried yet) - From obj/machinery/deepfryer/start_fry: ()
#define COMSIG_ITEM_ENTERED_FRYER "item_entered_fryer"
// Microwaving foods
///called on item when microwaved (): (obj/machinery/microwave/microwave, mob/microwaver)
+2
View File
@@ -551,6 +551,8 @@ Remember to update _globalvars/traits.dm if you're adding/removing/renaming trai
#define TRAIT_T_RAY_VISIBLE "t-ray-visible"
/// If this item's been grilled
#define TRAIT_FOOD_GRILLED "food_grilled"
/// If this item's been fried
#define TRAIT_FOOD_FRIED "food_fried"
/// This is a silver slime created item
#define TRAIT_FOOD_SILVER "food_silver"
/// If this item's been made by a chef instead of being map-spawned or admin-spawned or such
-1
View File
@@ -21,7 +21,6 @@
/obj/item/food/soup,
/obj/item/food/grown,
/obj/item/food/grown/mushroom,
/obj/item/food/deepfryholder,
/obj/item/food/clothing,
/obj/item/food/meat/slab/human/mutant,
/obj/item/food/grown/ash_flora,
-10
View File
@@ -88,7 +88,6 @@ Behavior that's still missing from this component that original food items had t
if(isitem(parent))
RegisterSignal(parent, COMSIG_ITEM_ATTACK, PROC_REF(UseFromHand))
RegisterSignal(parent, COMSIG_ITEM_FRIED, PROC_REF(OnFried))
RegisterSignal(parent, COMSIG_ITEM_USED_AS_INGREDIENT, PROC_REF(used_to_customize))
var/obj/item/item = parent
@@ -107,7 +106,6 @@ Behavior that's still missing from this component that original food items had t
COMSIG_ATOM_ENTERED,
COMSIG_FOOD_INGREDIENT_ADDED,
COMSIG_ITEM_ATTACK,
COMSIG_ITEM_FRIED,
COMSIG_ITEM_USED_AS_INGREDIENT,
COMSIG_OOZE_EAT_ATOM,
COMSIG_PARENT_EXAMINE,
@@ -240,14 +238,6 @@ Behavior that's still missing from this component that original food items had t
return TryToEat(user, user)
/datum/component/edible/proc/OnFried(datum/source, atom/fry_object)
SIGNAL_HANDLER
var/atom/our_atom = parent
fry_object.reagents.maximum_volume = our_atom.reagents.maximum_volume
our_atom.reagents.trans_to(fry_object, our_atom.reagents.total_volume)
qdel(our_atom)
return COMSIG_FRYING_HANDLED
///Called when food is created through processing (Usually this means it was sliced). We use this to pass the OG items reagents.
/datum/component/edible/proc/OnProcessed(datum/source, atom/original_atom, list/chosen_processing_option)
SIGNAL_HANDLER
+59
View File
@@ -0,0 +1,59 @@
/// Items fried through the deep fryer.
/datum/element/fried_item
/// List of colors to apply the element target.
/// Each index corresponds to a different level.
var/static/list/fried_colors = list(
COLOR_LIGHT_BROWN,
COLOR_BROWNER_BROWN,
COLOR_DARKER_BROWN,
COLOR_BLACK,
)
/datum/element/fried_item/Attach(datum/target, fry_time)
. = ..()
if(!isatom(target))
return ELEMENT_INCOMPATIBLE
var/atom/this_food = target
switch(fry_time)
if(0 to 15)
this_food.add_atom_colour(fried_colors[1], FIXED_COLOUR_PRIORITY)
this_food.name = "lightly-fried [this_food.name]"
this_food.desc += " It's been lightly fried in a deep fryer."
if(15 to 50)
this_food.add_atom_colour(fried_colors[2], FIXED_COLOUR_PRIORITY)
this_food.name = "fried [this_food.name]"
this_food.desc += " It's been fried, increasing its tastiness value by [rand(1, 75)]%."
if(50 to 85)
this_food.add_atom_colour(fried_colors[3], FIXED_COLOUR_PRIORITY)
this_food.name = "deep-fried [this_food.name]"
this_food.desc += " Deep-fried to perfection."
if(85 to INFINITY)
this_food.add_atom_colour(fried_colors[4], FIXED_COLOUR_PRIORITY)
this_food.name = "\proper the physical manifestation of the very concept of fried foods"
this_food.desc = "A heavily-fried... something. Who can tell anymore?"
ADD_TRAIT(this_food, TRAIT_FOOD_FRIED, ELEMENT_TRAIT(type))
SEND_SIGNAL(this_food, COMSIG_ITEM_FRIED, fry_time)
// Already edible items will inherent these parameters
// Otherwise, we will become edible.
this_food.AddComponent( \
/datum/component/edible, \
bite_consumption = 2, \
food_flags = FOOD_FINGER_FOOD, \
junkiness = 10, \
foodtypes = FRIED, \
)
/datum/element/fried_item/Detach(atom/source, ...)
for(var/color in fried_colors)
source.remove_atom_colour(FIXED_COLOUR_PRIORITY, color)
source.name = initial(source.name)
source.desc = initial(source.desc)
REMOVE_TRAIT(source, TRAIT_FOOD_FRIED, ELEMENT_TRAIT(type))
qdel(source.GetComponent(/datum/component/edible)) // Don't care if it was initially edible
return ..()
+8 -1
View File
@@ -26,6 +26,13 @@
this_food.desc = "A [this_food.name]. Reminds you of your wife, wait, no, it's prettier!"
if(grill_time > 20)
ADD_TRAIT(this_food, TRAIT_FOOD_GRILLED, "boomers")
ADD_TRAIT(this_food, TRAIT_FOOD_GRILLED, ELEMENT_TRAIT(type))
if(grill_time > 30)
this_food.AddComponent(/datum/component/edible, foodtypes = FRIED)
/datum/element/grilled_item/Detach(atom/source, ...)
source.name = initial(source.name)
source.desc = initial(source.desc)
REMOVE_TRAIT(source, TRAIT_FOOD_GRILLED, ELEMENT_TRAIT(type))
qdel(source.GetComponent(/datum/component/edible)) // Don't care if it was initially edible
return ..()
-68
View File
@@ -1,68 +0,0 @@
/obj/item/food/deepfryholder
name = "Deep Fried Foods Holder Obj"
desc = "If you can see this description the code for the deep fryer fucked up."
icon = 'icons/obj/food/food.dmi'
icon_state = ""
bite_consumption = 2
/obj/item/food/deepfryholder/MakeEdible()
. = ..()
AddComponent(/datum/component/edible, on_consume = CALLBACK(src, PROC_REF(On_Consume)))
/obj/item/food/deepfryholder/Initialize(mapload, obj/item/fried)
if(!fried)
stack_trace("A deepfried object was created with no fried target")
return INITIALIZE_HINT_QDEL
. = ..()
name = fried.name //We'll determine the other stuff when it's actually removed
appearance = fried.appearance
layer = initial(layer)
SET_PLANE_IMPLICIT(src, initial(plane))
lefthand_file = fried.lefthand_file
righthand_file = fried.righthand_file
inhand_icon_state = fried.inhand_icon_state
desc = fried.desc
w_class = fried.w_class
slowdown = fried.slowdown
equip_delay_self = fried.equip_delay_self
equip_delay_other = fried.equip_delay_other
strip_delay = fried.strip_delay
species_exception = fried.species_exception
item_flags = fried.item_flags
obj_flags = fried.obj_flags
inhand_x_dimension = fried.inhand_x_dimension
inhand_y_dimension = fried.inhand_y_dimension
if(!(SEND_SIGNAL(fried, COMSIG_ITEM_FRIED, src) & COMSIG_FRYING_HANDLED)) //If frying is handled by signal don't do the defaault behavior.
fried.forceMove(src)
/obj/item/food/deepfryholder/Destroy()
if(contents)
QDEL_LIST(contents)
return ..()
/obj/item/food/deepfryholder/proc/On_Consume(eater, feeder)
if(contents)
QDEL_LIST(contents)
/obj/item/food/deepfryholder/proc/fry(cook_time = 30)
switch(cook_time)
if(0 to 15)
add_atom_colour(rgb(166, 103, 54), FIXED_COLOUR_PRIORITY)
name = "lightly-fried [name]"
desc = "[desc] It's been lightly fried in a deep fryer."
if(16 to 49)
add_atom_colour(rgb(103, 63, 24), FIXED_COLOUR_PRIORITY)
name = "fried [name]"
desc = "[desc] It's been fried, increasing its tastiness value by [rand(1, 75)]%."
if(50 to 59)
add_atom_colour(rgb(63, 23, 4), FIXED_COLOUR_PRIORITY)
name = "deep-fried [name]"
desc = "[desc] Deep-fried to perfection."
if(60 to INFINITY)
add_atom_colour(rgb(33, 19, 9), FIXED_COLOUR_PRIORITY)
name = "\proper the physical manifestation of the very concept of fried foods"
desc = "A heavily-fried... something. Who can tell anymore?"
foodtypes |= FRIED
@@ -1,12 +1,13 @@
#define DEEPFRYER_COOKTIME 60
/// The deep fryer pings after this long, letting people know it's "perfect"
#define DEEPFRYER_COOKTIME 50
/// The deep fryer pings after this long, reminding people that there's a very burnt object inside
#define DEEPFRYER_BURNTIME 120
/// Global typecache of things which should never be fried.
GLOBAL_LIST_INIT(oilfry_blacklisted_items, typecacheof(list(
/obj/item/reagent_containers/cup,
/obj/item/reagent_containers/syringe,
/obj/item/reagent_containers/condiment,
/obj/item/storage,
/obj/item/delivery,
/obj/item/his_grace,
/obj/item/transfer_valve,
@@ -22,13 +23,23 @@ GLOBAL_LIST_INIT(oilfry_blacklisted_items, typecacheof(list(
idle_power_usage = BASE_MACHINE_IDLE_CONSUMPTION * 0.05
layer = BELOW_OBJ_LAYER
circuit = /obj/item/circuitboard/machine/deep_fryer
var/obj/item/food/deepfryholder/frying //What's being fried RIGHT NOW?
/// What's being fried RIGHT NOW?
var/obj/item/frying
/// How long the current object has been cooking for
var/cook_time = 0
var/oil_use = 0.025 //How much cooking oil is used per second
var/fry_speed = 1 //How quickly we fry food
var/frying_fried //If the object has been fried; used for messages
var/frying_burnt //If the object has been burnt
/// How much cooking oil is used per process
var/oil_use = 0.025
/// How quickly we fry food - modifier applied per process tick
var/fry_speed = 1
/// Has our currently frying object been fried?
var/frying_fried = FALSE
/// Has our currently frying object been burnt?
var/frying_burnt = FALSE
/// Our sound loop for the frying sounde effect.
var/datum/looping_sound/deep_fryer/fry_loop
/// Static typecache of things we can't fry.
var/static/list/deepfry_blacklisted_items = typecacheof(list(
/obj/item/screwdriver,
/obj/item/crowbar,
@@ -46,13 +57,19 @@ GLOBAL_LIST_INIT(oilfry_blacklisted_items, typecacheof(list(
/obj/machinery/deepfryer/Destroy()
QDEL_NULL(fry_loop)
QDEL_NULL(frying)
return ..()
/obj/machinery/deepfryer/deconstruct(disassembled)
// This handles nulling out frying via exited
frying.forceMove(drop_location())
return ..()
/obj/machinery/deepfryer/RefreshParts()
. = ..()
var/oil_efficiency
for(var/obj/item/stock_parts/micro_laser/M in component_parts)
oil_efficiency += M.rating
var/oil_efficiency = 0
for(var/obj/item/stock_parts/micro_laser/laser in component_parts)
oil_efficiency += laser.rating
oil_use = initial(oil_use) - (oil_efficiency * 0.00475)
fry_speed = oil_efficiency
@@ -69,6 +86,7 @@ GLOBAL_LIST_INIT(oilfry_blacklisted_items, typecacheof(list(
return TOOL_ACT_TOOLTYPE_SUCCESS
/obj/machinery/deepfryer/attackby(obj/item/weapon, mob/user, params)
// Dissolving pills into the frier
if(istype(weapon, /obj/item/reagent_containers/pill))
if(!reagents.total_volume)
to_chat(user, span_warning("There's nothing to dissolve [weapon] in!"))
@@ -77,63 +95,116 @@ GLOBAL_LIST_INIT(oilfry_blacklisted_items, typecacheof(list(
weapon.reagents.trans_to(src, weapon.reagents.total_volume, transfered_by = user)
qdel(weapon)
return
// Make sure we have cooking oil
if(!reagents.has_reagent(/datum/reagent/consumable/cooking_oil))
to_chat(user, span_warning("[src] has no cooking oil to fry with!"))
return
// Don't deep fry indestructible things, for sanity reasons
if(weapon.resistance_flags & INDESTRUCTIBLE)
to_chat(user, span_warning("You don't feel it would be wise to fry [weapon]..."))
return
if(istype(weapon, /obj/item/food/deepfryholder))
// No fractal frying
if(HAS_TRAIT(weapon, TRAIT_FOOD_FRIED))
to_chat(user, span_userdanger("Your cooking skills are not up to the legendary Doublefry technique."))
return
// Handle opening up the fryer with tools
if(default_deconstruction_screwdriver(user, "fryer_off", "fryer_off", weapon)) //where's the open maint panel icon?!
return
else
// So we skip the attack animation
if(weapon.is_drainable())
return // so we skip the attack animation
else if(is_type_in_typecache(weapon, deepfry_blacklisted_items) || is_type_in_typecache(weapon, GLOB.oilfry_blacklisted_items) || weapon.atom_storage || HAS_TRAIT(weapon, TRAIT_NODROP) || (weapon.item_flags & (ABSTRACT | DROPDEL)))
return
// Check for stuff we certainly shouldn't fry
else if(is_type_in_typecache(weapon, deepfry_blacklisted_items) \
|| is_type_in_typecache(weapon, GLOB.oilfry_blacklisted_items) \
|| weapon.atom_storage \
|| HAS_TRAIT(weapon, TRAIT_NODROP) \
|| (weapon.item_flags & (ABSTRACT|DROPDEL|HAND_ITEM)))
return ..()
// Do the frying.
else if(!frying && user.transferItemToLoc(weapon, src))
fry(weapon, user)
start_fry(weapon, user)
return
return ..()
/obj/machinery/deepfryer/process(delta_time)
..()
var/datum/reagent/consumable/cooking_oil/C = reagents.has_reagent(/datum/reagent/consumable/cooking_oil)
if(!C)
var/datum/reagent/consumable/cooking_oil/frying_oil = reagents.has_reagent(/datum/reagent/consumable/cooking_oil)
if(!frying_oil)
return
reagents.chem_temp = frying_oil.fry_temperature
if(!frying)
return
reagents.chem_temp = C.fry_temperature
if(frying)
reagents.trans_to(frying, oil_use * delta_time, multiplier = fry_speed * 3) //Fried foods gain more of the reagent thanks to space magic
cook_time += fry_speed * delta_time
if(cook_time >= DEEPFRYER_COOKTIME && !frying_fried)
frying_fried = TRUE //frying... frying... fried
playsound(src.loc, 'sound/machines/ding.ogg', 50, TRUE)
audible_message(span_notice("[src] dings!"))
else if (cook_time >= DEEPFRYER_BURNTIME && !frying_burnt)
frying_burnt = TRUE
visible_message(span_warning("[src] emits an acrid smell!"))
use_power(active_power_usage)
reagents.trans_to(frying, oil_use * delta_time, multiplier = fry_speed * 3) //Fried foods gain more of the reagent thanks to space magic
cook_time += fry_speed * delta_time
if(cook_time >= DEEPFRYER_COOKTIME && !frying_fried)
frying_fried = TRUE //frying... frying... fried
playsound(src.loc, 'sound/machines/ding.ogg', 50, TRUE)
audible_message(span_notice("[src] dings!"))
else if (cook_time >= DEEPFRYER_BURNTIME && !frying_burnt)
frying_burnt = TRUE
visible_message(span_warning("[src] emits an acrid smell!"))
use_power(active_power_usage)
/obj/machinery/deepfryer/Exited(atom/movable/gone, direction)
. = ..()
if(gone == frying)
reset_frying()
/obj/machinery/deepfryer/handle_atom_del(atom/deleting_atom)
. = ..()
if(deleting_atom == frying)
reset_frying()
/obj/machinery/deepfryer/proc/reset_frying()
if(!QDELETED(frying))
frying.AddElement(/datum/element/fried_item, cook_time)
frying = null
frying_fried = FALSE
frying_burnt = FALSE
fry_loop.stop()
cook_time = 0
icon_state = "fryer_off"
/obj/machinery/deepfryer/proc/start_fry(obj/item/frying_item, mob/user)
to_chat(user, span_notice("You put [frying_item] into [src]."))
if(istype(frying_item, /obj/item/freeze_cube))
log_bomber(user, "put a freeze cube in a", src)
visible_message(span_userdanger("[src] starts glowing... Oh no..."))
playsound(src, 'sound/effects/pray_chaplain.ogg', 100)
add_filter("entropic_ray", 10, list("type" = "rays", "size" = 35, "color" = COLOR_VIVID_YELLOW))
addtimer(CALLBACK(src, PROC_REF(blow_up)), 5 SECONDS)
frying = frying_item
// Give them reagents to put frying oil in
if(isnull(frying.reagents))
frying.create_reagents(50, INJECTABLE)
ADD_TRAIT(frying, TRAIT_FOOD_CHEF_MADE, REF(user))
SEND_SIGNAL(frying, COMSIG_ITEM_ENTERED_FRYER)
icon_state = "fryer_on"
fry_loop.start()
/obj/machinery/deepfryer/proc/blow_up()
visible_message(span_userdanger("[src] blows up from the entropic reaction!"))
explosion(src, devastation_range = 1, heavy_impact_range = 3, light_impact_range = 5, flame_range = 7)
deconstruct(FALSE)
/obj/machinery/deepfryer/attack_ai(mob/user)
return
/obj/machinery/deepfryer/attack_hand(mob/living/user, list/modifiers)
if(frying)
if(frying.loc == src)
to_chat(user, span_notice("You eject [frying] from [src]."))
frying.fry(cook_time)
icon_state = "fryer_off"
frying.forceMove(drop_location())
if(Adjacent(user) && !issilicon(user))
user.put_in_hands(frying)
frying = null
cook_time = 0
frying_fried = FALSE
frying_burnt = FALSE
fry_loop.stop()
return
to_chat(user, span_notice("You eject [frying] from [src]."))
frying.forceMove(drop_location())
if(Adjacent(user) && !issilicon(user))
user.put_in_hands(frying)
return
else if(user.pulling && iscarbon(user.pulling) && reagents.total_volume)
if(user.grab_state < GRAB_AGGRESSIVE)
to_chat(user, span_warning("You need a better grip to do that!"))
@@ -151,6 +222,7 @@ GLOBAL_LIST_INIT(oilfry_blacklisted_items, typecacheof(list(
dunking_target.gib()
log_combat(user, dunking_target, "blew up", null, "by dunking them into [src]")
return
else if(target_temp < T0C)
cold_multiplier += round(target_temp * 1.5 / T0C, 0.01)
dunking_target.apply_damage(min(30 * bio_multiplier * cold_multiplier, reagents.total_volume), BURN, BODY_ZONE_HEAD)
@@ -160,23 +232,5 @@ GLOBAL_LIST_INIT(oilfry_blacklisted_items, typecacheof(list(
user.changeNext_move(CLICK_CD_MELEE)
return ..()
/obj/machinery/deepfryer/proc/fry(obj/item/frying_item, mob/user)
to_chat(user, span_notice("You put [frying_item] into [src]."))
if(istype(frying_item, /obj/item/freeze_cube))
log_bomber(user, "put a freeze cube in a", src)
visible_message(span_userdanger("[src] starts glowing... Oh no..."))
playsound(src, 'sound/effects/pray_chaplain.ogg', 100)
add_filter("entropic_ray", 10, list("type" = "rays", "size" = 35, "color" = COLOR_VIVID_YELLOW))
addtimer(CALLBACK(src, PROC_REF(blow_up)), 5 SECONDS)
frying = new /obj/item/food/deepfryholder(src, frying_item)
ADD_TRAIT(frying, TRAIT_FOOD_CHEF_MADE, REF(user))
icon_state = "fryer_on"
fry_loop.start()
/obj/machinery/deepfryer/proc/blow_up()
visible_message(span_userdanger("[src] blows up from the entropic reaction!"))
explosion(src, devastation_range = 1, heavy_impact_range = 3, light_impact_range = 5, flame_range = 7)
qdel(src)
#undef DEEPFRYER_COOKTIME
#undef DEEPFRYER_BURNTIME
@@ -22,6 +22,7 @@
grill_loop = new(src, FALSE)
/obj/machinery/grill/Destroy()
grilled_item = null
QDEL_NULL(grill_loop)
return ..()
@@ -100,14 +101,10 @@
grilled_item = null
return ..()
/obj/machinery/grill/Destroy()
grilled_item = null
. = ..()
/obj/machinery/grill/handle_atom_del(atom/A)
if(A == grilled_item)
grilled_item = null
. = ..()
return ..()
/obj/machinery/grill/wrench_act(mob/living/user, obj/item/I)
. = ..()
@@ -135,7 +132,8 @@
/obj/machinery/grill/proc/finish_grill()
if(grilled_item)
grilled_item.AddElement(/datum/element/grilled_item, grill_time)
if(grill_time >= 20)
grilled_item.AddElement(/datum/element/grilled_item, grill_time)
UnregisterSignal(grilled_item, COMSIG_ITEM_GRILLED)
grill_time = 0
grill_loop.stop()
@@ -174,18 +174,18 @@
. = ..()
if(!holder || (holder.chem_temp <= fry_temperature))
return
if(!isitem(exposed_obj) || istype(exposed_obj, /obj/item/food/deepfryholder))
if(!isitem(exposed_obj) || HAS_TRAIT(exposed_obj, TRAIT_FOOD_FRIED))
return
if(is_type_in_typecache(exposed_obj, GLOB.oilfry_blacklisted_items) || (exposed_obj.resistance_flags & INDESTRUCTIBLE))
exposed_obj.loc.visible_message(span_notice("The hot oil has no effect on [exposed_obj]!"))
exposed_obj.visible_message(span_notice("The hot oil has no effect on [exposed_obj]!"))
return
if(exposed_obj.atom_storage)
exposed_obj.loc.visible_message(span_notice("The hot oil splatters about as [exposed_obj] touches it. It seems too full to cook properly!"))
exposed_obj.visible_message(span_notice("The hot oil splatters about as [exposed_obj] touches it. It seems too full to cook properly!"))
return
exposed_obj.loc.visible_message(span_warning("[exposed_obj] rapidly fries as it's splashed with hot oil! Somehow."))
var/obj/item/food/deepfryholder/fry_target = new(exposed_obj.drop_location(), exposed_obj)
fry_target.fry(volume)
fry_target.reagents.add_reagent(/datum/reagent/consumable/cooking_oil, reac_volume)
exposed_obj.visible_message(span_warning("[exposed_obj] rapidly fries as it's splashed with hot oil! Somehow."))
exposed_obj.AddElement(/datum/element/fried_item, volume)
exposed_obj.reagents.add_reagent(/datum/reagent/consumable/cooking_oil, reac_volume)
/datum/reagent/consumable/cooking_oil/expose_mob(mob/living/exposed_mob, methods = TOUCH, reac_volume, show_message = TRUE, touch_protection = 0)
. = ..()
@@ -149,9 +149,9 @@
var/obj/item/food_item = new chosen(T)
ADD_TRAIT(food_item, TRAIT_FOOD_SILVER, INNATE_TRAIT)
if(prob(5))//Fry it!
var/obj/item/food/deepfryholder/fried
fried = new(T, food_item)
fried.fry() // actually set the name and colour it
AddElement(/datum/element/fried_item, rand(15, 60))
if(prob(5))//Grill it!
AddElement(/datum/element/grilled_item, rand(30, 100))
if(prob(50))
for(var/j in 1 to rand(1, 3))
step(food_item, pick(NORTH,SOUTH,EAST,WEST))
@@ -49,8 +49,6 @@ GLOBAL_VAR_INIT(running_create_and_destroy, FALSE)
//Same to above. Needs a client / mob / hallucination to observe it to exist.
ignore += typesof(/obj/projectile/hallucination)
ignore += typesof(/obj/item/hallucinated)
//These want fried food to take on the shape of, we can't pass that in
ignore += typesof(/obj/item/food/deepfryholder)
//Can't pass in a thing to glow
ignore += typesof(/obj/effect/abstract/eye_lighting)
//We don't have a pod
@@ -5,7 +5,6 @@
var/list/not_food = list(
/obj/item/food/grown,
/obj/item/food/grown/mushroom,
/obj/item/food/deepfryholder,
/obj/item/food/clothing,
/obj/item/food/meat/slab/human/mutant,
/obj/item/food/grown/shell)
+1 -1
View File
@@ -1188,6 +1188,7 @@
#include "code\datums\elements\decals\blood.dm"
#include "code\datums\elements\food\dunkable.dm"
#include "code\datums\elements\food\food_trash.dm"
#include "code\datums\elements\food\fried_item.dm"
#include "code\datums\elements\food\grilled_item.dm"
#include "code\datums\elements\food\microwavable.dm"
#include "code\datums\elements\food\processable.dm"
@@ -1816,7 +1817,6 @@
#include "code\game\objects\items\food\burgers.dm"
#include "code\game\objects\items\food\cake.dm"
#include "code\game\objects\items\food\cheese.dm"
#include "code\game\objects\items\food\deepfried.dm"
#include "code\game\objects\items\food\donkpocket.dm"
#include "code\game\objects\items\food\donuts.dm"
#include "code\game\objects\items\food\dough.dm"