Files
dota_factory/src/lib/config/ShipsConfig.h

57 lines
1.5 KiB
C++

#pragma once
#include <string>
#include <vector>
#include "RecipesConfig.h" // for RecipeIngredient
#include "ShipLayout.h" // for PlacedModule
// Build materials and base production time (REQ-BLD-SHIPYARD, REQ-DEF-SCHEMATIC-DROP).
struct ShipSchematic
{
std::vector<RecipeIngredient> materials;
double productionTimeSeconds;
};
struct ShipHealth
{
float hp; // REQ-SHP-STATS
};
struct ShipMovement
{
float speed_mps; // max linear speed cap, m/s (REQ-SHP-STATS, REQ-SHP-MOVEMENT)
float mainAcceleration_mpss; // forward acceleration, m/s²
float maneuveringAcceleration_mpss;// omnidirectional acceleration, m/s²
float angularAcceleration_radpss; // angular acceleration, rad/s²
float maxRotationSpeed_radps; // angular velocity cap, rad/s
};
struct ShipSensor
{
float sensorRange_m; // REQ-SHP-SENSOR, REQ-SHP-STATS
};
struct ShipDef
{
std::string id;
int unlockAtStationLevel;
// Prerequisite schematic ids that must be explicitly unlocked before this
// schematic can enter the drop pool (REQ-LOCK-PREREQ). Empty = none.
std::vector<std::string> unlockRequires;
std::vector<std::string> layout;
ShipSchematic schematic;
ShipHealth health;
ShipMovement movement;
ShipSensor sensor;
// Module layout used for enemy wave ships (REQ-WAV-DEFAULT-MODULES).
std::vector<PlacedModule> defaultModules;
};
struct ShipsConfig
{
std::vector<ShipDef> ships;
};