mirror of
https://github.com/AxioDL/PrimeWorldEditor.git
synced 2025-12-21 02:39:17 +00:00
Added world/area info sections to the world info sidebar
This commit is contained in:
@@ -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); }
|
||||
|
||||
@@ -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)
|
||||
{
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user