mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-23 05:00:55 +01:00
[MIRROR] Fixes monkeycube size and organ callback and microwaves (#1107)
* Fixes monkeycube size and organ callback and microwaves (#54095) * fixes * dumb runtime * fixes eggs * Fixes monkeycube size and organ callback and microwaves Co-authored-by: Qustinnus <Floydje123@hotmail.com>
This commit is contained in:
@@ -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)
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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++
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user