35 lines
800 B
C++
35 lines
800 B
C++
#pragma once
|
|
|
|
#include <string>
|
|
#include <vector>
|
|
|
|
#include "Formula.h"
|
|
#include "RecipesConfig.h"
|
|
|
|
// A single stat modifier contributed by a module instance.
|
|
// REQ-MOD-STAT-CALC: final = base * (1 + sum(m_i - 1)) + sum(additives).
|
|
struct ModuleStatModifier
|
|
{
|
|
std::string stat; // e.g. "hp", "speed", "sensor_range"
|
|
std::string modifierType; // "additive" or "multiplicative"
|
|
Formula formula;
|
|
};
|
|
|
|
struct ModuleDef
|
|
{
|
|
std::string id;
|
|
std::vector<std::string> surfaceMask;
|
|
std::vector<RecipeIngredient> materials;
|
|
int playerProductionLevel;
|
|
double productionTimeSeconds;
|
|
double threatCost;
|
|
std::string fillColor;
|
|
std::string glyph;
|
|
std::vector<ModuleStatModifier> statModifiers;
|
|
};
|
|
|
|
struct ModulesConfig
|
|
{
|
|
std::vector<ModuleDef> modules;
|
|
};
|