Show total building block cost in multi-selection panel (relevant for temporary blueprint)
This commit is contained in:
@@ -31,4 +31,18 @@ struct BuildingDef
|
||||
struct BuildingsConfig
|
||||
{
|
||||
std::vector<BuildingDef> buildings;
|
||||
|
||||
// Returns the definition for the given building type, or nullptr if the
|
||||
// type has no entry in buildings.toml.
|
||||
const BuildingDef* findBuildingDef(BuildingType type) const
|
||||
{
|
||||
for (const BuildingDef& def : buildings)
|
||||
{
|
||||
if (def.type == type)
|
||||
{
|
||||
return &def;
|
||||
}
|
||||
}
|
||||
return nullptr;
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user