From 965af7a3c4adca9caee9641e1c16a0cb377f7524 Mon Sep 17 00:00:00 2001 From: Aki Date: Sat, 24 Dec 2022 14:30:23 +0100 Subject: Implemented scenario editor for example scenario to fool around --- campaign/include/kurator/campaign/scenarios.h | 2 +- campaign/src/scenarios.cpp | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) (limited to 'campaign') 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; -- cgit v1.1