Improve AI garrisons, player recovery and mission administration
This commit is contained in:
@@ -7,7 +7,7 @@ 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_HQ.Event','ERR_HQ::Event').replace('protected ','').replace('Replication.IsServer()','server').replace('Replication.BumpMe()','Bump()')
|
||||
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(')
|
||||
@@ -32,7 +32,8 @@ struct Players {int count=0;Controller controller;int GetPlayerCount(){return co
|
||||
struct Queue {std::vector<std::string> removed;void Remove(std::string s){removed.push_back(s);}}queue;
|
||||
struct Game {Players* GetPlayerManager(){return &players;}Queue* GetCallqueue(){return &queue;}}game;Game* GetGame(){return &game;}
|
||||
struct Hook {int calls=0;std::function<void()> callback;std::string name;void Invoke(float=0){calls++;events.push_back(name);if(callback)callback();}};
|
||||
struct Work {int calls=0;std::string name;std::function<void()> callback;void Tick(float=0){calls++;events.push_back(name);if(callback)callback();}};
|
||||
struct ERR_HQ {static void Event(std::string,std::string){}};
|
||||
struct Work {bool DefeatDue(float){return false;}int calls=0;std::string name;std::function<void()> callback;void Tick(float=0){calls++;events.push_back(name);if(callback)callback();}};
|
||||
struct Roster {bool survivor=true;bool HasSurvivor(){return survivor;}}roster;
|
||||
struct Entity {bool group=false;};int deleted=0;void Delete(Entity*){deleted++;}
|
||||
struct Command {
|
||||
|
||||
Reference in New Issue
Block a user