mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-23 20:16:55 +01:00
Nanotrasen Chefs have now officially gone to Chef College (#25066)
* chef buff * comments and crap * blam * revert * s34n review * last review * Reduced expert chef cooldown to 5s. * Renamed things for clarity. * Moved Expert Chef Knowledge to IC * Don't use a Oven, use an Oven. * Made kitchen machines less egotistical. * Gave Expert Chef Knowledge a spell. * Apply suggestions from code review Co-authored-by: DGamerL <108773801+DGamerL@users.noreply.github.com> * Less demanding background. * Removed verb decoration and STATUS_USED_EXPERT_CHEF * Apply suggestions from code review Co-authored-by: DGamerL <108773801+DGamerL@users.noreply.github.com> * Apply suggestions from code review Co-authored-by: GDN <96800819+GDNgit@users.noreply.github.com> * Changed trait name. * Lint * Apply review comment. * Remove master-removed panel var * Update code/modules/mob/living/carbon/human/human_mob.dm Signed-off-by: DGamerL <108773801+DGamerL@users.noreply.github.com> --------- Signed-off-by: DGamerL <108773801+DGamerL@users.noreply.github.com> Co-authored-by: Contrabang <91113370+Contrabang@users.noreply.github.com> Co-authored-by: FunnyMan3595 (Charlie Nolan) <funnyman@google.com> Co-authored-by: DGamerL <108773801+DGamerL@users.noreply.github.com> Co-authored-by: GDN <96800819+GDNgit@users.noreply.github.com>
This commit is contained in:
co-authored by
DGamerL
GDN
Contrabang
FunnyMan3595
parent
06db6bc004
commit
3b351c8636
@@ -1967,3 +1967,67 @@ Eyes need to have significantly high darksight to shine unless the mob has the X
|
||||
set category = "IC"
|
||||
|
||||
update_flavor_text()
|
||||
|
||||
/mob/living/carbon/human/proc/expert_chef_knowledge()
|
||||
if(!HAS_TRAIT(mind, TRAIT_KNOWS_COOKING_RECIPES))
|
||||
return
|
||||
|
||||
var/list/possible_cookware = view(1, src)
|
||||
|
||||
for(var/obj/item/storage/storage in possible_cookware)
|
||||
possible_cookware += storage.contents
|
||||
possible_cookware -= storage
|
||||
|
||||
shuffle_inplace(possible_cookware)
|
||||
|
||||
var/list/available_ingredients = list()
|
||||
var/list/available_reagents = list()
|
||||
for(var/obj/item/item in possible_cookware)
|
||||
if(item.container_type == OPENCONTAINER && item.reagents)
|
||||
for(var/datum/reagent/reagent in item.reagents.reagent_list)
|
||||
if(!available_reagents[reagent.id])
|
||||
available_reagents[reagent.id] = 0
|
||||
available_reagents[reagent.id] += reagent.volume
|
||||
else
|
||||
if(!available_ingredients[item.type])
|
||||
available_ingredients[item.type] = 0
|
||||
available_ingredients[item.type] += 1
|
||||
|
||||
var/list/possible_recipes = list()
|
||||
for(var/datum/recipe/recipe_type as anything in subtypesof(/datum/recipe))
|
||||
if(!recipe_type.result)
|
||||
continue
|
||||
var/datum/recipe/recipe = new recipe_type()
|
||||
if(recipe.check_reagents_assoc_list(available_reagents) != INGREDIENT_CHECK_FAILURE && recipe.check_items_assoc_list(available_ingredients) != INGREDIENT_CHECK_FAILURE)
|
||||
if(istype(recipe, /datum/recipe/microwave))
|
||||
possible_recipes[recipe] = RECIPE_MICROWAVE
|
||||
else if(istype(recipe, /datum/recipe/oven))
|
||||
possible_recipes[recipe] = RECIPE_OVEN
|
||||
else if(istype(recipe, /datum/recipe/grill))
|
||||
possible_recipes[recipe] = RECIPE_GRILL
|
||||
else if(istype(recipe, /datum/recipe/candy))
|
||||
possible_recipes[recipe] = RECIPE_CANDY
|
||||
else
|
||||
possible_recipes[recipe] = "something? This shouldn't happen, make a bug report"
|
||||
|
||||
if(!length(possible_recipes))
|
||||
to_chat(src, "<span class='warning'>You can't think of anything to cook with the items around you.</span>")
|
||||
return
|
||||
|
||||
var/list/message = list("You draw upon your extensive experience in space food, contemplating what you could make with the items around you...")
|
||||
for(var/datum/recipe/recipe in possible_recipes)
|
||||
var/list/assoc = type_list_to_counted_assoc_list(recipe.items)
|
||||
var/list/ingredient_list = list()
|
||||
for(var/obj/item/path_key as anything in assoc)
|
||||
ingredient_list += "[assoc[path_key]] [initial(path_key.name)]\s"
|
||||
|
||||
var/list/required_reagents = list()
|
||||
for(var/reagent_id in recipe.reagents)
|
||||
var/datum/reagent/temp = GLOB.chemical_reagents_list[reagent_id]
|
||||
if(temp)
|
||||
required_reagents += "[recipe.reagents[reagent_id]] unit\s of [temp.name]"
|
||||
|
||||
var/obj/item/result = recipe.result
|
||||
message += "\tI could make [result.gender == PLURAL ? "some" : "a"] [bicon(result)] <b>[result.name]</b> by using \a [possible_recipes[recipe]] with [english_list(ingredient_list)][length(required_reagents) ? ", along with [english_list(required_reagents)]" : ""]."
|
||||
qdel(recipe)
|
||||
to_chat(src, chat_box_examine(message.Join("<br>")))
|
||||
|
||||
Reference in New Issue
Block a user