Improve AI garrisons, player recovery and mission administration

This commit is contained in:
2026-09-24 22:12:45 +02:00
parent 1b1a8b5173
commit 2551d171b3
115 changed files with 3622 additions and 547 deletions
+2 -2
View File
@@ -23,7 +23,7 @@ for year in (1900, 1989, 2000, 2024, 2050):
run('#include <cassert>\n#include <string>\n#include <cmath>\n' + rules + r"""
int main() {
int lo=-1,hi=-1;
for (std::string key:{"reportIntervalSeconds","supportSquadLimit","responseRadiusMetres","aiIntelChancePercent","intelRevealChancePercent","radioDefenceSeconds","startTimeMinutes","timeMultiplier","startDateCode","weatherProfile","convoyCount","heliTimerMinutes"}) {
for (std::string key:{"reportIntervalSeconds","supportSquadLimit","responseRadiusMetres","aiIntelChancePercent","intelRevealChancePercent","radioDefenceSeconds","startTimeMinutes","timeMultiplier","startDateCode","weatherProfile","convoyCount","heliTimerMinutes","antiAirChancePercent","antiPersonnelMineChancePercent"}) {
assert(ValidSelection(key,-1)); assert(!Valid(key,-1));
assert(ValidSelection(key,-2)==(key=="startTimeMinutes")); assert(!ValidSelection(key,-3));
if(key=="startDateCode")continue;
@@ -31,7 +31,7 @@ int main() {
assert(lo<=hi);
for(int value=lo;value<=hi;value++) assert(Valid(key,value));
}
for(std::string key:{"unknown","","stingerChanceOneIn","automaticConvoyEnabled"}) assert(!ValidSelection(key,-1));
for(std::string key:{"unknown","","automaticConvoyEnabled"}) assert(!ValidSelection(key,-1));
assert(RandomBounds("convoyCount",lo,hi)&&lo==0&&hi==20);
assert(RandomBounds("weatherProfile",lo,hi)&&lo==1&&hi==3);
assert(RandomBounds("startTimeMinutes",lo,hi)&&lo==0&&hi==1439);