diff --git a/README.md b/README.md index da1cf519..91a7194c 100644 --- a/README.md +++ b/README.md @@ -72,6 +72,7 @@ To use the `iw4x.dll`, you must have a valid Modern Warfare 2 installation with | `-nosteam` | Disable friends feature and do not update Steam about the game's current status just like an invisible mode. | | `-unprotect-dvars` | Allow the server to modify saved/archive dvars. | | `-zonebuilder` | Start the interactive zonebuilder tool console instead of starting the game. | +| `-original-str-parsing` | (ZoneBuilder mode only) Parse .str files in the same manner as the CoD4 Mod Tools. | | `-disable-notifies` | Disable "Anti-CFG" checks | | `-disable-mongoose` | Disable Mongoose HTTP server | | `-disable-rate-limit-check` | Disable RCon rate limit checks | diff --git a/src/Components/Modules/AssetInterfaces/ILocalizeEntry.cpp b/src/Components/Modules/AssetInterfaces/ILocalizeEntry.cpp index 1bd2b6e6..f4da0cd4 100644 --- a/src/Components/Modules/AssetInterfaces/ILocalizeEntry.cpp +++ b/src/Components/Modules/AssetInterfaces/ILocalizeEntry.cpp @@ -56,13 +56,12 @@ namespace Assets void ILocalizeEntry::ParseLocalizedStringsFile(Components::ZoneBuilder::Zone* builder, const std::string& name, const std::string& filename) { std::vector assets; - const auto _0 = gsl::finally([] + + if (Components::Flags::HasFlag("-original-str-parsing")) { - Components::Localization::ParseOutput(nullptr); - Components::Localization::PrefixOverride = {}; - }); + Components::Localization::PrefixOverride = Utils::String::ToUpper(name) + "_"; + } - Components::Localization::PrefixOverride = Utils::String::ToUpper(name) + "_"; Components::Localization::ParseOutput([&assets](Game::LocalizeEntry* asset) { assets.push_back(asset); @@ -80,6 +79,9 @@ namespace Assets { builder->addRawAsset(type, entry); } + + Components::Localization::ParseOutput(nullptr); + Components::Localization::PrefixOverride = {}; } void ILocalizeEntry::ParseLocalizedStringsJSON(Components::ZoneBuilder::Zone* builder, Components::FileSystem::File& file)