From ec5aa248c315086d4b60fd159ec25390e7e63f4f Mon Sep 17 00:00:00 2001 From: Jan Laupetin Date: Sat, 8 Aug 2026 07:33:28 +0200 Subject: [PATCH] chore!: change unlinker output default (#958) * chore!: change default --output-folder of Unlinker * chore: log where the zone is being dumped to --- src/Unlinking/Unlinker.cpp | 1 + src/Unlinking/UnlinkerArgs.h | 2 +- test/UnlinkingTests/UnlinkerArgsTests.cpp | 6 +++--- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/Unlinking/Unlinker.cpp b/src/Unlinking/Unlinker.cpp index 075aa2dc..a9e98963 100644 --- a/src/Unlinking/Unlinker.cpp +++ b/src/Unlinking/Unlinker.cpp @@ -254,6 +254,7 @@ namespace auto* objWriter = IObjWriter::GetObjWriterForGame(zone.m_game_id); + con::info("Dumping zone {} into folder \"{}\"", zone.m_name, outputFolderPath.string()); auto result = objWriter->DumpZone(context); if (m_args.m_use_gdt) diff --git a/src/Unlinking/UnlinkerArgs.h b/src/Unlinking/UnlinkerArgs.h index c699713f..c0a6aa36 100644 --- a/src/Unlinking/UnlinkerArgs.h +++ b/src/Unlinking/UnlinkerArgs.h @@ -13,7 +13,7 @@ class UnlinkerArgs { public: - static constexpr const char* DEFAULT_OUTPUT_FOLDER = "zone_dump/zone_raw/?zone?"; + static constexpr const char* DEFAULT_OUTPUT_FOLDER = "zone_dump/?game?/?zone?"; private: ArgumentParser m_argument_parser; diff --git a/test/UnlinkingTests/UnlinkerArgsTests.cpp b/test/UnlinkingTests/UnlinkerArgsTests.cpp index f3184574..52266840 100644 --- a/test/UnlinkingTests/UnlinkerArgsTests.cpp +++ b/test/UnlinkingTests/UnlinkerArgsTests.cpp @@ -20,7 +20,7 @@ namespace REQUIRE(args.m_output_folder == UnlinkerArgs::DEFAULT_OUTPUT_FOLDER); const Zone zone("test_zone", 0, GameId::IW4, GamePlatform::PC); - REQUIRE(args.GetOutputFolderPathForZone(zone) == "zone_dump/zone_raw/test_zone"); + REQUIRE(args.GetOutputFolderPathForZone(zone) == "zone_dump/iw4/test_zone"); } TEST_CASE("Unlinker output folder remains unchanged without placeholders", "[unlinker][arguments]") @@ -36,10 +36,10 @@ namespace TEST_CASE("Unlinker output folder replaces game and zone placeholders", "[unlinker][arguments]") { UnlinkerArgs args; - args.m_output_folder = "zone_dump/?game?/?zone?"; + args.m_output_folder = "zone_dump/?game?/?game?/?zone?"; const Zone zone("test_zone", 0, GameId::IW4, GamePlatform::PC); - REQUIRE(args.GetOutputFolderPathForZone(zone) == "zone_dump/iw4/test_zone"); + REQUIRE(args.GetOutputFolderPathForZone(zone) == "zone_dump/iw4/iw4/test_zone"); } } // namespace