define ship roles via added modules and allow multiple weapons
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
#pragma once
|
||||
|
||||
#include <optional>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
@@ -15,6 +16,26 @@ struct ModuleStatModifier
|
||||
Formula formula;
|
||||
};
|
||||
|
||||
// Capability sections — present when the module grants that capability.
|
||||
struct ModuleWeaponCapability
|
||||
{
|
||||
Formula damageFormula;
|
||||
Formula attackRangeFormula;
|
||||
Formula attackRateFormula;
|
||||
};
|
||||
|
||||
struct ModuleSalvageCapability
|
||||
{
|
||||
Formula collectionRangeFormula;
|
||||
Formula cargoCapacityFormula;
|
||||
};
|
||||
|
||||
struct ModuleRepairCapability
|
||||
{
|
||||
Formula repairRateFormula;
|
||||
Formula repairRangeFormula;
|
||||
};
|
||||
|
||||
struct ModuleDef
|
||||
{
|
||||
std::string id;
|
||||
@@ -26,6 +47,10 @@ struct ModuleDef
|
||||
std::string fillColor;
|
||||
std::string glyph;
|
||||
std::vector<ModuleStatModifier> statModifiers;
|
||||
|
||||
std::optional<ModuleWeaponCapability> weaponCapability;
|
||||
std::optional<ModuleSalvageCapability> salvageCapability;
|
||||
std::optional<ModuleRepairCapability> repairCapability;
|
||||
};
|
||||
|
||||
struct ModulesConfig
|
||||
|
||||
Reference in New Issue
Block a user