mirror of
https://github.com/AxioDL/PrimeWorldEditor.git
synced 2025-12-16 08:27:01 +00:00
Merged all the Properties.xmls together to eliminate the need to sync property name changes between games
This commit is contained in:
@@ -6,7 +6,6 @@ CMasterTemplate::CMasterTemplate()
|
||||
{
|
||||
mVersion = 0;
|
||||
mFullyLoaded = false;
|
||||
mHasPropList = false;
|
||||
}
|
||||
|
||||
CMasterTemplate::~CMasterTemplate()
|
||||
@@ -100,21 +99,6 @@ TString CMasterTemplate::MessageByIndex(u32 Index)
|
||||
return (std::next(it, Index))->second;
|
||||
}
|
||||
|
||||
TString CMasterTemplate::PropertyName(u32 PropertyID)
|
||||
{
|
||||
auto it = mPropertyNames.find(PropertyID);
|
||||
|
||||
if (it != mPropertyNames.end())
|
||||
return it->second;
|
||||
else
|
||||
return "Unknown";
|
||||
}
|
||||
|
||||
bool CMasterTemplate::HasPropertyList()
|
||||
{
|
||||
return mHasPropList;
|
||||
}
|
||||
|
||||
bool CMasterTemplate::IsLoadedSuccessfully()
|
||||
{
|
||||
return mFullyLoaded;
|
||||
@@ -141,5 +125,16 @@ std::list<CMasterTemplate*> CMasterTemplate::GetMasterList()
|
||||
return list;
|
||||
}
|
||||
|
||||
TString CMasterTemplate::GetPropertyName(u32 PropertyID)
|
||||
{
|
||||
auto it = smPropertyNames.find(PropertyID);
|
||||
|
||||
if (it != smPropertyNames.end())
|
||||
return it->second;
|
||||
else
|
||||
return "Unknown";
|
||||
}
|
||||
|
||||
std::map<EGame, CMasterTemplate*> CMasterTemplate::smMasterMap;
|
||||
std::map<u32, TString> CMasterTemplate::smPropertyNames;
|
||||
u32 CMasterTemplate::smGameListVersion;
|
||||
|
||||
@@ -22,10 +22,9 @@ class CMasterTemplate
|
||||
std::map<u32, TString> mStates;
|
||||
std::map<u32, TString> mMessages;
|
||||
|
||||
bool mHasPropList;
|
||||
std::map<u32, TString> mPropertyNames;
|
||||
|
||||
static std::map<EGame, CMasterTemplate*> smMasterMap;
|
||||
static std::map<u32, TString> smPropertyNames;
|
||||
static u32 smGameListVersion;
|
||||
|
||||
public:
|
||||
@@ -46,12 +45,11 @@ public:
|
||||
TString MessageByID(u32 MessageID);
|
||||
TString MessageByID(const CFourCC& MessageID);
|
||||
TString MessageByIndex(u32 Index);
|
||||
TString PropertyName(u32 PropertyID);
|
||||
bool HasPropertyList();
|
||||
bool IsLoadedSuccessfully();
|
||||
|
||||
static CMasterTemplate* GetMasterForGame(EGame Game);
|
||||
static std::list<CMasterTemplate*> GetMasterList();
|
||||
static TString GetPropertyName(u32 PropertyID);
|
||||
};
|
||||
|
||||
// ************ INLINE ************
|
||||
|
||||
Reference in New Issue
Block a user