Integrate physical radio calls and finite vehicle maintenance

This commit is contained in:
2026-09-20 06:37:17 +02:00
parent 963cab50c0
commit 915476f709
152 changed files with 26426 additions and 28 deletions
+19 -1
View File
@@ -13,7 +13,7 @@ class ERR_HQRadioNode
bool Valid(bool manpack = false)
{
ERR_GameMode factions = ERR_GameMode.Get();
if (!Carrier || !Group || Group.GetPlayerCount(true) > 0 || !factions || Group.GetFaction() != factions.EnemyFaction() || ERR_Actors.Group(Carrier) != Group)
if (!ERR_Actors.CanFight(Carrier) || !Group || Group.GetPlayerCount(true) > 0 || !factions || Group.GetFaction() != factions.EnemyFaction() || ERR_Actors.Group(Carrier) != Group)
return false;
int required = 1;
if (manpack)
@@ -37,6 +37,8 @@ class ERR_HQRoute
{
ref array<ref ERR_HQRadioNode> Nodes = {};
bool Downlink;
bool Originated;
float OriginDue = -1;
int Cursor;
bool Sending;
float Due;
@@ -59,6 +61,22 @@ class ERR_HQRoute
}
if (now - StartedAt > 30000)
return Fail(journal, "route timed out");
// An originating report needs three seconds on its original physical
// caller before any network transmission. Later completed hops remain
// independent of that caller, and HQ downlinks do not repeat this call.
if (!Downlink && !Originated)
{
if (Nodes.IsEmpty() || !Nodes[0].Valid(Nodes.Count() == 1))
return Fail(journal, "originating call lost its living owned radio carrier");
if (OriginDue < 0)
{
OriginDue = now + 3000;
journal.Write("CALL", Nodes[0].Label() + " originating report; three seconds before transmission", MessageId);
}
if (now < OriginDue) return 0;
Originated = true;
journal.Write("CALL COMPLETE", Nodes[0].Label() + " completed originating report", MessageId);
}
int target = Cursor + 1;
if (Sending)
{