diff --git a/data/cdata/ui_scripts/patches/__init__.lua b/data/cdata/ui_scripts/patches/__init__.lua index 968b04f2..c96b222d 100644 --- a/data/cdata/ui_scripts/patches/__init__.lua +++ b/data/cdata/ui_scripts/patches/__init__.lua @@ -1,23 +1,26 @@ -if (game:issingleplayer()) then - require("sp_unlockall") - return -end - -if (Engine.InFrontend()) then - require("shader_dialog") - require("gamemodes") - require("no_mode_switch") - require("disable_useless_things") -else - require("scoreboard") -end - --- defined in mp_hud/hudutils.lua -function GetGameModeName() - return Engine.Localize(Engine.TableLookup(GameTypesTable.File, - GameTypesTable.Cols.Ref, GameX.GetGameMode(), GameTypesTable.Cols.Name)) -end - -function NeverAllowChangeTeams() - return false -end +require("language") +require("background_effects") + +if (game:issingleplayer()) then + require("sp_unlockall") + return +end + +if (Engine.InFrontend()) then + require("shader_dialog") + require("gamemodes") + require("no_mode_switch") + require("disable_useless_things") +else + require("scoreboard") +end + +-- defined in mp_hud/hudutils.lua +function GetGameModeName() + return Engine.Localize(Engine.TableLookup(GameTypesTable.File, GameTypesTable.Cols.Ref, GameX.GetGameMode(), + GameTypesTable.Cols.Name)) +end + +function NeverAllowChangeTeams() + return false +end diff --git a/data/cdata/ui_scripts/patches/background_effects.lua b/data/cdata/ui_scripts/patches/background_effects.lua new file mode 100644 index 00000000..7f41b738 --- /dev/null +++ b/data/cdata/ui_scripts/patches/background_effects.lua @@ -0,0 +1,11 @@ +if (Engine.InFrontend()) then + return +end + +-- less background blur in SP, no blur in MP +LUI.MenuTemplate.InitInGameBkg = function(f39_arg0, f39_arg1) + LUI.MenuTemplate.AddDarken(f39_arg0, f39_arg1) + if game:issingleplayer() and not LUI.FlowManager.IsMenuTopmost(Engine.GetLuiRoot(), "advanced_video") then + LUI.MenuTemplate.AddWorldBlur(f39_arg0, f39_arg1) + end +end diff --git a/data/cdata/ui_scripts/patches/scoreboard.lua b/data/cdata/ui_scripts/patches/scoreboard.lua index c3cfbcb2..0dfc6d0c 100644 --- a/data/cdata/ui_scripts/patches/scoreboard.lua +++ b/data/cdata/ui_scripts/patches/scoreboard.lua @@ -1,16 +1,16 @@ local gametypes = { - ["dm"] = true, - ["dom"] = true, - ["sd"] = true, - ["war"] = true, - ["conf"] = true, - ["vlobby"] = true, - ["koth"] = true, - ["sab"] = true, - ["ctf"] = true, - ["dd"] = true, - ["hp"] = true, - ["gun"] = true, + ["dm"] = true, + ["dom"] = true, + ["sd"] = true, + ["war"] = true, + ["conf"] = true, + ["vlobby"] = true, + ["koth"] = true, + ["sab"] = true, + ["ctf"] = true, + ["dd"] = true, + ["hp"] = true, + ["gun"] = true } local func = LUI.mp_hud.Scoreboard.DetermineIfSingleTeamGameType