add basic types and fix cmake
This commit is contained in:
26
src/lib/config/BuildingsConfig.h
Normal file
26
src/lib/config/BuildingsConfig.h
Normal file
@@ -0,0 +1,26 @@
|
||||
#pragma once
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
#include "BuildingType.h"
|
||||
|
||||
// A single entry from buildings.toml [[building]].
|
||||
struct BuildingDef
|
||||
{
|
||||
std::string id; // Raw id string from TOML, e.g. "miner".
|
||||
BuildingType type; // Parsed from id at load time.
|
||||
int cost; // REQ-BLD-COST
|
||||
bool playerPlaceable; // Shown in the build menu if true.
|
||||
double constructionTimeSeconds; // REQ-BLD-QUEUE
|
||||
|
||||
// Rows of the surface_mask (REQ-BLD requirements, "Surface Mask Format").
|
||||
// Stored as raw strings here; parsing into per-cell tiles + output ports
|
||||
// happens when buildings are placed, not at load time.
|
||||
std::vector<std::string> surfaceMask;
|
||||
};
|
||||
|
||||
struct BuildingsConfig
|
||||
{
|
||||
std::vector<BuildingDef> buildings;
|
||||
};
|
||||
Reference in New Issue
Block a user