mirror of
https://github.com/Laupetin/OpenAssetTools.git
synced 2025-06-13 00:08:26 -05:00
Unlinker: Make zone files creators game dependent and in the unlinker project instead of the ObjWriting component
This commit is contained in:
@ -3,12 +3,14 @@
|
||||
#include "Utils/Arguments/ArgumentParser.h"
|
||||
#include "ZoneLoading.h"
|
||||
#include "ObjWriting.h"
|
||||
#include "ContentPrinter.h"
|
||||
#include "ContentLister/ContentPrinter.h"
|
||||
#include "Utils/PathUtils.h"
|
||||
#include "Utils/FileAPI.h"
|
||||
#include "ObjLoading.h"
|
||||
#include "SearchPath/SearchPaths.h"
|
||||
#include "SearchPath/SearchPathFilesystem.h"
|
||||
#include "ContentLister/ZoneDefWriter.h"
|
||||
#include "Game/T6/ZoneDefWriterT6.h"
|
||||
|
||||
#include <set>
|
||||
#include <regex>
|
||||
@ -16,6 +18,11 @@
|
||||
#include "ObjContainer/IWD/IWD.h"
|
||||
#include "UnlinkerArgs.h"
|
||||
|
||||
const IZoneDefWriter* const ZONE_DEF_WRITERS[]
|
||||
{
|
||||
new ZoneDefWriterT6()
|
||||
};
|
||||
|
||||
class Unlinker::Impl
|
||||
{
|
||||
UnlinkerArgs m_args;
|
||||
@ -158,7 +165,14 @@ class Unlinker::Impl
|
||||
|
||||
if (zoneDefinitionFile.IsOpen())
|
||||
{
|
||||
ObjWriting::WriteZoneDefinition(zone, &zoneDefinitionFile);
|
||||
for (auto zoneDefWriter : ZONE_DEF_WRITERS)
|
||||
{
|
||||
if (zoneDefWriter->CanHandleZone(zone))
|
||||
{
|
||||
zoneDefWriter->WriteZoneDef(zone, &zoneDefinitionFile);
|
||||
break;
|
||||
}
|
||||
}
|
||||
ObjWriting::DumpZone(zone, outputFolderPath);
|
||||
}
|
||||
else
|
||||
|
Reference in New Issue
Block a user