summaryrefslogtreecommitdiff
path: root/campaign
diff options
context:
space:
mode:
authorAki <please@ignore.pl>2022-12-24 14:30:23 +0100
committerAki <please@ignore.pl>2022-12-24 14:30:23 +0100
commit965af7a3c4adca9caee9641e1c16a0cb377f7524 (patch)
tree6ebb0c7cbefff70f14606dc3207e532e27e8df04 /campaign
parentfec58fc8f6b41f76c3f60a3747e0b6bd069f2701 (diff)
downloadkurator-965af7a3c4adca9caee9641e1c16a0cb377f7524.zip
kurator-965af7a3c4adca9caee9641e1c16a0cb377f7524.tar.gz
kurator-965af7a3c4adca9caee9641e1c16a0cb377f7524.tar.bz2
Implemented scenario editor for example scenario to fool around
Diffstat (limited to 'campaign')
-rw-r--r--campaign/include/kurator/campaign/scenarios.h2
-rw-r--r--campaign/src/scenarios.cpp12
2 files changed, 7 insertions, 7 deletions
diff --git a/campaign/include/kurator/campaign/scenarios.h b/campaign/include/kurator/campaign/scenarios.h
index cdc1e19..65b84c5 100644
--- a/campaign/include/kurator/campaign/scenarios.h
+++ b/campaign/include/kurator/campaign/scenarios.h
@@ -11,7 +11,7 @@ namespace scenarios
{
-Scenario example();
+Scenario example(int teams=2, int anvils=3, int warbringers=2, int eclipses=3, double distance=12000.0);
} // namespace scenarios
diff --git a/campaign/src/scenarios.cpp b/campaign/src/scenarios.cpp
index de57971..2a18d22 100644
--- a/campaign/src/scenarios.cpp
+++ b/campaign/src/scenarios.cpp
@@ -13,16 +13,16 @@ namespace scenarios
Scenario
-example()
+example(int teams, int anvils, int warbringers, int eclipses, double distance)
{
int id = 0;
- Scenario scenario {"Example", 12000, {}};
- for (int team = 0; team < 2; ++team) {
- for (int i = 0; i < 2; ++i)
+ Scenario scenario {"Example", distance, {}};
+ for (int team = 0; team < teams; ++team) {
+ for (int i = 0; i < anvils; ++i)
scenario.ships.push_back(ShipConfig{{id++}, team, "Anvil", {"ChargeLaser", "ChargeLaser"}});
- for (int i = 0; i < 3; ++i)
+ for (int i = 0; i < warbringers; ++i)
scenario.ships.push_back(ShipConfig{{id++}, team, "Warbringer", {"ChargeLaser"}});
- for (int i = 0; i < 5; ++i)
+ for (int i = 0; i < eclipses; ++i)
scenario.ships.push_back(ShipConfig{{id++}, team, "Eclipse", {"ChargeLaser"}});
}
return scenario;