Changes frying to a whitelist, whitelists some things (#15029)

This commit is contained in:
adamsong
2022-07-29 20:42:06 -04:00
committed by GitHub
parent b2512649d7
commit a537094863
8 changed files with 14 additions and 5 deletions

View File

@@ -138,6 +138,9 @@ GLOBAL_DATUM_INIT(welding_sparks, /mutable_appearance, mutable_appearance('icons
/// Should the cryo console preserve this item
var/cryo_preserve = FALSE
/// Is this item fryable without a syndicate frying pan
var/fryable = FALSE
/obj/item/Initialize()
materials = typelist("materials", materials)

View File

@@ -153,6 +153,7 @@
throw_speed = 3
throw_range = 7
attack_verb = list("HONKED")
fryable = TRUE
/obj/item/bikehorn/afterattack(atom/target, mob/user, proximity_flag, click_parameters)
. = ..()

View File

@@ -6,6 +6,7 @@
desc = "This is rubbish."
w_class = WEIGHT_CLASS_TINY
resistance_flags = FLAMMABLE
fryable = TRUE
/obj/item/trash/raisins
name = "\improper 4no raisins"

View File

@@ -3,6 +3,7 @@
resistance_flags = FLAMMABLE
max_integrity = 200
integrity_failure = 80
fryable = TRUE
var/damaged_clothes = CLOTHING_PRISTINE //similar to machine's BROKEN stat and structure's broken var
var/flash_protect = 0 //What level of bright light protection item has. 1 = Flashers, Flashes, & Flashbangs | 2 = Welding | -1 = OH GOD WELDING BURNT OUT MY RETINAS
var/tint = 0 //Sets the item's level of visual impairment tint, normally set to the same as flash_protect

View File

@@ -12,6 +12,7 @@
volume = 50 //Sets the default container amount for all food items.
reagent_flags = INJECTABLE
resistance_flags = FLAMMABLE
fryable = TRUE
var/foodtype = NONE
var/last_check_time
///Will this food turn into badrecipe on a grill? Don't use this for everything; preferably mostly for food that is made on a grill to begin with so it burns after some time

View File

@@ -245,6 +245,7 @@
icon = 'icons/obj/food/food.dmi'
icon_state = ""
bitesize = 2
fryable = FALSE
/obj/item/reagent_containers/food/snacks/deepfryholder/Initialize(mapload, obj/item/fried)
. = ..()

View File

@@ -120,7 +120,7 @@ God bless America.
else
if(user.a_intent != INTENT_HELP)
return ..()
if((!superfry && !istype(I, /obj/item/reagent_containers/food)) || HAS_TRAIT(I, TRAIT_NODROP) || (I.item_flags & (ABSTRACT | DROPDEL)))
if((!superfry && !I.fryable) || HAS_TRAIT(I, TRAIT_NODROP) || (I.item_flags & (ABSTRACT | DROPDEL)))
to_chat(user, span_warning("Your cooking skills do not allow you to fry [I]..."))
return
else if(!frying && user.transferItemToLoc(I, src))

View File

@@ -117,10 +117,11 @@
var/fry_temperature = 450 //Around ~350 F (117 C) which deep fryers operate around in the real world
/datum/reagent/consumable/cooking_oil/reaction_obj(obj/O, reac_volume)
if(holder && holder.chem_temp >= fry_temperature)
if(istype(O, /obj/item/reagent_containers/food) && !istype(O, /obj/item/reagent_containers/food/snacks/deepfryholder))
O.loc.visible_message(span_warning("[O] rapidly fries as it's splashed with hot oil! Somehow."))
var/obj/item/reagent_containers/food/snacks/deepfryholder/F = new(O.drop_location(), O)
if(holder && holder.chem_temp >= fry_temperature && isitem(O))
var/obj/item/I = O
if(I.fryable)
I.loc.visible_message(span_warning("[I] rapidly fries as it's splashed with hot oil! Somehow."))
var/obj/item/reagent_containers/food/snacks/deepfryholder/F = new(I.drop_location(), O)
F.fry(volume)
F.reagents.add_reagent(/datum/reagent/consumable/cooking_oil, reac_volume)