rename blueprint to schematic
This commit is contained in:
@@ -358,17 +358,17 @@ ShipsConfig ConfigLoader::loadShips(const std::string& path)
|
||||
def.id = requireString(mt["id"], file, elemPath + ".id");
|
||||
def.availableFromStart = requireBool(mt["available_from_start"], file, elemPath + ".available_from_start");
|
||||
|
||||
// Blueprint
|
||||
// Schematic
|
||||
{
|
||||
const std::string bpPath = elemPath + ".blueprint";
|
||||
const toml::table& bpTable = requireTable(mt["blueprint"], file, bpPath);
|
||||
const std::string bpPath = elemPath + ".schematic";
|
||||
const toml::table& bpTable = requireTable(mt["schematic"], file, bpPath);
|
||||
toml::table& bpMt = const_cast<toml::table&>(bpTable);
|
||||
|
||||
const toml::array& materials = requireArray(bpMt["materials"], file, bpPath + ".materials");
|
||||
def.blueprint.materials = parseIngredients(materials, file, bpPath + ".materials");
|
||||
def.blueprint.playerProductionLevel = static_cast<int>(requireInt(
|
||||
def.schematic.materials = parseIngredients(materials, file, bpPath + ".materials");
|
||||
def.schematic.playerProductionLevel = static_cast<int>(requireInt(
|
||||
bpMt["player_production_level"], file, bpPath + ".player_production_level"));
|
||||
def.blueprint.productionTimeSeconds = requireDouble(
|
||||
def.schematic.productionTimeSeconds = requireDouble(
|
||||
bpMt["production_time_seconds"], file, bpPath + ".production_time_seconds");
|
||||
}
|
||||
|
||||
|
||||
@@ -7,9 +7,9 @@
|
||||
#include "Formula.h"
|
||||
#include "RecipesConfig.h" // for RecipeIngredient
|
||||
|
||||
// Build materials and initial per-blueprint production level
|
||||
// (REQ-BLD-SHIPYARD, REQ-DEF-BLUEPRINT-DROP).
|
||||
struct ShipBlueprint
|
||||
// Build materials and initial per-schematic production level
|
||||
// (REQ-BLD-SHIPYARD, REQ-DEF-SCHEMATIC-DROP).
|
||||
struct ShipSchematic
|
||||
{
|
||||
std::vector<RecipeIngredient> materials;
|
||||
int playerProductionLevel;
|
||||
@@ -65,7 +65,7 @@ struct ShipDef
|
||||
std::string id;
|
||||
bool availableFromStart;
|
||||
|
||||
ShipBlueprint blueprint;
|
||||
ShipSchematic schematic;
|
||||
ShipThreat threat;
|
||||
ShipHealth health;
|
||||
ShipMovement movement;
|
||||
|
||||
Reference in New Issue
Block a user