diff --git a/COMPILE_VMF.bat b/COMPILE_VMF.bat index 31dfcd1..7e93beb 100644 --- a/COMPILE_VMF.bat +++ b/COMPILE_VMF.bat @@ -6,16 +6,16 @@ set SOUCE_CODE_DIR=.\vmf_source set TEMP_DIR=.\TEMP set ORIGINAL_VMF_BUNDLE_FILE_NAME=98161451961848df -set NEW_VMF_BUNDLE_FILE_NAME=000_VMF_Main_Bundle +set NEW_VMF_BUNDLE_FILE_NAME=VMF :: manual setting pathes (in case this batch file won't be able to find steam installation folders) [you can change them :D] -set MANUAL_MODS_DIR=C:\Program Files (x86)\Steam\steamapps\common\Warhammer End Times Vermintide\bundle\mods +set MANUAL_MODS_DIR=E:\SteamLibrary\SteamApps\workshop\content\235540\1289946781 set MANUAL_STINGRAY_EXE=C:\Program Files (x86)\Steam\steamapps\common\Warhammer End Times Vermintide Mod Tools\bin\stingray_win64_dev_x64.exe :: find Vermintide folder -set KEY_NAME="HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Steam App 235540" +set KEY_NAME="HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\asdasdCurrentVersion\Uninstall\Steam App 235540" set VALUE_NAME=InstallLocation for /F "usebackq skip=2 tokens=1-2*" %%A in (`REG QUERY %KEY_NAME% /v %VALUE_NAME% 2^>nul`) do ( @@ -54,7 +54,7 @@ if not exist "%STINGRAY_EXE%" ( echo Starting... -"%STINGRAY_EXE%" --compile-for win32 --source-dir "%SOUCE_CODE_DIR%" --data-dir "%TEMP_DIR%\compile" --bundle-dir "%TEMP_DIR%\bundle" +"%STINGRAY_EXE%" --compile-for win32 --source-dir "%SOUCE_CODE_DIR%" --data-dir "%TEMP_DIR%\compile" --bundle-dir "%TEMP_DIR%\bundle" > nul echo Done. diff --git a/vmf_source/localization/mutator_manager.lua b/vmf_source/localization/mutator_manager.lua index 9c28c04..6331bbe 100644 --- a/vmf_source/localization/mutator_manager.lua +++ b/vmf_source/localization/mutator_manager.lua @@ -22,5 +22,57 @@ return { }, survival_hardest = { en = "Heroic" + }, + + broadcast_enabled_mutators = { + en = "ENABLED MUTATORS" + }, + broadcast_all_disabled = { + en = "ALL MUTATORS DISABLED" + }, + broadcast_disabled_mutators = { + en = "MUTATORS DISABLED" + }, + local_disabled_mutators = { + en = "Mutators disabled" + }, + whisper_enabled_mutators = { + en = "[Automated message] This lobby has the following mutators active" + }, + + disabled_reason_not_server = { + en = "because you're no longer the host" + }, + disabled_reason_difficulty_change = { + en = "DUE TO CHANGE IN DIFFICULTY" + }, + + mutators_title = { + en = "Mutators" + }, + mutators_banner_tooltip = { + en = "Enable and disable mutators" + }, + no_mutators = { + en = "No mutators installed" + }, + no_mutators_tooltip = { + en = "Subscribe to mods and mutators on the workshop" + }, + + tooltip_supported_difficulty = { + en = "Supported difficulty levels" + }, + tooltip_incompatible_with_all = { + en = "Incompatible with all other mutators" + }, + tooltip_incompatible_with = { + en = "Incompatible with" + }, + tooltip_compatible_with_all = { + en = "Compatible with all other mutators" + }, + tooltip_will_be_disabled = { + en = "Will be disabled when Play is pressed" } } \ No newline at end of file diff --git a/vmf_source/scripts/mods/vmf/modules/mutators/mutator_gui.lua b/vmf_source/scripts/mods/vmf/modules/mutators/mutator_gui.lua index f730f78..634cc7a 100644 --- a/vmf_source/scripts/mods/vmf/modules/mutators/mutator_gui.lua +++ b/vmf_source/scripts/mods/vmf/modules/mutators/mutator_gui.lua @@ -319,7 +319,7 @@ local mutators_view = { -- Show supported difficulty when can't be enabled due to difficulty level local supports_difficulty = mutator:supports_current_difficulty() if not supports_difficulty then - text = text .. "\nSupported difficulty levels:" + text = text .. "\n" .. manager:localize("tooltip_supported_difficulty") .. ":" for i, difficulty in ipairs(config.difficulty_levels) do text = text .. (i == 1 and " " or ", ") .. manager:localize(difficulty) end @@ -338,9 +338,9 @@ local mutators_view = { if currently_compatible and config.incompatible_with_all or #incompatible_mutators == #mutators - 1 then -- Show special message when incompatible with all - text = text .. "\nIncompatible with all other mutators" + text = text .. "\n" .. manager:localize("tooltip_incompatible_with_all") else - text = text .. "\nIncompatible with:" + text = text .. "\n" .. manager:localize("tooltip_incompatible_with") .. ":" for i, other_mutator in ipairs(incompatible_mutators) do local name = (other_mutator:get_config().title or other_mutator:get_name()) text = text .. (i == 1 and " " or ", ") .. name @@ -349,12 +349,12 @@ local mutators_view = { elseif config.compatible_with_all then -- Special message when compatible with all - text = text .. "\nCompatible with all other mutators" + text = text .. "\n" .. manager:localize("tooltip_compatible_with_all") end -- Special message if switched to unsupported difficulty level if mutator:is_enabled() and not supports_difficulty then - text = text .. "\nWill be disabled when Play is pressed" + text = text .. "\n" .. manager:localize("tooltip_will_be_disabled") end -- Description diff --git a/vmf_source/scripts/mods/vmf/modules/mutators/mutator_gui_definitions.lua b/vmf_source/scripts/mods/vmf/modules/mutators/mutator_gui_definitions.lua index c8c20b7..08451e9 100644 --- a/vmf_source/scripts/mods/vmf/modules/mutators/mutator_gui_definitions.lua +++ b/vmf_source/scripts/mods/vmf/modules/mutators/mutator_gui_definitions.lua @@ -1,4 +1,4 @@ - +local manager = get_mod("vmf_mutator_manager") local definitions = local_require("scripts/ui/views/map_view_definitions") local scenegraph_definition = definitions.scenegraph_definition @@ -56,7 +56,12 @@ scenegraph_definition.no_mutators_text = { local new_widgets = { -- This will replace the banner behind the Mission text - banner_mutators_widget = UIWidgets.create_texture_with_text_and_tooltip("title_bar", "Mutators", "Enable and disable mutators", "banner_level", "banner_mutators_text", { + banner_mutators_widget = UIWidgets.create_texture_with_text_and_tooltip( + "title_bar", + manager:localize("mutators_title"), + manager:localize("mutators_banner_tooltip"), + "banner_level", + "banner_mutators_text", { vertical_alignment = "center", scenegraph_id = "banner_mutators_text", localize = false, @@ -93,8 +98,8 @@ local new_widgets = { normal_texture = "octagon_button_normal", icon_texture = "mutator_button", icon_hover_texture = "mutator_button_hover", - tooltip_text = "Mutators", - toggled_tooltip_text = "Mutators", + tooltip_text = manager:localize("mutators_title"), + toggled_tooltip_text = manager:localize("mutators_title"), button_hotspot = {} }, style = { @@ -219,8 +224,8 @@ local new_widgets = { } }, content = { - text = "No mutators installed", - tooltip_text = "Subscribe to mods and mutators on the workshop", + text = manager:localize("no_mutators"), + tooltip_text = manager:localize("no_mutators_tooltip"), tooltip_hotspot = {}, color = Colors.get_color_table_with_alpha("slate_gray", 255) }, diff --git a/vmf_source/scripts/mods/vmf/modules/mutators/mutator_info.lua b/vmf_source/scripts/mods/vmf/modules/mutators/mutator_info.lua index 0204920..63a3b97 100644 --- a/vmf_source/scripts/mods/vmf/modules/mutators/mutator_info.lua +++ b/vmf_source/scripts/mods/vmf/modules/mutators/mutator_info.lua @@ -73,10 +73,10 @@ manager:hook("MatchmakingStateHostGame.host_game", function(func, self, ...) set_lobby_data() local names = add_enabled_mutators_titles_to_string("", ", ") if string.len(names) > 0 then - manager:chat_broadcast("ENABLED MUTATORS: " .. names) + manager:chat_broadcast(manager:localize("broadcast_enabled_mutators") .. ": " .. names) were_enabled_before = true elseif were_enabled_before then - manager:chat_broadcast("ALL MUTATORS DISABLED") + manager:chat_broadcast(manager:localize("broadcast_all_disabled")) were_enabled_before = false end end) @@ -85,7 +85,7 @@ end) manager:hook("MatchmakingManager.rpc_matchmaking_request_join_lobby", function(func, self, sender, client_cookie, host_cookie, lobby_id, friend_join) local name = add_enabled_mutators_titles_to_string("", ", ") if string.len(name) > 0 then - local message = "[Automated message] This lobby has the following difficulty mod active : " .. name + local message = manager:localize("whisper_enabled_mutators") .. ": " .. name manager:chat_whisper(get_peer_id_from_cookie(client_cookie), message) end func(self, sender, client_cookie, host_cookie, lobby_id, friend_join) diff --git a/vmf_source/scripts/mods/vmf/modules/mutators/mutator_manager.lua b/vmf_source/scripts/mods/vmf/modules/mutators/mutator_manager.lua index 9572ab4..6bfcdd9 100644 --- a/vmf_source/scripts/mods/vmf/modules/mutators/mutator_manager.lua +++ b/vmf_source/scripts/mods/vmf/modules/mutators/mutator_manager.lua @@ -258,7 +258,8 @@ manager.disable_impossible_mutators = function(notify, everybody, reason) end if #disabled_mutators > 0 and notify then if not reason then reason = "" end - local message = everybody and "MUTATORS DISABLED " .. reason .. ":" or "Mutators disabled " .. reason .. ":" + local loc = everybody and "broadcast_disabled_mutators" or "local_disabled_mutators" + local message = manager:localize(loc) .. " " .. manager:localize(reason) .. ":" message = message .. " " .. manager.add_mutator_titles_to_string(disabled_mutators, "", ", ", false) if everybody then manager:chat_broadcast(message) @@ -314,7 +315,7 @@ end -- Check if player is still hosting manager.update = function() if not all_mutators_disabled and not player_is_server() then - manager.disable_impossible_mutators(true, false, "because you're no longer the host") + manager.disable_impossible_mutators(true, false, "disabled_reason_not_server") all_mutators_disabled = true end end @@ -335,7 +336,7 @@ local function disable_mutator(self) set_mutator_state(self, false) end --- Checks current difficulty, map selection screen settings (optionally), incompatible mutators and whether player is server +-- Checks current difficulty, map selection screen settings (optionally), incompatible mutators and whether player is server -- to determine if a mutator can be enabled local function can_be_enabled(self, ignore_map) if #self:get_incompatible_mutators(true) > 0 then return false end @@ -438,7 +439,7 @@ end HOOKS ]]-- manager:hook("DifficultyManager.set_difficulty", function(func, self, difficulty) - manager.disable_impossible_mutators(true, true, "DUE TO CHANGE IN DIFFICULTY") + manager.disable_impossible_mutators(true, true, "disabled_reason_difficulty_change") return func(self, difficulty) end)