Merge pull request #12829 from timothyteakettle/fried-component

the fried component
This commit is contained in:
silicons
2020-07-20 16:59:36 -07:00
committed by GitHub
13 changed files with 150 additions and 131 deletions
@@ -115,11 +115,11 @@
/datum/reagent/consumable/cooking_oil/reaction_obj(obj/O, reac_volume)
if(holder && holder.chem_temp >= fry_temperature)
if(isitem(O) && !istype(O, /obj/item/reagent_containers/food/snacks/deepfryholder) && !(O.resistance_flags & (FIRE_PROOF|INDESTRUCTIBLE)))
if(isitem(O) && !O.GetComponent(/datum/component/fried) && !(O.resistance_flags & (FIRE_PROOF|INDESTRUCTIBLE)) && (!O.reagents || isfood(O))) //don't fry stuff we shouldn't
O.loc.visible_message("<span class='warning'>[O] rapidly fries as it's splashed with hot oil! Somehow.</span>")
var/obj/item/reagent_containers/food/snacks/deepfryholder/F = new(O.drop_location(), O)
F.fry(volume)
F.reagents.add_reagent(/datum/reagent/consumable/cooking_oil, reac_volume)
O.fry(volume)
if(O.reagents)
O.reagents.add_reagent(/datum/reagent/consumable/cooking_oil, reac_volume)
/datum/reagent/consumable/cooking_oil/reaction_mob(mob/living/M, method = TOUCH, reac_volume, show_message = 1, touch_protection = 0)
if(!istype(M))
@@ -141,10 +141,9 @@
/datum/reagent/consumable/cooking_oil/reaction_turf(turf/open/T, reac_volume)
if(!istype(T) || isgroundlessturf(T))
return
if(reac_volume >= 5)
if(reac_volume >= 5 && holder && holder.chem_temp >= fry_temperature)
T.MakeSlippery(TURF_WET_LUBE, min_wet_time = 10 SECONDS, wet_time_to_add = reac_volume * 1.5 SECONDS)
T.name = "deep-fried [initial(T.name)]"
T.add_atom_colour(color, TEMPORARY_COLOUR_PRIORITY)
T.fry(reac_volume/4)
/datum/reagent/consumable/sugar
name = "Sugar"
@@ -520,25 +520,6 @@
taste_description = "bad cooking"
value = REAGENT_VALUE_NONE
/datum/reagent/toxin/condensed_cooking_oil
name = "Condensed Cooking Oil"
description = "Taste the consequences of your mistakes."
reagent_state = LIQUID
color = "#d6d6d8"
metabolization_rate = 0.25 * REAGENTS_METABOLISM
toxpwr = 0
taste_mult = -2
taste_description = "awful cooking"
value = REAGENT_VALUE_NONE
/datum/reagent/toxin/condensed_cooking_oil/on_mob_life(mob/living/carbon/M)
if(prob(5))
M.vomit()
else
if(prob(40))
M.adjustOrganLoss(ORGAN_SLOT_HEART, 0.5) //For reference, bungotoxin does 3
..()
/datum/reagent/toxin/itching_powder
name = "Itching Powder"
description = "A powder that induces itching upon contact with the skin. Causes the victim to scratch at their itches and has a very low chance to decay into Histamine."
@@ -165,10 +165,7 @@
var/chosen = getbork()
var/obj/B = new chosen(T)
if(prob(5))//Fry it!
var/obj/item/reagent_containers/food/snacks/deepfryholder/fried
fried = new(T, B)
fried.fry() // actually set the name and colour it
B = fried
B.fry() // actually set the name and colour it
if(prob(50))
for(var/j in 1 to rand(1, 3))
step(B, pick(NORTH,SOUTH,EAST,WEST))