diff options
author | Aki <please@ignore.pl> | 2022-12-31 16:26:25 +0100 |
---|---|---|
committer | Aki <please@ignore.pl> | 2022-12-31 16:26:25 +0100 |
commit | b8d3a357428d3af09031d2ae8925e1c2e93810ba (patch) | |
tree | 2c6c78f963835143e4fb09d4e5ed424c3de99a81 /universe | |
parent | bdc690d00c3c2774730dd893ddccb14efc9e0b94 (diff) | |
download | kurator-b8d3a357428d3af09031d2ae8925e1c2e93810ba.zip kurator-b8d3a357428d3af09031d2ae8925e1c2e93810ba.tar.gz kurator-b8d3a357428d3af09031d2ae8925e1c2e93810ba.tar.bz2 |
Added rounds and reload time to turrets to enable burst weapons
Diffstat (limited to 'universe')
-rw-r--r-- | universe/include/kurator/universe/TurretType.h | 12 | ||||
-rw-r--r-- | universe/src/SampleRepository.cpp | 3 |
2 files changed, 9 insertions, 6 deletions
diff --git a/universe/include/kurator/universe/TurretType.h b/universe/include/kurator/universe/TurretType.h index ff67cfe..553894b 100644 --- a/universe/include/kurator/universe/TurretType.h +++ b/universe/include/kurator/universe/TurretType.h @@ -12,11 +12,13 @@ namespace universe struct TurretType { std::string name; - double base_damage; - double rate_of_fire; - double optimal_range; - double falloff_modifier; - double falloff_intensity; + int rounds = 1; + double base_damage = 0.0; + double rate_of_fire = 1.0; + double reload = 0.0; + double optimal_range = 0.0; + double falloff_modifier = 0.05; + double falloff_intensity = 0.2; double effective_damage(double distance) const; }; diff --git a/universe/src/SampleRepository.cpp b/universe/src/SampleRepository.cpp index 31f7807..857d175 100644 --- a/universe/src/SampleRepository.cpp +++ b/universe/src/SampleRepository.cpp @@ -23,7 +23,8 @@ static const std::unordered_map<std::string, ShipType> ships { static const std::unordered_map<std::string, TurretType> turrets { - {"ChargeLaser", {"ChargeLaser", 85.0, 4.5, 7000.0, 0.05, 0.2}}, + {"ChargeLaser", {"ChargeLaser", 1, 85.0, 4.5, 0.0, 7000.0, 0.05}}, + {"BurstLaser", {"BurstLaser", 3, 21.0, 0.25, 2.75, 3500.0, 0.05}}, }; |