add new data directory, and update updater

This commit is contained in:
m
2022-09-03 06:00:31 -05:00
parent b913ea7129
commit 748ab6899e
34 changed files with 286 additions and 265 deletions

View File

@ -0,0 +1,20 @@
if (game:issingleplayer()) then
return
end
if (Engine.InFrontend()) then
require("shaderdialog")
require("gamemodes")
require("no_mode_switch")
require("disable_useless_things")
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

View File

@ -0,0 +1,17 @@
-- Disable CP
Engine.SetDvarInt("ui_enable_cp", 0)
-- Disable CP store
Engine.SetDvarInt("ui_show_store", 0)
-- Remove CoD account button
if Engine.IsMultiplayer() and CoD.IsCoDAccountRegistrationAvailableInMyRegion() then
LUI.removemenubutton("pc_controls", 4)
end
-- Remove social button
LUI.MenuBuilder.m_definitions["online_friends_widget"] = function()
return {
type = "UIElement"
}
end

View File

@ -0,0 +1,11 @@
Cac.GameModes.Data = {
Standard = {
Label = Engine.Localize("@MPUI_STANDARD_CAPS"),
Image = "h1_ui_icon_playlist_standard",
List =
{
"dm", "war", "sd", "dom", "conf", "sab", "koth", "hp", "gun",
"dd", "ctf" -- missing gamemodes from UI
}
}
}

View File

@ -0,0 +1,13 @@
LUI.MenuBuilder.m_definitions["main_choose_exe_popup_menu"] = function()
return {
type = "generic_yesno_popup",
id = "main_choose_exe_popup_menu_id",
properties = {
popup_title = Engine.Localize("@MENU_NOTICE"),
message_text = Engine.Localize("@MENU_QUIT_WARNING"),
yes_action = function()
Engine.Quit()
end
}
}
end

View File

@ -0,0 +1,25 @@
LUI.MenuBuilder.registerPopupType("ShaderCacheDialog_original", LUI.ShaderCacheDialog.new)
local function dialog(...)
if (game:sharedget("has_accepted_shader_caching") == "1") then
return LUI.ShaderCacheDialog.new(...)
end
return LUI.MenuBuilder.BuildRegisteredType("generic_yesno_popup", {
popup_title = Engine.Localize("@MENU_WARNING"),
message_text = Engine.Localize("@PLATFORM_SHADER_PRECACHE_ASK"),
yes_action = function()
game:sharedset("has_accepted_shader_caching", "1")
LUI.FlowManager.RequestAddMenu(nil, "ShaderCacheDialog_original")
end,
yes_text = Engine.Localize("@MENU_YES"),
no_text = Engine.Localize("@MENU_NO_DONT_ASK"),
no_action = function()
Engine.SetDvarInt("r_preloadShadersFrontendAllow", 0)
end,
default_focus_index = 2,
cancel_will_close = false
})
end
LUI.MenuBuilder.m_types_build["ShaderCacheDialog"] = dialog