Add typed field-flight prototype and preserve native qualification failures

This commit is contained in:
2026-09-19 21:01:20 +02:00
parent 83ea247e62
commit 61e165ef5b
91 changed files with 40570 additions and 85 deletions
+32 -1
View File
@@ -19,6 +19,8 @@ modded class ERR_GameMode
protected bool m_ERRTestMortar;
protected bool m_ERRTestMortarFire;
protected bool m_ERRTestMapOwnership;
protected bool m_ERRTestAircraftField;
protected ref ERR_NativeAircraftFieldProbe m_ERRAircraftField;
protected bool m_ERRTestAircraftRoute;
protected ref ERR_NativeAircraftRouteProbe m_ERRAircraftRoute;
protected bool m_ERRTestAircraftControl;
@@ -49,6 +51,7 @@ modded class ERR_GameMode
m_ERRTestHQResponse = outcome == "hq-response";
m_ERRTestMortar = outcome == "mortar-inventory";
m_ERRTestMapOwnership = outcome == "map-ownership";
m_ERRTestAircraftField = outcome == "aircraft-field";
m_ERRTestAircraftRoute = outcome == "aircraft-route";
m_ERRTestAircraftCancel = outcome == "aircraft-cancel";
m_ERRTestAircraftTranslate = outcome == "aircraft-translate";
@@ -60,7 +63,7 @@ modded class ERR_GameMode
m_ERRTestPatrolHQ = outcome == "patrol-hq";
m_ERRTestPlayerDeath = outcome == "player-death" || m_ERRTestRadioNetwork || m_ERRTestHQResponse || m_ERRTestMortar;
m_ERRSmokeDeadline = GetWorld().GetWorldTime() + 150000;
if (m_ERRTestAircraftControl || m_ERRTestAircraftRoute) m_ERRSmokeDeadline = GetWorld().GetWorldTime() + 330000;
if (m_ERRTestAircraftControl || m_ERRTestAircraftRoute || m_ERRTestAircraftField) m_ERRSmokeDeadline = GetWorld().GetWorldTime() + 330000;
if (m_ERRTestMortarCourier) m_ERRSmokeDeadline = GetWorld().GetWorldTime() + 450000;
if (m_ERRTestMortarTransfer) m_ERRSmokeDeadline = GetWorld().GetWorldTime() + 330000;
if (m_ERRTestMortarSalvo) m_ERRSmokeDeadline = GetWorld().GetWorldTime() + 330000;
@@ -86,6 +89,7 @@ modded class ERR_GameMode
if (m_ERRMapOwnership) m_ERRMapOwnership.Stop();
if (m_ERRAircraftControl) m_ERRAircraftControl.Stop();
if (m_ERRAircraftRoute) m_ERRAircraftRoute.Stop();
if (m_ERRAircraftField) m_ERRAircraftField.Stop();
if (m_ERRHQResponseProof) m_ERRHQResponseProof.Stop();
if (m_ERRMortarSalvo) m_ERRMortarSalvo.Stop();
if (m_ERRMortarCourier) m_ERRMortarCourier.Stop();
@@ -126,6 +130,19 @@ modded class ERR_GameMode
protected void ERR_SmokePhase(ERR_Phase previous, ERR_Phase current)
{
if (m_ERRSmokeDone || !ERR_MissionRules.Terminal(current)) return;
if (m_ERRTestAircraftField)
{
if (!ERR_Check(current == ERR_Phase.DEFEAT && m_ERRSmokeStep == 241, "actual aircraft field fixture completed before explicit reset")) return;
m_ERRSmokeDone = true;
GetGame().GetCallqueue().Remove(ERR_SmokeTick);
ERR_StopHQPatrol();
string fieldCancel;
string fieldResult = "actual immutable100m field route, measured cruise/braking, destination hold and contact landing; bounded prototype, not HQ support";
if (System.GetCLIParam("errSmokeFieldServiceCancel", fieldCancel) && fieldCancel == "1")
fieldResult = "actual moving field service Stop retains control through braking, frozen-point contact landing and engine shutdown; no destination arrival or HQ support claim";
Print("ERR SMOKE COMPLETE: " + fieldResult);
return;
}
if (m_ERRTestAircraftRoute)
{
if (!ERR_Check(current == ERR_Phase.DEFEAT && m_ERRSmokeStep == 231, "actual aircraft route completed before explicit fixture reset")) return;
@@ -259,6 +276,13 @@ modded class ERR_GameMode
if (m_ERRSmokeDone) return;
if (now > m_ERRSmokeDeadline) { ERR_Check(false, "timeout at step " + m_ERRSmokeStep.ToString()); return; }
if (now < m_ERRSmokeWait) return;
if (m_ERRSmokeStep == 240)
{
int result = m_ERRAircraftField.Tick(now);
if (result < 0) { ERR_Check(false, "native actual aircraft field fixture"); return; }
if (result == 1) { m_ERRSmokeStep = 241; Transition(ERR_Phase.DEFEAT); }
return;
}
if (m_ERRSmokeStep == 230)
{
int result = m_ERRAircraftRoute.Tick(now);
@@ -333,6 +357,13 @@ modded class ERR_GameMode
if (players.Count() != 1 || Phase() != ERR_Phase.PRISON) return;
m_ERRSmokePlayer = players[0];
if (!ERR_CheckRoster() || !ERR_NativeContractsProbe.Run(this, m_ERRSmokePlayer) || !ERR_CheckCompanionCommands()) return;
if (m_ERRTestAircraftField)
{
DamageManagerComponent.Cast(m_ERRSmokePlayer.FindComponent(DamageManagerComponent)).EnableDamageHandling(false);
m_ERRAircraftField = new ERR_NativeAircraftFieldProbe(this);
m_ERRSmokeStep = 240;
return;
}
if (m_ERRTestAircraftRoute)
{
DamageManagerComponent.Cast(m_ERRSmokePlayer.FindComponent(DamageManagerComponent)).EnableDamageHandling(false);