Add baking and grilling results to the blackbox (#71632)

## About The Pull Request
Adds baking and grilling results to the blackbox. Microwaved and crafted
foods were being logged here, but the logging messages were lost when we
got the grilling and baking components.

## Why It's Good For The Game
More food logging yeehaw

## Changelog
No player-facing changes

Co-authored-by: tattle <article.disaster@gmail.com>
This commit is contained in:
tattle
2022-12-01 05:26:25 +00:00
committed by GitHub
co-authored by tattle
parent 9aaa9574ee
commit bcbe219973
4 changed files with 7 additions and 3 deletions
+2
View File
@@ -174,3 +174,5 @@ DEFINE_BITFIELD(food_flags, list(
#define DEFAULT_MAX_ICE_CREAM_SCOOPS 3
// the vertical distance in pixels from an ice cream scoop and another.
#define ICE_CREAM_SCOOP_OFFSET 4
#define BLACKBOX_LOG_FOOD_MADE(food) SSblackbox.record_feedback("tally", "food_made", 1, food)
+1 -1
View File
@@ -64,7 +64,6 @@
///Ran when an object finished baking
/datum/component/bakeable/proc/finish_baking(atom/used_oven)
var/atom/original_object = parent
var/obj/item/plate/oven_tray/used_tray = original_object.loc
var/atom/baked_result = new bake_result(used_tray)
@@ -81,6 +80,7 @@
if(positive_result)
used_oven.visible_message(span_notice("You smell something great coming from [used_oven]."), blind_message = span_notice("You smell something great..."))
BLACKBOX_LOG_FOOD_MADE(baked_result.type)
else
used_oven.visible_message(span_warning("You smell a burnt smell coming from [used_oven]."), blind_message = span_warning("You smell a burnt smell..."))
SEND_SIGNAL(parent, COMSIG_ITEM_BAKED, baked_result)
+3 -1
View File
@@ -69,7 +69,6 @@
///Ran when an object finished grilling
/datum/component/grillable/proc/finish_grilling(atom/grill_source)
var/atom/original_object = parent
var/atom/grilled_result
@@ -82,6 +81,9 @@
if(original_object.custom_materials)
grilled_result.set_custom_materials(original_object.custom_materials)
if(IS_EDIBLE(grilled_result))
BLACKBOX_LOG_FOOD_MADE(grilled_result.type)
SEND_SIGNAL(parent, COMSIG_ITEM_GRILLED, grilled_result)
if(who_placed_us)
ADD_TRAIT(grilled_result, TRAIT_FOOD_CHEF_MADE, who_placed_us)
+1 -1
View File
@@ -49,7 +49,7 @@
result.reagents?.multiply_reagents(efficiency * CRAFTED_FOOD_BASE_REAGENT_MODIFIER)
source.reagents?.trans_to(result, source.reagents.total_volume)
SSblackbox.record_feedback("tally", "food_made", 1, result.type)
BLACKBOX_LOG_FOOD_MADE(result.type)
qdel(source)