Gate radio intel behind configurable site discovery; record Workshop 0.0.119
continuous-integration/drone/push Build is passing
continuous-integration/drone/push Build is passing
This commit is contained in:
@@ -104,7 +104,7 @@ for n in ('location','record','issued','item','document'):
|
||||
selection=selection.replace(n+'.',n+'->')
|
||||
for n in ('ERR_GameMode','ERR_Actors','ERR_DiscoveryService','ERR_LocationKind'):
|
||||
selection=selection.replace(n+'.',n+'::')
|
||||
selection=selection.replace('ERR_GameMode::Get().','ERR_GameMode::Get()->').replace('GetRandomElement().Id()', 'GetRandomElement()->Id()')
|
||||
selection=selection.replace('ERR_GameMode::Get().','ERR_GameMode::Get()->').replace('GetRandomElement().Id()', 'GetRandomElement()->Id()').replace('Discovery().', 'Discovery()->')
|
||||
selection=selection.replace('bool known;', 'bool known=false;')
|
||||
run(r'''
|
||||
#include <cassert>
|
||||
@@ -117,7 +117,8 @@ template<class T>struct Array:std::vector<T>{using std::vector<T>::vector;void C
|
||||
template<class K,class V>struct Map:std::map<K,V>{bool Find(K k,V& v){auto i=this->find(k);if(i==this->end())return false;v=i->second;return true;}void Set(K k,V v){(*this)[k]=v;}};
|
||||
namespace ERR_LocationKind{enum{PRISON,EXTRACTION,RADIO,OUTPOST};}
|
||||
struct ERR_LocationComponent{string id;int knowledge=0,kind=ERR_LocationKind::OUTPOST;string Id(){return id;}int Knowledge(){return knowledge;}int Kind(){return kind;}};
|
||||
struct ERR_GameMode{Array<ERR_LocationComponent*> locations;static ERR_GameMode*Get(){static ERR_GameMode m;return &m;}void Locations(Array<ERR_LocationComponent*>&out){out=locations;}};
|
||||
struct Gate{bool RadioIntelAllowed(){return true;}};
|
||||
struct ERR_GameMode{Gate gate;Gate*Discovery(){return &gate;}Array<ERR_LocationComponent*> locations;static ERR_GameMode*Get(){static ERR_GameMode m;return &m;}void Locations(Array<ERR_LocationComponent*>&out){out=locations;}};
|
||||
struct ERR_DocumentComponent{string target;string TargetId(){return target;}};
|
||||
struct Entity;using IEntity=Entity*;
|
||||
struct InventoryStorageManagerComponent{Array<IEntity>folders;};
|
||||
|
||||
Reference in New Issue
Block a user