Combine Workshop addon and fix prison startup
Merge owned systems into one addon while preserving resource identities. Gate player admission on the replicated prison scene, restore the original framed door, and hold enemy AI until escape. Correct scenario branding and author metadata, include publishing assets, and retain regression and native verification evidence.
This commit is contained in:
@@ -3,12 +3,12 @@
|
||||
Checks scheduling/authority boundaries, not native aircraft, network or timing.
|
||||
"""
|
||||
from policy_harness import ROOT,body,run
|
||||
MODE=ROOT/'addons/core/Scripts/Game/ERR/ERR_GameMode.c'
|
||||
ACTORS=ROOT/'addons/core/Scripts/Game/ERR/ERR_Actors.c'
|
||||
MODE=ROOT/'addons/core/Scripts/Game/ERR/00_Core/ERR_GameMode.c'
|
||||
ACTORS=ROOT/'addons/core/Scripts/Game/ERR/00_Core/ERR_Actors.c'
|
||||
|
||||
def cpp(s):
|
||||
s=s.replace('protected ','').replace('Replication.IsServer()','server').replace('Replication.BumpMe()','Bump()')
|
||||
s=s.replace('ERR_Phase.DEFEAT','5').replace('ERR_Phase.PRISON','1').replace('ERR_MissionRules.Terminal(m_Phase)','(m_Phase>=5)')
|
||||
s=s.replace('ERR_Phase.DEFEAT','5').replace('ERR_Phase.PRISON','1').replace('ERR_Phase.RADIO_SEARCH','2').replace('ERR_MissionRules.Terminal(m_Phase)','(m_Phase>=5)')
|
||||
s=s.replace('array<int> connected = {};','std::vector<int> connected;').replace('foreach (int id : connected)','for (int id : connected)')
|
||||
s=s.replace('SCR_PlayerController controller = SCR_PlayerController.Cast(', 'Controller* controller = Controller::Cast(')
|
||||
s=s.replace('foreach (IEntity entity : m_OwnedEntities)','for (Entity* entity : m_OwnedEntities)')
|
||||
@@ -52,7 +52,7 @@ struct ForceBoundary {int clears=0;void Clear(){clears++;}};
|
||||
struct Mode {
|
||||
ForceBoundary m_Forces,m_ForceAgents;
|
||||
int forceTicks=0;void TickForces(float){forceTicks++;}
|
||||
bool m_Stopped=false,m_NativeEndHandled=false,m_StartedPlayers=false;int m_Phase=1;
|
||||
bool m_Stopped=false,m_NativeEndHandled=false,m_StartedPlayers=false;int m_Phase=2;
|
||||
float m_NoSurvivorsSince=-1;std::string m_EndReason;
|
||||
Work extraction{0,"extraction",{}},radio{0,"radio",{}},recovery{0,"recovery",{}};
|
||||
Work* m_Extraction=&extraction;Work* m_RadioDefence=&radio;Work* m_Recovery=&recovery;
|
||||
@@ -77,6 +77,12 @@ int main(){
|
||||
assert((events==std::vector<std::string>{"extraction","radio","recovery","maintain","observer","tactics","event"}));}
|
||||
// No command service is valid both with and without connected players.
|
||||
{reset();Mode m;m.ServerTick();players.count=1;m.ServerTick();assert(m.m_OnTick.calls==1);}
|
||||
// During prison, maintenance/observers still work, but enemies receive no
|
||||
// tactical updates or virtual route movement before the lockpick.
|
||||
{reset();players.count=1;Mode m;m.m_Phase=1;Retained c;m.m_Command=&c;
|
||||
m.ServerTick();assert(c.maintenance==1&&c.tactics==0&&m.forceTicks==0);
|
||||
assert(players.controller.updates==1&&m.m_OnTick.calls==1);
|
||||
m.m_Phase=2;m.ServerTick();assert(c.tactics==1&&m.forceTicks==1);}
|
||||
// Authority, preparation, terminal phase, native end and stopped service all
|
||||
// refuse maintenance as well as tactics. No stale clock/actor admission exists.
|
||||
for(int fault=0;fault<5;fault++){reset();Mode m;Retained c;m.m_Command=&c;
|
||||
|
||||
Reference in New Issue
Block a user