Fix atlas resource handling and suppression AI serialization

This commit is contained in:
2026-10-16 16:36:46 +02:00
parent a66aca35bf
commit f15c915e54
8 changed files with 21 additions and 7 deletions
+2 -2
View File
@@ -121,8 +121,8 @@ struct string:std::string {
void Replace(string a,string b){size_t n=0;while((n=find(a,n))!=npos){replace(n,a.size(),b);n+=b.size();}}
string Trim(){auto a=find_first_not_of(" \r\n");if(a==npos)return "";return substr(a,find_last_not_of(" \r\n")-a+1);}
string GetPath(){auto n=find('}');return n==npos?*this:string(substr(n+1));}
bool IsExternal(){return size()>18&&front()=='{'&&at(17)=='}';}
bool IsInternal(){return size()==18&&front()=='{'&&at(17)=='}';}
bool IsExternal(){assert(false && "Do not resolve a raw terrain path");return true;}
bool IsInternal(){assert(false && "Do not resolve a raw terrain path");return true;}
};
string StripPath(string s){auto n=s.find_last_of('/');return n==s.npos?s:string(s.substr(n+1));}
template<class T>struct Array:std::vector<T>{void Insert(T v){this->push_back(v);}bool Contains(T v){return std::find(this->begin(),this->end(),v)!=this->end();}};