mirror of
https://github.com/AxioDL/PrimeWorldEditor.git
synced 2025-12-17 00:47:05 +00:00
Fixed all DKCR name generation issues
This commit is contained in:
@@ -97,7 +97,7 @@ void GenerateAssetNames(CGameProject *pProj)
|
||||
|
||||
TString NewDir = (HasCustomDir ? It->DirectoryPath() : "Uncategorized/");
|
||||
TString NewName = (HasCustomName ? It->Name() : It->ID().ToString());
|
||||
It->Move(NewDir, NewName);
|
||||
It->Move(NewDir, NewName, true, true);
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -131,7 +131,7 @@ void GenerateAssetNames(CGameProject *pProj)
|
||||
for (TResourceIterator<eWorld> It(pStore); It; ++It)
|
||||
{
|
||||
// Set world name
|
||||
CWorld *pWorld = (CWorld*) It->Load();
|
||||
TResPtr<CWorld> pWorld = It->Load();
|
||||
TString WorldName = pWorld->Name();
|
||||
TString WorldDir = kWorldsRoot + WorldName + '/';
|
||||
|
||||
@@ -205,7 +205,7 @@ void GenerateAssetNames(CGameProject *pProj)
|
||||
|
||||
// Rename area stuff
|
||||
CResourceEntry *pAreaEntry = pStore->FindEntry(AreaID);
|
||||
ASSERT(pAreaEntry != nullptr);
|
||||
if (!pAreaEntry) continue; // Some DKCR worlds reference areas that don't exist
|
||||
ApplyGeneratedName(pAreaEntry, WorldMasterDir, AreaName);
|
||||
|
||||
CStringTable *pAreaNameTable = pWorld->AreaName(iArea);
|
||||
|
||||
@@ -204,7 +204,7 @@ bool CVirtualDirectory::RemoveChildDirectory(CVirtualDirectory *pSubdir)
|
||||
// If this is part of the resource store, delete the corresponding filesystem directory
|
||||
if (mpStore && pSubdir->GetRoot() == mpStore->RootDirectory())
|
||||
{
|
||||
TString AbsPath = mpStore->DatabaseRootPath() + pSubdir->FullPath();
|
||||
TString AbsPath = mpStore->ResourcesDir() + pSubdir->FullPath();
|
||||
FileUtil::DeleteDirectory(AbsPath, true);
|
||||
}
|
||||
|
||||
@@ -237,7 +237,10 @@ void CVirtualDirectory::RemoveEmptySubdirectories()
|
||||
CVirtualDirectory *pDir = mSubdirectories[SubdirIdx];
|
||||
|
||||
if (pDir->IsEmpty())
|
||||
{
|
||||
RemoveChildDirectory(pDir);
|
||||
SubdirIdx--;
|
||||
}
|
||||
else
|
||||
pDir->RemoveEmptySubdirectories();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user