Require oven baking before eggs can be eaten.
Raw eggs are ingredients only; cook-egg is oven-exclusive with cooked and burnt outputs.
@@ -13,7 +13,8 @@ import { CraftingItemId, tinderboxItemInstance } from "../../shared/definitions/
13
13
import { WoodItemId, ashItemIdForWood } from "../../shared/definitions/woodItems.js";
14
14
import { WoodTier } from "../../shared/definitions/materialTiers.js";
15
15
import { SkillId } from "../../shared/definitions/skills.js";
16
import { recipeDefinition } from "../../shared/crafting/stationRecipes.js";
16
import { recipeDefinition, recipesForStation } from "../../shared/crafting/stationRecipes.js";
17
import { ItemId, itemDefinition } from "../../shared/definitions/items.js";
17
18
import { emptyEquipment, emptySlots } from "../../shared/items/inventory.js";
18
19
import { totalXpForLevel } from "../../shared/skills/progression.js";
19
20
import { ashTintColor } from "../../shared/render/tint.js";
@@ -113,6 +114,22 @@ test("cook-venison recipe exists for oven and campfire with burnt output", () =>
113
114
assert.equal(recipe.inputs[0].itemId, CraftingItemId.rawMeat);
114
115
});
115
116
117
test("eggs cook only in an oven and cannot be eaten raw", () =>
118
{
119
assert.equal(itemDefinition(ItemId.egg).healing ?? 0, 0);
120
assert.equal(itemDefinition(ItemId.cookedEgg).healing, 3);
121
const recipe = recipeDefinition("cook-egg");
122
assert.ok(recipe);
123
assert.deepEqual(recipe.stationIds, [CraftingStationId.oven]);
124
assert.equal(recipe.output.itemId, ItemId.cookedEgg);
125
assert.equal(recipe.burntOutput.itemId, ItemId.burntEgg);
126
assert.equal(recipe.inputs[0].itemId, ItemId.egg);
127
assert.equal(
128
recipesForStation(CraftingStationId.fireplace).some((r) => r.recipeId === "cook-egg"),
129
false
130
);
131
});
132
116
133
test("fish cook recipes use the species name as craft label", () =>
117
134
{
118
135
const trout = recipeDefinition("cook-trout");
@@ -13,7 +13,8 @@ import { CraftingItemId, tinderboxItemInstance } from "../../shared/definitions/13
import { WoodItemId, ashItemIdForWood } from "../../shared/definitions/woodItems.js";13
import { WoodItemId, ashItemIdForWood } from "../../shared/definitions/woodItems.js";14
import { WoodTier } from "../../shared/definitions/materialTiers.js";14
import { WoodTier } from "../../shared/definitions/materialTiers.js";15
import { SkillId } from "../../shared/definitions/skills.js";15
import { SkillId } from "../../shared/definitions/skills.js";16
import { recipeDefinition } from "../../shared/crafting/stationRecipes.js";16
import { recipeDefinition, recipesForStation } from "../../shared/crafting/stationRecipes.js";17
import { ItemId, itemDefinition } from "../../shared/definitions/items.js";17
import { emptyEquipment, emptySlots } from "../../shared/items/inventory.js";18
import { emptyEquipment, emptySlots } from "../../shared/items/inventory.js";18
import { totalXpForLevel } from "../../shared/skills/progression.js";19
import { totalXpForLevel } from "../../shared/skills/progression.js";19
import { ashTintColor } from "../../shared/render/tint.js";20
import { ashTintColor } from "../../shared/render/tint.js";@@ -113,6 +114,22 @@ test("cook-venison recipe exists for oven and campfire with burnt output", () =>113
assert.equal(recipe.inputs[0].itemId, CraftingItemId.rawMeat);114
assert.equal(recipe.inputs[0].itemId, CraftingItemId.rawMeat);114
});115
});115
116
117
test("eggs cook only in an oven and cannot be eaten raw", () =>118
{119
assert.equal(itemDefinition(ItemId.egg).healing ?? 0, 0);120
assert.equal(itemDefinition(ItemId.cookedEgg).healing, 3);121
const recipe = recipeDefinition("cook-egg");122
assert.ok(recipe);123
assert.deepEqual(recipe.stationIds, [CraftingStationId.oven]);124
assert.equal(recipe.output.itemId, ItemId.cookedEgg);125
assert.equal(recipe.burntOutput.itemId, ItemId.burntEgg);126
assert.equal(recipe.inputs[0].itemId, ItemId.egg);127
assert.equal(128
recipesForStation(CraftingStationId.fireplace).some((r) => r.recipeId === "cook-egg"),129
false130
);131
});132
116
test("fish cook recipes use the species name as craft label", () =>133
test("fish cook recipes use the species name as craft label", () =>117
{134
{118
const trout = recipeDefinition("cook-trout");135
const trout = recipeDefinition("cook-trout");