diff options
Diffstat (limited to 'universe')
-rw-r--r-- | universe/include/kurator/universe/ShipType.h | 2 | ||||
-rw-r--r-- | universe/resources/universe/ship_types.json | 6 | ||||
-rw-r--r-- | universe/src/JsonRepository.cpp | 2 |
3 files changed, 10 insertions, 0 deletions
diff --git a/universe/include/kurator/universe/ShipType.h b/universe/include/kurator/universe/ShipType.h index fdbb8af..c98a865 100644 --- a/universe/include/kurator/universe/ShipType.h +++ b/universe/include/kurator/universe/ShipType.h @@ -13,6 +13,8 @@ struct ShipType { std::string name; double base_structure_points; + double base_armour_points; + double base_shield_points; double max_speed; }; diff --git a/universe/resources/universe/ship_types.json b/universe/resources/universe/ship_types.json index cc2d892..0e7bc89 100644 --- a/universe/resources/universe/ship_types.json +++ b/universe/resources/universe/ship_types.json @@ -2,16 +2,22 @@ { "name": "Anvil", "base_structure_points": 600.0, + "base_armour_points": 400.0, + "base_shield_points": 3700.0, "max_speed": 218.0 }, { "name": "Eclipse", "base_structure_points": 600.0, + "base_armour_points": 950.0, + "base_shield_points": 200.0, "max_speed": 263.0 }, { "name": "Warbringer", "base_structure_points": 600.0, + "base_armour_points": 400.0, + "base_shield_points": 1400.0, "max_speed": 336.0 } ] diff --git a/universe/src/JsonRepository.cpp b/universe/src/JsonRepository.cpp index 40b0b70..e8c8ed3 100644 --- a/universe/src/JsonRepository.cpp +++ b/universe/src/JsonRepository.cpp @@ -27,6 +27,8 @@ from_json(const json& item, ShipType& ship) { item.at("name").get_to(ship.name); item.at("base_structure_points").get_to(ship.base_structure_points); + item.at("base_armour_points").get_to(ship.base_armour_points); + item.at("base_shield_points").get_to(ship.base_shield_points); item.at("max_speed").get_to(ship.max_speed); } |