Added world/area info sections to the world info sidebar

This commit is contained in:
Aruki
2017-02-12 23:46:22 -07:00
parent 009c42f281
commit 00a48e69f8
15 changed files with 465 additions and 419 deletions

View File

@@ -96,6 +96,7 @@ public:
// Accessors
inline void SetProjectName(const TString& rkName) { mProjectName = rkName; }
inline TString Name() const { return mProjectName; }
inline u32 NumPackages() const { return mPackages.size(); }
inline CPackage* PackageByIndex(u32 Index) const { return mPackages[Index]; }
inline void AddPackage(CPackage *pPackage) { mPackages.push_back(pPackage); }

View File

@@ -60,6 +60,24 @@ void CWorld::SetAreaLayerInfo(CGameArea *pArea)
}
}
TString CWorld::InGameName() const
{
if (mpWorldName)
return mpWorldName->String("ENGL", 0).ToUTF8();
else
return Entry()->Name().ToUTF8();
}
TString CWorld::AreaInGameName(u32 AreaIndex) const
{
const SArea& rkArea = mAreas[AreaIndex];
if (rkArea.pAreaName)
return rkArea.pAreaName->String("ENGL", 0).ToUTF8();
else
return "!!" + rkArea.InternalName;
}
// ************ SERIALIZATION ************
void CWorld::Serialize(IArchive& rArc)
{

View File

@@ -80,6 +80,8 @@ public:
CDependencyTree* BuildDependencyTree() const;
void SetAreaLayerInfo(CGameArea *pArea);
TString InGameName() const;
TString AreaInGameName(u32 AreaIndex) const;
// Serialization
virtual void Serialize(IArchive& rArc);