57 lines
2.5 KiB
Plaintext
57 lines
2.5 KiB
Plaintext
|
|
// 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",
|
||
|
|
variants: { "lit": "sprites/buildings/furnace_lit.png" },
|
||
|
|
stations: ["furnace"],
|
||
|
|
construction: Some({ materials: [("iron_ore", 4), ("log", 1)], xp: 10,
|
||
|
|
skill: Some({ skill: "construction", level: 1 }) }),
|
||
|
|
on_interact: Some("furnace::toggle"),
|
||
|
|
},
|
||
|
|
{
|
||
|
|
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 },
|
||
|
|
},
|
||
|
|
]
|