feat: add persistent-world station game
Bevy ECS workspace with three crates:
- game_core: rsn data definitions, components, Tiled map loader, protocol
- game_server: authoritative simulation, Rune scripting, persistence,
dedicated server binary
- game_client: rendering, UI and input; embeds the server for
singleplayer and hosting
Items, recipes, buildings and skills are defined in assets/data, behavior
in Rune scripts under assets/scripts, and maps are made in Tiled.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-10-18 17:44:13 +00:00
|
|
|
// Building prototypes (anything placed on the grid: walls, machines, trees, ...).
|
|
|
|
|
//
|
|
|
|
|
// Fields: id, name, sprite (required); description, variants (name -> sprite),
|
|
|
|
|
// solid (true), max_health (100), stations (tags for recipes), construction
|
|
|
|
|
// ({ materials, tools, skill, xp }), deconstructible (true), on_interact, vars.
|
|
|
|
|
buildings: [
|
|
|
|
|
{
|
|
|
|
|
id: "wall", name: "Wall", sprite: "sprites/buildings/wall.png",
|
|
|
|
|
max_health: 300,
|
|
|
|
|
construction: Some({ materials: [("iron_plate", 2)], tools: ["wrench"], xp: 5,
|
|
|
|
|
skill: Some({ skill: "construction", level: 1 }) }),
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
id: "door", name: "Door", sprite: "sprites/buildings/door_closed.png",
|
|
|
|
|
variants: { "open": "sprites/buildings/door_open.png" },
|
|
|
|
|
construction: Some({ materials: [("iron_plate", 2), ("plank", 1)], tools: ["screwdriver"], xp: 10,
|
|
|
|
|
skill: Some({ skill: "construction", level: 1 }) }),
|
|
|
|
|
on_interact: Some("door::toggle"),
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
id: "workbench", name: "Workbench", sprite: "sprites/buildings/workbench.png",
|
|
|
|
|
stations: ["workbench"],
|
|
|
|
|
construction: Some({ materials: [("plank", 4)], xp: 10, skill: Some({ skill: "carpentry", level: 1 }) }),
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
id: "furnace", name: "Furnace", sprite: "sprites/buildings/furnace.png",
|
2026-10-18 18:28:16 +00:00
|
|
|
description: "Smelts ore. Fuel it with logs.",
|
feat: add persistent-world station game
Bevy ECS workspace with three crates:
- game_core: rsn data definitions, components, Tiled map loader, protocol
- game_server: authoritative simulation, Rune scripting, persistence,
dedicated server binary
- game_client: rendering, UI and input; embeds the server for
singleplayer and hosting
Items, recipes, buildings and skills are defined in assets/data, behavior
in Rune scripts under assets/scripts, and maps are made in Tiled.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-10-18 17:44:13 +00:00
|
|
|
variants: { "lit": "sprites/buildings/furnace_lit.png" },
|
|
|
|
|
construction: Some({ materials: [("iron_ore", 4), ("log", 1)], xp: 10,
|
|
|
|
|
skill: Some({ skill: "construction", level: 1 }) }),
|
2026-10-18 18:28:16 +00:00
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
id: "assembler", name: "Assembler", sprite: "sprites/buildings/assembler.png",
|
|
|
|
|
description: "Assembles tools from parts.",
|
|
|
|
|
variants: { "active": "sprites/buildings/assembler_active.png" },
|
|
|
|
|
construction: Some({ materials: [("iron_plate", 4), ("plank", 2)], tools: ["screwdriver"],
|
|
|
|
|
xp: 20, skill: Some({ skill: "construction", level: 1 }) }),
|
feat: add persistent-world station game
Bevy ECS workspace with three crates:
- game_core: rsn data definitions, components, Tiled map loader, protocol
- game_server: authoritative simulation, Rune scripting, persistence,
dedicated server binary
- game_client: rendering, UI and input; embeds the server for
singleplayer and hosting
Items, recipes, buildings and skills are defined in assets/data, behavior
in Rune scripts under assets/scripts, and maps are made in Tiled.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-10-18 17:44:13 +00:00
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
id: "table", name: "Table", sprite: "sprites/buildings/table.png",
|
|
|
|
|
construction: Some({ materials: [("plank", 2)], skill: Some({ skill: "carpentry", level: 1 }), xp: 5 }),
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
id: "vending_machine", name: "Vending machine", sprite: "sprites/buildings/vending.png",
|
|
|
|
|
description: "Dispenses bread while stock lasts.",
|
|
|
|
|
deconstructible: false,
|
|
|
|
|
on_interact: Some("vending::dispense"),
|
|
|
|
|
vars: { "stock": 5 },
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
id: "tree", name: "Tree", sprite: "sprites/buildings/tree.png",
|
|
|
|
|
deconstructible: false,
|
|
|
|
|
on_interact: Some("gather::chop"),
|
|
|
|
|
vars: { "wood": 3 },
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
id: "ore_rock", name: "Ore rock", sprite: "sprites/buildings/ore_rock.png",
|
|
|
|
|
deconstructible: false,
|
|
|
|
|
on_interact: Some("gather::mine"),
|
|
|
|
|
vars: { "ore": 5 },
|
|
|
|
|
},
|
|
|
|
|
]
|