Add mission customization, HQ support and aggression-driven AI
Integrate faction and random settings menus, generated objectives, scouts, convoys, air support, mortar stations and body-intel recovery. Add identified-body aggression, finite hunter UAZ deployment, dedicated objective defence and maximum AI skill with separate reduced aim accuracy. Include policy tests, native probes, evidence and documentation.
This commit is contained in:
@@ -10,7 +10,8 @@ def adapt(signature):
|
||||
s=s.replace('SCR_AIActionBase action','Action* action').replace('EAIActionState ', 'State ').replace('EAIActionState.', 'State::')
|
||||
s=s.replace('ERR_MortarSupplyState ', 'Supply ').replace('ERR_MortarSupplyState.', 'Supply::').replace('ERR_MortarSalvo.', 'Salvo::')
|
||||
s=s.replace('string reason', 'std::string reason')
|
||||
for name in ['Activity','m_ObservedActivity','m_Transfer','m_Readiness']:
|
||||
s=s.replace('new ERR_MortarStation(this)', 'new Station(this)')
|
||||
for name in ['Activity','m_ObservedActivity','m_Transfer','m_Readiness','m_Station']:
|
||||
s=s.replace(name+'.',name+'->')
|
||||
for name in ['OnActivityCompleted','OnActivityFailed']:
|
||||
s=s.replace('.Insert('+name+')', '.Insert(this, &Battery::'+name+')').replace('.Remove('+name+')', '.Remove(this, &Battery::'+name+')')
|
||||
@@ -28,6 +29,7 @@ enum class Supply {FAILED=-1,PENDING,READY};
|
||||
struct Salvo {static constexpr float TIMEOUT_MS=120000;};
|
||||
struct Text:std::string {using std::string::string;bool IsEmpty(){return empty();}};
|
||||
struct Action;struct Battery;
|
||||
struct Station {Station(Battery*){} void Update(float){} void Stop(){}};
|
||||
struct Invoker {Battery* owner=nullptr;void(Battery::*callback)(Action*)=nullptr;int inserts=0,removes=0,calls=0;
|
||||
void Insert(Battery* b,void(Battery::*f)(Action*)){owner=b;callback=f;inserts++;}
|
||||
void Remove(Battery* b,void(Battery::*f)(Action*)){if(owner==b&&callback==f){owner=nullptr;callback=nullptr;removes++;}}
|
||||
@@ -44,7 +46,7 @@ struct Battery {
|
||||
bool m_Stopped=false,CommandOpen=true,StartupActivated=true,operational=true,RefreshRejected=false,Released=false;
|
||||
Action* Activity=nullptr;Action* m_ObservedActivity=nullptr;int OrderId=1,m_ObservedActivityOrder=0,OrderShots=8,TotalShots=8;
|
||||
State m_ActivityTerminal=State::EVALUATED;float OrderedAt=0,AimedAt=100,AimValidatedAt=100;
|
||||
Text SpawnFailure;std::string lastCancel;Readiness readiness;Readiness* m_Readiness=&readiness;Transfer transfer;Transfer* m_Transfer=&transfer;
|
||||
Text SpawnFailure;std::string lastCancel;Readiness readiness;Readiness* m_Readiness=&readiness;Transfer transfer;Transfer* m_Transfer=&transfer;Station* m_Station=nullptr;
|
||||
void* RadioOrder=nullptr;void* PendingRadioReport=nullptr;void* PendingSupplyReport=nullptr;void* Refresh=nullptr;void* Report=this;void* AimSolver=this;void* AimSolution=this;
|
||||
bool Operational(){return operational;}std::string OperationalReason(){return "physical crew unavailable";}void SpawnFailed(const char*){}void UpdateCrewDetail(float){}void FlushTraces(){}
|
||||
'''+methods+cancel+r'''
|
||||
|
||||
Reference in New Issue
Block a user