diff --git a/code/__DEFINES/dcs/signals.dm b/code/__DEFINES/dcs/signals.dm index 42201e992e5..fccf1aaeccd 100644 --- a/code/__DEFINES/dcs/signals.dm +++ b/code/__DEFINES/dcs/signals.dm @@ -514,6 +514,7 @@ #define COMSIG_ITEM_WEARERCROSSED "wearer_crossed" ///called on item when microwaved (): (obj/machinery/microwave/M) #define COMSIG_ITEM_MICROWAVE_ACT "microwave_act" + #define COMPONENT_SUCCESFUL_MICROWAVE (1<<0) ///called on item when created through microwaving (): (obj/machinery/microwave/M, cooking_efficiency) #define COMSIG_ITEM_MICROWAVE_COOKED "microwave_cooked" ///from base of item/sharpener/attackby(): (amount, max) diff --git a/code/datums/components/food/edible.dm b/code/datums/components/food/edible.dm index 38e2f977a01..783ac607ac5 100644 --- a/code/datums/components/food/edible.dm +++ b/code/datums/components/food/edible.dm @@ -218,10 +218,9 @@ Behavior that's still missing from this component that original food items had t if(!microwaved_type) new /obj/item/reagent_containers/food/snacks/badrecipe(parent_turf) - qdel(src) + qdel(parent) return - var/obj/item/result result = new microwaved_type(parent_turf) @@ -231,6 +230,8 @@ Behavior that's still missing from this component that original food items had t SEND_SIGNAL(result, COMSIG_ITEM_MICROWAVE_COOKED, parent, efficiency) SSblackbox.record_feedback("tally", "food_made", 1, result.type) + qdel(parent) + return COMPONENT_SUCCESFUL_MICROWAVE ///Corrects the reagents on the newly cooked food /datum/component/edible/proc/OnMicrowaveCooked(datum/source, obj/item/source_item, cooking_efficiency = 1) diff --git a/code/game/objects/items.dm b/code/game/objects/items.dm index 7d59ec8b6c3..cb8a93e7e08 100644 --- a/code/game/objects/items.dm +++ b/code/game/objects/items.dm @@ -769,7 +769,8 @@ GLOBAL_VAR_INIT(embedpocalypse, FALSE) // if true, all items will be able to emb ..() /obj/item/proc/microwave_act(obj/machinery/microwave/M) - SEND_SIGNAL(src, COMSIG_ITEM_MICROWAVE_ACT, M) + if(SEND_SIGNAL(src, COMSIG_ITEM_MICROWAVE_ACT, M) & COMPONENT_SUCCESFUL_MICROWAVE) + return if(istype(M) && M.dirty < 100) M.dirty++ diff --git a/code/game/objects/items/food/egg.dm b/code/game/objects/items/food/egg.dm index 897fdb9588f..ba14a53705e 100644 --- a/code/game/objects/items/food/egg.dm +++ b/code/game/objects/items/food/egg.dm @@ -13,7 +13,7 @@ name = "egg" desc = "An egg!" icon_state = "egg" - food_reagents = list(/datum/reagent/consumable/eggyolk = 5) + food_reagents = list(/datum/reagent/consumable/eggyolk = 4) microwaved_type = /obj/item/food/boiledegg foodtypes = MEAT var/static/chick_count = 0 //I copied this from the chicken_count (note the "en" in there) variable from chicken code. @@ -95,7 +95,7 @@ name = "boiled egg" desc = "A hard boiled egg." icon_state = "egg" - food_reagents = list(/datum/reagent/consumable/nutriment/protein = 4, /datum/reagent/consumable/nutriment/vitamin = 1) + food_reagents = list(/datum/reagent/consumable/nutriment/protein = 3, /datum/reagent/consumable/nutriment/vitamin = 1) tastes = list("egg" = 1) foodtypes = MEAT | BREAKFAST diff --git a/code/game/objects/items/food/meat.dm b/code/game/objects/items/food/meat.dm index 68c16cf9022..ebb29752554 100644 --- a/code/game/objects/items/food/meat.dm +++ b/code/game/objects/items/food/meat.dm @@ -147,6 +147,7 @@ food_reagents = list(/datum/reagent/monkey_powder = 30) tastes = list("the jungle" = 1, "bananas" = 1) foodtypes = MEAT | SUGAR + w_class = WEIGHT_CLASS_TINY var/faction var/spawned_mob = /mob/living/carbon/monkey diff --git a/code/modules/surgery/organs/organ_internal.dm b/code/modules/surgery/organs/organ_internal.dm index 03722e0d037..b001fe0947c 100644 --- a/code/modules/surgery/organs/organ_internal.dm +++ b/code/modules/surgery/organs/organ_internal.dm @@ -33,7 +33,11 @@ /obj/item/organ/Initialize() . = ..() if(organ_flags & ORGAN_EDIBLE) - AddComponent(/datum/component/edible, food_reagents, null, RAW | MEAT | GROSS, null, 10, null, null, null, null, CALLBACK(src, .proc/OnEatFrom)) + AddComponent(/datum/component/edible,\ + initial_reagents = food_reagents,\ + foodtypes = RAW | MEAT | GROSS,\ + volume = 10,\ + after_eat = CALLBACK(src, .proc/OnEatFrom)) /obj/item/organ/proc/Insert(mob/living/carbon/M, special = FALSE, drop_if_replaced = TRUE) if(!iscarbon(M) || owner == M)