diff --git a/code/datums/components/food/edible.dm b/code/datums/components/food/edible.dm index 31863b503fb..ea0ea545107 100644 --- a/code/datums/components/food/edible.dm +++ b/code/datums/components/food/edible.dm @@ -321,6 +321,7 @@ Behavior that's still missing from this component that original food items had t var/atom/owner = parent if(!owner?.reagents) + stack_trace("[eater] failed to bite [owner], because [owner] had no reagents.") return FALSE if(eater.satiety > -200) eater.satiety -= junkiness diff --git a/code/game/gamemodes/clown_ops/clown_weapons.dm b/code/game/gamemodes/clown_ops/clown_weapons.dm index 3a4de60b968..5abc41ecf98 100644 --- a/code/game/gamemodes/clown_ops/clown_weapons.dm +++ b/code/game/gamemodes/clown_ops/clown_weapons.dm @@ -176,16 +176,21 @@ //BOMBANANA +/obj/item/seeds/banana/bombanana + name = "pack of bombanana seeds" + desc = "They're seeds that grow into bombanana trees. When grown, give to the clown." + plantname = "Bombanana Tree" + product = /obj/item/food/grown/banana/bombanana + /obj/item/food/grown/banana/bombanana trash_type = /obj/item/grown/bananapeel/bombanana - bite_consumption = 1 - seed = null + seed = /obj/item/seeds/banana/bombanana tastes = list("explosives" = 10) food_reagents = list(/datum/reagent/consumable/nutriment/vitamin = 1) /obj/item/grown/bananapeel/bombanana desc = "A peel from a banana. Why is it beeping?" - seed = null + seed = /obj/item/seeds/banana/bombanana var/det_time = 50 var/obj/item/grenade/syndieminibomb/bomb diff --git a/code/game/objects/items/food/meat.dm b/code/game/objects/items/food/meat.dm index 65cea9a6e97..442cc149217 100644 --- a/code/game/objects/items/food/meat.dm +++ b/code/game/objects/items/food/meat.dm @@ -865,9 +865,9 @@ food_reagents = list(/datum/reagent/consumable/nutriment/protein = 4, /datum/reagent/consumable/cooking_oil = 3) tastes = list("beef" = 1, "cod fish" = 1) -/obj/item/food/meat/slab/gondola/MakeProcessable() +/obj/item/food/meat/slab/penguin/MakeProcessable() . = ..() - AddElement(/datum/element/processable, TOOL_KNIFE, /obj/item/food/meat/rawcutlet/gondola, 3, 30) + AddElement(/datum/element/processable, TOOL_KNIFE, /obj/item/food/meat/rawcutlet/penguin, 3, 30) /obj/item/food/meat/slab/penguin/MakeGrillable() AddComponent(/datum/component/grillable, /obj/item/food/meat/steak/penguin, rand(30 SECONDS, 90 SECONDS), TRUE, TRUE) //Add medium rare later maybe? diff --git a/code/modules/unit_tests/_unit_tests.dm b/code/modules/unit_tests/_unit_tests.dm index 4528a832494..2ef83c14d27 100644 --- a/code/modules/unit_tests/_unit_tests.dm +++ b/code/modules/unit_tests/_unit_tests.dm @@ -49,6 +49,7 @@ #include "designs.dm" #include "dynamic_ruleset_sanity.dm" #include "emoting.dm" +#include "food_edibility_check.dm" #include "heretic_knowledge.dm" #include "holidays.dm" #include "hydroponics_harvest.dm" diff --git a/code/modules/unit_tests/food_edibility_check.dm b/code/modules/unit_tests/food_edibility_check.dm new file mode 100644 index 00000000000..6a01cd1b963 --- /dev/null +++ b/code/modules/unit_tests/food_edibility_check.dm @@ -0,0 +1,24 @@ +/// Makes sure that spawned food has reagents and the edible component (or else it can't be eaten). +/datum/unit_test/food_edibility_check + +/datum/unit_test/food_edibility_check/Run() + var/list/not_food = list( + /obj/item/food/grown, + /obj/item/food/grown/mushroom, + /obj/item/food/deepfryholder, + /obj/item/food/clothing, + /obj/item/food/meat/slab/human/mutant, + /obj/item/food/grown/shell) + + var/list/food_paths = subtypesof(/obj/item/food) - not_food + + for(var/food_path in food_paths) + var/obj/item/food/spawned_food = allocate(food_path) + + if(!spawned_food.reagents) + Fail("[food_path] does not have any reagents, making it inedible!") + + if(!IS_EDIBLE(spawned_food)) + Fail("[food_path] does not have the edible component, making it inedible!") + + qdel(spawned_food)