Add simple container recipe

This commit is contained in:
2026-05-17 17:41:05 -07:00
parent 5da545e000
commit ef658a380e
10 changed files with 101 additions and 2 deletions
+9
View File
@@ -103,6 +103,15 @@ ITEMS = [
"unit_weight": 25.0,
"max_stack_size": 1,
},
{
"asset": "DA_Item_SimpleContainer",
"item_id": "simple_container",
"display_name": "Simple Container",
"description": "A crude hide-and-frame container for early storage, trade, and later placed-container systems.",
"item_type": unreal.AgrarianItemType.STRUCTURE,
"unit_weight": 8.0,
"max_stack_size": 5,
},
{
"asset": "DA_Item_BasicTool",
"item_id": "basic_tool",
+10
View File
@@ -13,6 +13,7 @@ ITEM_DISPLAY = {
"primitive_roof_panel": ("Primitive Roof Panel", 4.0),
"campfire": ("Campfire", 12.0),
"primitive_shelter": ("Primitive Shelter", 25.0),
"simple_container": ("Simple Container", 8.0),
"basic_tool": ("Basic Tool", 1.2),
"bandage": ("Bandage", 0.1),
}
@@ -78,6 +79,15 @@ RECIPES = [
"craft_seconds": 6.0,
"requires_campfire": False,
},
{
"asset": "DA_Recipe_SimpleContainer",
"recipe_id": "simple_container",
"display_name": "Simple Container",
"ingredients": [("wood", 3), ("fiber", 6), ("hide", 2)],
"result": ("simple_container", 1),
"craft_seconds": 10.0,
"requires_campfire": False,
},
{
"asset": "DA_Recipe_Bandage",
"recipe_id": "bandage",
+1
View File
@@ -15,6 +15,7 @@ EXPECTED_ITEMS = {
"DA_Item_PrimitiveRoofPanel": ("primitive_roof_panel", unreal.AgrarianItemType.STRUCTURE),
"DA_Item_Campfire": ("campfire", unreal.AgrarianItemType.STRUCTURE),
"DA_Item_PrimitiveShelter": ("primitive_shelter", unreal.AgrarianItemType.STRUCTURE),
"DA_Item_SimpleContainer": ("simple_container", unreal.AgrarianItemType.STRUCTURE),
"DA_Item_BasicTool": ("basic_tool", unreal.AgrarianItemType.TOOL),
"DA_Item_Bandage": ("bandage", unreal.AgrarianItemType.MEDICINE),
}
+5
View File
@@ -40,6 +40,11 @@ EXPECTED_RECIPES = {
"ingredients": {"wood": 1, "stone": 2, "fiber": 1},
"result": ("basic_tool", 1),
},
"DA_Recipe_SimpleContainer": {
"recipe_id": "simple_container",
"ingredients": {"wood": 3, "fiber": 6, "hide": 2},
"result": ("simple_container", 1),
},
"DA_Recipe_Bandage": {
"recipe_id": "bandage",
"ingredients": {"fiber": 3, "hide": 1},
+58
View File
@@ -0,0 +1,58 @@
from pathlib import Path
ROOT = Path(__file__).resolve().parents[1]
EXPECTED = {
ROOT / "Scripts" / "setup_item_definitions.py": [
'"asset": "DA_Item_SimpleContainer"',
'"item_id": "simple_container"',
'"display_name": "Simple Container"',
"early storage, trade, and later placed-container systems",
],
ROOT / "Scripts" / "verify_item_definitions.py": [
'"DA_Item_SimpleContainer": ("simple_container", unreal.AgrarianItemType.STRUCTURE)',
],
ROOT / "Scripts" / "setup_recipe_definitions.py": [
'"asset": "DA_Recipe_SimpleContainer"',
'"recipe_id": "simple_container"',
'("wood", 3)',
'("fiber", 6)',
'("hide", 2)',
'"result": ("simple_container", 1)',
],
ROOT / "Scripts" / "verify_recipe_definitions.py": [
'"DA_Recipe_SimpleContainer"',
'"ingredients": {"wood": 3, "fiber": 6, "hide": 2}',
'"result": ("simple_container", 1)',
],
ROOT / "AGRARIAN_DEVELOPMENT_ROADMAP.md": [
"[x] Add simple container recipe.",
],
ROOT / "Docs" / "TechnicalDesignDocument.md": [
"`simple_container`",
"foundation for later placed storage and trade-container systems",
],
ROOT / "Docs" / "InventoryDataModel.md": [
"The 0.1.G `simple_container` recipe is intentionally only a craftable inventory",
"actual placed-container inventory, permissions, volume",
],
}
def main() -> None:
missing = []
for path, snippets in EXPECTED.items():
text = path.read_text(encoding="utf-8")
for snippet in snippets:
if snippet not in text:
missing.append(f"{path.relative_to(ROOT)}: {snippet}")
if missing:
raise RuntimeError("Simple container recipe verification failed: " + "; ".join(missing))
print("PASS: simple container item and recipe definitions are scripted, verified, and tracked in the roadmap.")
if __name__ == "__main__":
main()