diff --git a/.gitignore b/.gitignore index a94f3bcf..d6b61674 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,5 @@ /.vscode +stylua.toml *.ff *.iwd *.dds diff --git a/ui/t6/mainlobby.lua b/ui/t6/mainlobby.lua index 36bcc647..9e375f30 100644 --- a/ui/t6/mainlobby.lua +++ b/ui/t6/mainlobby.lua @@ -16,7 +16,7 @@ if CoD.isZombie == false and (CoD.isXBOX or CoD.isPS3) then require("T6.Menus.EliteAppPopup") end CoD.MainLobby = {} -CoD.MainLobby.ShouldPreventCreateLobby = function () +CoD.MainLobby.ShouldPreventCreateLobby = function() if UIExpression.AcceptingInvite() == 1 or Engine.IsJoiningAnotherParty() == 1 or UIExpression.PrivatePartyHost() == 0 or Engine.IsGameLobbyRunning() then return true else @@ -24,7 +24,7 @@ CoD.MainLobby.ShouldPreventCreateLobby = function () end end -CoD.MainLobby.OnlinePlayAvailable = function (MainLobbyWidget, ClientInstance, Boolean) +CoD.MainLobby.OnlinePlayAvailable = function(MainLobbyWidget, ClientInstance, Boolean) if Boolean == nil then Boolean = false end @@ -98,7 +98,7 @@ CoD.MainLobby.OnlinePlayAvailable = function (MainLobbyWidget, ClientInstance, B return 0 end -CoD.MainLobby.IsControllerCountValid = function (MainLobbyWidget, LocalClientIndex, MaxLocalPlayers) +CoD.MainLobby.IsControllerCountValid = function(MainLobbyWidget, LocalClientIndex, MaxLocalPlayers) if MaxLocalPlayers < UIExpression.GetUsedControllerCount() then local ErrorPopup = MainLobbyWidget:openPopup("Error", LocalClientIndex) ErrorPopup:setMessage(Engine.Localize("XBOXLIVE_TOOMANYCONTROLLERS")) @@ -109,7 +109,7 @@ CoD.MainLobby.IsControllerCountValid = function (MainLobbyWidget, LocalClientInd end end -CoD.MainLobby.OpenPlayerMatchPartyLobby = function (MainLobbyWidget, ClientInstance) +CoD.MainLobby.OpenPlayerMatchPartyLobby = function(MainLobbyWidget, ClientInstance) if CoD.MainLobby.ShouldPreventCreateLobby() then return elseif CoD.MainLobby.OnlinePlayAvailable(MainLobbyWidget, ClientInstance) == 1 then @@ -145,7 +145,7 @@ CoD.MainLobby.OpenPlayerMatchPartyLobby = function (MainLobbyWidget, ClientInsta end end -CoD.MainLobby.OpenLeagueSelectionPopup = function (MainLobbyWidget, ClientInstance) +CoD.MainLobby.OpenLeagueSelectionPopup = function(MainLobbyWidget, ClientInstance) if CoD.MainLobby.ShouldPreventCreateLobby() then return elseif CoD.MainLobby.OnlinePlayAvailable(MainLobbyWidget, ClientInstance) == 1 then @@ -171,7 +171,7 @@ CoD.MainLobby.OpenLeagueSelectionPopup = function (MainLobbyWidget, ClientInstan end end -CoD.MainLobby.OpenLeaguePlayPartyLobby = function (MainLobbyWidget, ClientInstance) +CoD.MainLobby.OpenLeaguePlayPartyLobby = function(MainLobbyWidget, ClientInstance) if CoD.MainLobby.ShouldPreventCreateLobby() then return elseif CoD.MainLobby.OnlinePlayAvailable(MainLobbyWidget, ClientInstance) == 1 then @@ -185,7 +185,7 @@ CoD.MainLobby.OpenLeaguePlayPartyLobby = function (MainLobbyWidget, ClientInstan end end -CoD.MainLobby.OpenCustomGamesLobby = function (MainLobbyWidget, ClientInstance) +CoD.MainLobby.OpenCustomGamesLobby = function(MainLobbyWidget, ClientInstance) if CoD.MainLobby.ShouldPreventCreateLobby() then return elseif CoD.MainLobby.OnlinePlayAvailable(MainLobbyWidget, ClientInstance) == 1 and CoD.MainLobby.IsControllerCountValid(MainLobbyWidget, ClientInstance.controller, UIExpression.DvarInt(ClientInstance.controller, "party_maxlocalplayers_privatematch")) == 1 then @@ -202,7 +202,7 @@ CoD.MainLobby.OpenCustomGamesLobby = function (MainLobbyWidget, ClientInstance) end end -CoD.MainLobby.OpenSoloLobby_Zombie = function (MainLobbyWidget, ClientInstance) +CoD.MainLobby.OpenSoloLobby_Zombie = function(MainLobbyWidget, ClientInstance) if CoD.MainLobby.ShouldPreventCreateLobby() then return elseif CoD.MainLobby.OnlinePlayAvailable(MainLobbyWidget, ClientInstance) == 1 then @@ -220,14 +220,14 @@ CoD.MainLobby.OpenSoloLobby_Zombie = function (MainLobbyWidget, ClientInstance) end end -CoD.MainLobby.OpenTheaterLobby = function (MainLobbyWidget, ClientInstance) +CoD.MainLobby.OpenTheaterLobby = function(MainLobbyWidget, ClientInstance) if CoD.MainLobby.ShouldPreventCreateLobby() then return elseif UIExpression.CanSwitchToLobby(ClientInstance.controller, Dvar.party_maxplayers_theater:get(), Dvar.party_maxlocalplayers_theater:get()) == 0 then Dvar.ui_errorTitle:set(Engine.Localize("MENU_NOTICE_CAPS")) Dvar.ui_errorMessage:set(Engine.Localize("MENU_FILESHARE_MAX_LOCAL_PLAYERS")) CoD.Menu.OpenErrorPopup(MainLobbyWidget, { - controller = ClientInstance.controller + controller = ClientInstance.controller, }) return elseif Engine.CanViewContent() == false then @@ -236,13 +236,13 @@ CoD.MainLobby.OpenTheaterLobby = function (MainLobbyWidget, ClientInstance) elseif CoD.MainLobby.OnlinePlayAvailable(MainLobbyWidget, ClientInstance) == 1 and CoD.MainLobby.IsControllerCountValid(MainLobbyWidget, ClientInstance.controller, UIExpression.DvarInt(ClientInstance.controller, "party_maxlocalplayers_theater")) == 1 then CoD.SwitchToTheaterLobby(ClientInstance.controller) local TheaterLobbyMenu = MainLobbyWidget:openMenu("TheaterLobby", ClientInstance.controller, { - parent = "MainLobby" + parent = "MainLobby", }) MainLobbyWidget:close() end end -CoD.MainLobby.OpenCODTV = function (MainLobbyWidget, ClientInstance) +CoD.MainLobby.OpenCODTV = function(MainLobbyWidget, ClientInstance) if Engine.CanViewContent() == false then MainLobbyWidget:openPopup("popup_contentrestricted", ClientInstance.controller) return @@ -255,7 +255,7 @@ CoD.MainLobby.OpenCODTV = function (MainLobbyWidget, ClientInstance) end end -CoD.MainLobby.OpenBarracks = function (MainLobbyWidget, ClientInstance) +CoD.MainLobby.OpenBarracks = function(MainLobbyWidget, ClientInstance) if UIExpression.IsGuest(ClientInstance.controller) == 1 then MainLobbyWidget:openPopup("popup_guest_contentrestricted", ClientInstance.controller) return @@ -270,7 +270,7 @@ CoD.MainLobby.OpenBarracks = function (MainLobbyWidget, ClientInstance) end end -CoD.MainLobby.OpenStore = function (MainLobbyWidget, ClientInstance) +CoD.MainLobby.OpenStore = function(MainLobbyWidget, ClientInstance) if MainLobbyWidget.occludedBy then return end @@ -298,15 +298,15 @@ CoD.MainLobby.OpenStore = function (MainLobbyWidget, ClientInstance) end end -CoD.MainLobby.OpenControlsMenu = function (MainLobbyWidget, ClientInstance) +CoD.MainLobby.OpenControlsMenu = function(MainLobbyWidget, ClientInstance) MainLobbyWidget:openPopup("WiiUControllerSettings", ClientInstance.controller, true) end -CoD.MainLobby.OpenOptionsMenu = function (MainLobbyWidget, ClientInstance) +CoD.MainLobby.OpenOptionsMenu = function(MainLobbyWidget, ClientInstance) MainLobbyWidget:openPopup("OptionsMenu", ClientInstance.controller) end -CoD.MainLobby.UpdateButtonPaneButtonVisibilty_Multiplayer = function (MainLobbyButtonPane) +CoD.MainLobby.UpdateButtonPaneButtonVisibilty_Multiplayer = function(MainLobbyButtonPane) if CoD.isPartyHost() then MainLobbyButtonPane.body.buttonList:addElement(MainLobbyButtonPane.body.matchmakingButton) --MainLobbyButtonPane.body.buttonList:addElement(MainLobbyButtonPane.body.leaguePlayButton) @@ -327,7 +327,7 @@ CoD.MainLobby.UpdateButtonPaneButtonVisibilty_Multiplayer = function (MainLobbyB end end -CoD.MainLobby.UpdateButtonPaneButtonVisibilty_Zombie = function (MainLobbyButtonPane) +CoD.MainLobby.UpdateButtonPaneButtonVisibilty_Zombie = function(MainLobbyButtonPane) if CoD.isPartyHost() then -- MainLobbyButtonPane.body.buttonList:addElement(MainLobbyButtonPane.body.matchmakingButton) MainLobbyButtonPane.body.buttonList:addElement(MainLobbyButtonPane.body.customSpacer) @@ -352,7 +352,7 @@ CoD.MainLobby.UpdateButtonPaneButtonVisibilty_Zombie = function (MainLobbyButton end end -CoD.MainLobby.UpdateButtonPaneButtonVisibilty = function (MainLobbyButtonPane) +CoD.MainLobby.UpdateButtonPaneButtonVisibilty = function(MainLobbyButtonPane) if MainLobbyButtonPane == nil or MainLobbyButtonPane.body == nil then return elseif CoD.isZombie == true then @@ -363,7 +363,7 @@ CoD.MainLobby.UpdateButtonPaneButtonVisibilty = function (MainLobbyButtonPane) MainLobbyButtonPane:setLayoutCached(false) end -CoD.MainLobby.UpdateButtonPromptVisibility = function (MainLobbyWidget) +CoD.MainLobby.UpdateButtonPromptVisibility = function(MainLobbyWidget) if MainLobbyWidget == nil then return end @@ -391,7 +391,7 @@ CoD.MainLobby.UpdateButtonPromptVisibility = function (MainLobbyWidget) MainLobbyWidget:addNATType() end -CoD.MainLobby.PopulateButtons_Multiplayer = function (MainLobbyButtonPane) +CoD.MainLobby.PopulateButtons_Multiplayer = function(MainLobbyButtonPane) MainLobbyButtonPane.body.serverBrowserButton = MainLobbyButtonPane.body.buttonList:addButton(Engine.Localize("SERVER BROWSER"), nil, 1) MainLobbyButtonPane.body.serverBrowserButton.hintText = Engine.Localize(CoD.MPZM("MPUI_PLAYER_MATCH_DESC", "ZMUI_PLAYER_MATCH_DESC")) MainLobbyButtonPane.body.serverBrowserButton:setActionEventName("open_server_browser_mainlobby") @@ -438,7 +438,7 @@ CoD.MainLobby.PopulateButtons_Multiplayer = function (MainLobbyButtonPane) MainLobbyButtonPane.body.modsButton:setActionEventName("open_mods_menu") end -CoD.MainLobby.PopulateButtons_Zombie = function (MainLobbyButtonPane) +CoD.MainLobby.PopulateButtons_Zombie = function(MainLobbyButtonPane) MainLobbyButtonPane.body.serverBrowserButton = MainLobbyButtonPane.body.buttonList:addButton(Engine.Localize("SERVER BROWSER"), nil, 1) MainLobbyButtonPane.body.serverBrowserButton.hintText = Engine.Localize(CoD.MPZM("MPUI_PLAYER_MATCH_DESC", "ZMUI_PLAYER_MATCH_DESC")) MainLobbyButtonPane.body.serverBrowserButton:setActionEventName("open_server_browser_mainlobby") @@ -470,7 +470,7 @@ CoD.MainLobby.PopulateButtons_Zombie = function (MainLobbyButtonPane) MainLobbyButtonPane.body.modsButton:setActionEventName("open_mods_menu") end -CoD.MainLobby.PopulateButtons = function (MainLobbyButtonPane) +CoD.MainLobby.PopulateButtons = function(MainLobbyButtonPane) if CoD.isZombie == true then CoD.MainLobby.PopulateButtons_Zombie(MainLobbyButtonPane) else @@ -504,7 +504,7 @@ CoD.MainLobby.PopulateButtons = function (MainLobbyButtonPane) end end -CoD.MainLobby.UpdateOnlinePlayerCount = function (PlayerCountLabel) +CoD.MainLobby.UpdateOnlinePlayerCount = function(PlayerCountLabel) if CoD.isOnlineGame() then local PlayerCountText = CoD.Menu.GetOnlinePlayerCountText() if PlayerCountText ~= "" then @@ -515,7 +515,7 @@ CoD.MainLobby.UpdateOnlinePlayerCount = function (PlayerCountLabel) end end -CoD.MainLobby.FirstSignedInToLive = function (MainLobbyWidget) +CoD.MainLobby.FirstSignedInToLive = function(MainLobbyWidget) if MainLobbyWidget ~= nil then if CoD.isXBOX then MainLobbyWidget.anyControllerAllowed = false @@ -526,13 +526,13 @@ CoD.MainLobby.FirstSignedInToLive = function (MainLobbyWidget) end end -CoD.MainLobby.LastSignedOutOfLive = function (MainLobbyWidget) +CoD.MainLobby.LastSignedOutOfLive = function(MainLobbyWidget) if MainLobbyWidget ~= nil and CoD.isXBOX then MainLobbyWidget.anyControllerAllowed = true end end -CoD.MainLobby.PlayerSelected = function (MainLobbyWidget, PlayerSelectedEvent) +CoD.MainLobby.PlayerSelected = function(MainLobbyWidget, PlayerSelectedEvent) if MainLobbyWidget.joinable ~= nil and CoD.canJoinSession(UIExpression.GetPrimaryController(), PlayerSelectedEvent.playerXuid) then if MainLobbyWidget.joinButton == nil and not MainLobbyWidget.m_blockJoinButton then MainLobbyWidget:addJoinButton() @@ -545,7 +545,7 @@ CoD.MainLobby.PlayerSelected = function (MainLobbyWidget, PlayerSelectedEvent) MainLobbyWidget:dispatchEventToChildren(PlayerSelectedEvent) end -CoD.MainLobby.PlayerDeselected = function (MainLobbyWidget, PlayerDeselectedEvent) +CoD.MainLobby.PlayerDeselected = function(MainLobbyWidget, PlayerDeselectedEvent) if MainLobbyWidget.joinButton ~= nil then MainLobbyWidget.joinButton:close() MainLobbyWidget.joinButton = nil @@ -553,23 +553,23 @@ CoD.MainLobby.PlayerDeselected = function (MainLobbyWidget, PlayerDeselectedEven MainLobbyWidget:dispatchEventToChildren(PlayerDeselectedEvent) end -CoD.MainLobby.CurrentPanelChanged = function (MainLobbyWidget, f27_arg1) +CoD.MainLobby.CurrentPanelChanged = function(MainLobbyWidget, f27_arg1) if CoD.isPC then MainLobbyWidget.m_blockJoinButton = f27_arg1.id ~= "PanelManager.lobbyPane" end end --Unused skipped -CoD.MainLobby.BusyList_Update = function (f28_arg0, f28_arg1, f28_arg2, f28_arg3, f28_arg4) +CoD.MainLobby.BusyList_Update = function(f28_arg0, f28_arg1, f28_arg2, f28_arg3, f28_arg4) CoD.PlayerList.Update(f28_arg0, Engine.GetBusyFriendsOfAllLocalPlayers(f28_arg0.maxRows - f28_arg2), f28_arg2, f28_arg3, f28_arg4) end -CoD.MainLobby.Update = function (MainLobbyWidget, ClientInstance) +CoD.MainLobby.Update = function(MainLobbyWidget, ClientInstance) if MainLobbyWidget == nil then return elseif UIExpression.IsDemonwareFetchingDone(ClientInstance.controller) == 1 == true then MainLobbyWidget.panelManager:processEvent({ - name = "fetching_done" + name = "fetching_done", }) end CoD.MainLobby.UpdateButtonPaneButtonVisibilty(MainLobbyWidget.buttonPane) @@ -577,7 +577,7 @@ CoD.MainLobby.Update = function (MainLobbyWidget, ClientInstance) MainLobbyWidget:dispatchEventToChildren(ClientInstance) end -CoD.MainLobby.ClientLeave = function (MainLobbyWidget, ClientInstance) +CoD.MainLobby.ClientLeave = function(MainLobbyWidget, ClientInstance) Engine.ExecNow(ClientInstance.controller, "leaveAllParties") Engine.PartyHostClearUIState() CoD.StartMainLobby(ClientInstance.controller) @@ -585,7 +585,7 @@ CoD.MainLobby.ClientLeave = function (MainLobbyWidget, ClientInstance) CoD.MainLobby.UpdateButtonPromptVisibility() end -CoD.MainLobby.GoBack = function (MainLobbyWidget, ClientInstance) +CoD.MainLobby.GoBack = function(MainLobbyWidget, ClientInstance) Engine.SessionModeResetModes() Engine.Exec(ClientInstance.controller, "xstopprivateparty") if CoD.isPS3 then @@ -595,18 +595,18 @@ CoD.MainLobby.GoBack = function (MainLobbyWidget, ClientInstance) CoD.Menu.goBack(MainLobbyWidget, ClientInstance.controller) end -CoD.MainLobby.Back = function (MainLobbyWidget, ClientInstance) +CoD.MainLobby.Back = function(MainLobbyWidget, ClientInstance) if CoD.Lobby.OpenSignOutPopup(MainLobbyWidget, ClientInstance) == true then return elseif UIExpression.IsPrimaryLocalClient(ClientInstance.controller) == 0 then Engine.Exec(ClientInstance.controller, "signclientout") MainLobbyWidget:processEvent({ - name = "controller_backed_out" + name = "controller_backed_out", }) return elseif UIExpression.AloneInPartyIgnoreSplitscreen(ClientInstance.controller, 1) == 0 then local CustomLeaveMessage = { - params = {} + params = {}, } if not CoD.isPartyHost() then CustomLeaveMessage.titleText = Engine.Localize("MENU_LEAVE_LOBBY_TITLE") @@ -615,7 +615,7 @@ CoD.MainLobby.Back = function (MainLobbyWidget, ClientInstance) leaveHandler = CoD.MainLobby.ClientLeave, leaveEvent = "client_leave", leaveText = Engine.Localize("MENU_LEAVE_LOBBY_AND_PARTY"), - debugHelper = "You're a client of a private party, remove you from the party" + debugHelper = "You're a client of a private party, remove you from the party", }) else CustomLeaveMessage.titleText = Engine.Localize("MENU_DISBAND_PARTY_TITLE") @@ -624,7 +624,7 @@ CoD.MainLobby.Back = function (MainLobbyWidget, ClientInstance) leaveHandler = CoD.MainLobby.GoBack, leaveEvent = "host_leave", leaveText = Engine.Localize("MENU_LEAVE_AND_DISBAND_PARTY"), - debugHelper = "You're the leader of a private party, choosing this will disband your party" + debugHelper = "You're the leader of a private party, choosing this will disband your party", }) end CoD.Lobby.ConfirmLeave(MainLobbyWidget, ClientInstance.controller, nil, nil, CustomLeaveMessage) @@ -633,7 +633,7 @@ CoD.MainLobby.Back = function (MainLobbyWidget, ClientInstance) end end -CoD.MainLobby.AddLobbyPaneElements = function (LobbyPane, MenuParty) +CoD.MainLobby.AddLobbyPaneElements = function(LobbyPane, MenuParty) CoD.LobbyPanes.addLobbyPaneElements(LobbyPane, MenuParty, UIExpression.DvarInt(nil, "party_maxlocalplayers_mainlobby")) LobbyPane.body.lobbyList.joinableList = CoD.JoinableList.New({ leftAnchor = true, @@ -643,7 +643,7 @@ CoD.MainLobby.AddLobbyPaneElements = function (LobbyPane, MenuParty) topAnchor = true, bottomAnchor = false, top = 0, - bottom = 0 + bottom = 0, }, false, "", "joinableList", LobbyPane.id) LobbyPane.body.lobbyList.joinableList.pane = LobbyPane LobbyPane.body.lobbyList.joinableList.maxRows = CoD.MaxPlayerListRows - 2 @@ -651,46 +651,46 @@ CoD.MainLobby.AddLobbyPaneElements = function (LobbyPane, MenuParty) LobbyPane.body.lobbyList:addElement(LobbyPane.body.lobbyList.joinableList) end -CoD.MainLobby.ButtonListButtonGainFocus = function (f34_arg0, ClientInstance) +CoD.MainLobby.ButtonListButtonGainFocus = function(f34_arg0, ClientInstance) f34_arg0:dispatchEventToParent({ - name = "add_party_privacy_button" + name = "add_party_privacy_button", }) CoD.Lobby.ButtonListButtonGainFocus(f34_arg0, ClientInstance) end -CoD.MainLobby.ButtonListAddButton = function (f35_arg0, f35_arg1, f35_arg2, f35_arg3) +CoD.MainLobby.ButtonListAddButton = function(f35_arg0, f35_arg1, f35_arg2, f35_arg3) local f35_local0 = CoD.Lobby.ButtonListAddButton(f35_arg0, f35_arg1, f35_arg2, f35_arg3) f35_local0:registerEventHandler("gain_focus", CoD.MainLobby.ButtonListButtonGainFocus) return f35_local0 end -CoD.MainLobby.AddButtonPaneElements = function (f36_arg0) +CoD.MainLobby.AddButtonPaneElements = function(f36_arg0) CoD.LobbyPanes.addButtonPaneElements(f36_arg0) f36_arg0.body.buttonList.addButton = CoD.MainLobby.ButtonListAddButton end -CoD.MainLobby.PopulateButtonPaneElements = function (MainLobbyButtonPane) +CoD.MainLobby.PopulateButtonPaneElements = function(MainLobbyButtonPane) CoD.MainLobby.PopulateButtons(MainLobbyButtonPane) CoD.MainLobby.UpdateButtonPaneButtonVisibilty(MainLobbyButtonPane) end -CoD.MainLobby.GoToFindingGames_Zombie = function (MainLobbyWidget, ClientInstance) +CoD.MainLobby.GoToFindingGames_Zombie = function(MainLobbyWidget, ClientInstance) Engine.Exec(ClientInstance.controller, "xstartparty") Engine.Exec(ClientInstance.controller, "updategamerprofile") local PublicGameLobbyMenu = MainLobbyWidget:openMenu("PublicGameLobby", ClientInstance.controller) PublicGameLobbyMenu:setPreviousMenu("MainLobby") PublicGameLobbyMenu:registerAnimationState("hide", { - alpha = 0 + alpha = 0, }) PublicGameLobbyMenu:animateToState("hide") PublicGameLobbyMenu:registerAnimationState("show", { - alpha = 1 + alpha = 1, }) PublicGameLobbyMenu:animateToState("show", 500) MainLobbyWidget:close() end -CoD.MainLobby.ButtonPromptJoin = function (MainLobbyWidget, ClientInstance) +CoD.MainLobby.ButtonPromptJoin = function(MainLobbyWidget, ClientInstance) if UIExpression.IsGuest(ClientInstance.controller) == 1 then local f39_local0 = MainLobbyWidget:openPopup("Error", ClientInstance.controller) f39_local0:setMessage(Engine.Localize("XBOXLIVE_NOGUESTACCOUNTS")) @@ -703,7 +703,7 @@ CoD.MainLobby.ButtonPromptJoin = function (MainLobbyWidget, ClientInstance) end end -LUI.createMenu.MainLobby = function (LocalClientIndex) +LUI.createMenu.MainLobby = function(LocalClientIndex) local MainLobbyName = Engine.Localize(CoD.MPZM("MENU_MULTIPLAYER_CAPS", "MENU_ZOMBIES_CAPS")) local MainLobbyWidget = CoD.Lobby.New("MainLobby", LocalClientIndex, nil, MainLobbyName) MainLobbyWidget.controller = LocalClientIndex @@ -769,7 +769,7 @@ LUI.createMenu.MainLobby = function (LocalClientIndex) end else MainLobbyWidget.buttonPane.body.theaterButton:processEvent({ - name = "gain_focus" + name = "gain_focus", }) end end @@ -795,11 +795,11 @@ LUI.createMenu.MainLobby = function (LocalClientIndex) return MainLobbyWidget end -CoD.MainLobby.OpenSessionRejoinPopup = function (MainLobbyWidget, ClientInstance) +CoD.MainLobby.OpenSessionRejoinPopup = function(MainLobbyWidget, ClientInstance) MainLobbyWidget:openPopup("RejoinSessionPopup", ClientInstance.controller) end -CoD.MainLobby.elite_registration_ended = function (MainLobbyWidget, ClientInstance) +CoD.MainLobby.elite_registration_ended = function(MainLobbyWidget, ClientInstance) if UIExpression.IsGuest(ClientInstance.controller) == 1 then MainLobbyWidget:openPopup("popup_guest_contentrestricted", ClientInstance.controller) return @@ -812,7 +812,7 @@ CoD.MainLobby.elite_registration_ended = function (MainLobbyWidget, ClientInstan end end -CoD.MainLobby.OpenEliteAppPopup = function (MainLobbyWidget, ClientInstance) +CoD.MainLobby.OpenEliteAppPopup = function(MainLobbyWidget, ClientInstance) if UIExpression.IsGuest(ClientInstance.controller) == 1 then MainLobbyWidget:openPopup("popup_guest_contentrestricted", ClientInstance.controller) return @@ -833,7 +833,7 @@ end CoD.MainLobby.OpenModsList = function(MainLobbyWidget, ClientInstance) MainLobbyWidget:openMenu("Mods", ClientInstance.controller, { - parent = "MainLobby" + parent = "MainLobby", }) MainLobbyWidget:close() -end \ No newline at end of file +end diff --git a/ui/t6/mapinfoimage.lua b/ui/t6/mapinfoimage.lua index f1ec582f..232be8d2 100644 --- a/ui/t6/mapinfoimage.lua +++ b/ui/t6/mapinfoimage.lua @@ -11,7 +11,7 @@ CoD.MapInfoImage.MapImageLeft = 6 CoD.MapInfoImage.SpinnerImageYPadding = -25 CoD.MapInfoImage.SpinnerImageXPadding = -8 CoD.MapInfoImage.SpinnerImageDimension = 32 -CoD.MapInfoImage.new = function (f1_arg0) +CoD.MapInfoImage.new = function(f1_arg0) local Widget = LUI.UIElement.new(f1_arg0) Widget:registerEventHandler("gamelobby_update", CoD.MapInfoImage.RefreshEvent) Widget:registerEventHandler("game_options_update", CoD.MapInfoImage.RefreshEvent) @@ -32,7 +32,7 @@ CoD.MapInfoImage.new = function (f1_arg0) bottomAnchor = true, top = f1_local2 - CoD.MapInfoImage.MapImageHeight, bottom = f1_local2, - alpha = 0 + alpha = 0, }) Widget:addElement(Widget.mapImage) local f1_local3 = 46 @@ -53,7 +53,7 @@ CoD.MapInfoImage.new = function (f1_arg0) material = RegisterMaterial("white"), red = 0, green = 0, - blue = 0 + blue = 0, }) Widget.unselectedFilmImageBackground:setAlpha(0) Widget:addElement(Widget.unselectedFilmImageBackground) @@ -69,7 +69,7 @@ CoD.MapInfoImage.new = function (f1_arg0) material = RegisterMaterial("menu_mp_lobby_icon_film"), red = 1, green = 1, - blue = 1 + blue = 1, }) Widget.unselectedFilmImage:setAlpha(0) Widget:addElement(Widget.unselectedFilmImage) @@ -88,7 +88,7 @@ CoD.MapInfoImage.new = function (f1_arg0) font = CoD.fonts.ExtraSmall, red = CoD.offWhite.r, green = CoD.offWhite.g, - blue = CoD.offWhite.b + blue = CoD.offWhite.b, }) Widget:addElement(Widget.gameTypeText) Widget.mapNameText = LUI.UIText.new({ @@ -104,7 +104,7 @@ CoD.MapInfoImage.new = function (f1_arg0) font = CoD.fonts.Default, red = CoD.offWhite.r, green = CoD.offWhite.g, - blue = CoD.offWhite.b + blue = CoD.offWhite.b, }) Widget:addElement(Widget.mapNameText) local f1_local7 = UIExpression.ToUpper(nil, Engine.Localize("EXE_LOADING")) @@ -127,7 +127,7 @@ CoD.MapInfoImage.new = function (f1_arg0) top = CoD.MapInfoImage.MapImageHeight / 2 - Widget.unselectedFilmTextSize / 2, bottom = CoD.MapInfoImage.MapImageHeight / 2 + Widget.unselectedFilmTextSize / 2, font = CoD.fonts.Default, - alignment = LUI.Alignment.Center + alignment = LUI.Alignment.Center, }) Widget.unselectedFilmText:setAlpha(0) Widget:addElement(Widget.unselectedFilmText) @@ -168,7 +168,7 @@ CoD.MapInfoImage.new = function (f1_arg0) red = 1, green = 1, blue = 1, - alpha = 0 + alpha = 0, }) Widget:addElement(Widget.livestreamCam) CoD.MapInfoImage.UpdateLiveStreamCamera(Widget) @@ -182,11 +182,11 @@ CoD.MapInfoImage.new = function (f1_arg0) return Widget end -CoD.MapInfoImage.Update = function (f2_arg0, f2_arg1, f2_arg2) +CoD.MapInfoImage.Update = function(f2_arg0, f2_arg1, f2_arg2) if f2_arg1 ~= nil then f2_arg0.mapImage:registerAnimationState("change_map", { material = RegisterMaterial("menu_" .. f2_arg1 .. "_map_select_final"), - alpha = 1 + alpha = 1, }) f2_arg0.mapImage:animateToState("change_map") f2_arg0.mapNameText:setText(UIExpression.ToUpper(nil, Engine.Localize(UIExpression.TableLookup(nil, UIExpression.GetCurrentMapTableName(), 0, f2_arg1, 3)))) @@ -201,7 +201,7 @@ CoD.MapInfoImage.Update = function (f2_arg0, f2_arg1, f2_arg2) CoD.MapInfoImage.DLCWarningUpdate(f2_arg0) end -CoD.MapInfoImage.UpdateLiveStreamCamera = function (f3_arg0, f3_arg1) +CoD.MapInfoImage.UpdateLiveStreamCamera = function(f3_arg0, f3_arg1) if Engine.IsLivestreamEnabled() and Engine.WebM_camera_IsAvailable() and Engine.WebM_camera_IsEnabled() then f3_arg0.livestreamCam:setAlpha(1) else @@ -209,15 +209,15 @@ CoD.MapInfoImage.UpdateLiveStreamCamera = function (f3_arg0, f3_arg1) end end -CoD.MapInfoImage.UpdateEvent = function (f4_arg0, f4_arg1) +CoD.MapInfoImage.UpdateEvent = function(f4_arg0, f4_arg1) f4_arg0:update(f4_arg1.map, f4_arg1.gametype) end -CoD.MapInfoImage.RefreshEvent = function (f5_arg0, f5_arg1) +CoD.MapInfoImage.RefreshEvent = function(f5_arg0, f5_arg1) f5_arg0:update(Dvar.ui_mapname:get(), Dvar.ui_gametype:get()) end -CoD.MapInfoImage.ZombieUpdate = function (f6_arg0, f6_arg1, f6_arg2) +CoD.MapInfoImage.ZombieUpdate = function(f6_arg0, f6_arg1, f6_arg2) if Engine.GameModeIsMode(CoD.GAMEMODE_THEATER) == true and UIExpression.DvarString(f6_arg0.controller, "ui_demoname") == "" then return end @@ -227,7 +227,7 @@ CoD.MapInfoImage.ZombieUpdate = function (f6_arg0, f6_arg1, f6_arg2) local f6_local2 = Engine.PartyGetHostUIState() if (f6_local0 == "" or f6_local2 == CoD.PARTYHOST_STATE_SELECTING_GAMETYPE or f6_local2 == CoD.PARTYHOST_STATE_SELECTING_MAP) and UIExpression.GameHost(f6_arg0.controller) ~= 1 then f6_arg0.mapImage:registerAnimationState("change_map", { - alpha = 0 + alpha = 0, }) f6_arg0.mapImage:animateToState("change_map", 100) f6_arg0.mapNameText:setText("") @@ -240,7 +240,7 @@ CoD.MapInfoImage.ZombieUpdate = function (f6_arg0, f6_arg1, f6_arg2) local materialName = GetMapMaterialName(f6_arg1, f6_local1, f6_local0) f6_arg0.mapImage:registerAnimationState("change_map", { material = RegisterMaterial(materialName), - alpha = 1 + alpha = 1, }) f6_arg0.mapImage:animateToState("change_map", 100) @@ -311,7 +311,7 @@ function GetGameModeDisplayName(gametype) return Engine.Localize("ZMUI_" .. gametype .. "_CAPS") end -CoD.MapInfoImage.SetModifedCustomGame = function (f7_arg0, f7_arg1) +CoD.MapInfoImage.SetModifedCustomGame = function(f7_arg0, f7_arg1) if f7_arg1 == true then f7_arg0.modifedCustomGameElement.text:setText(Dvar.fshCustomGameName:get()) f7_arg0.modifedCustomGameElement:setAlpha(1) @@ -320,7 +320,7 @@ CoD.MapInfoImage.SetModifedCustomGame = function (f7_arg0, f7_arg1) end end -CoD.MapInfoImage.TheaterUpdate = function (f8_arg0, f8_arg1, f8_arg2, f8_arg3, f8_arg4, f8_arg5) +CoD.MapInfoImage.TheaterUpdate = function(f8_arg0, f8_arg1, f8_arg2, f8_arg3, f8_arg4, f8_arg5) if UIExpression.DvarString(f8_arg0.controller, "ui_demoname") == "" then f8_arg0.unselectedFilmImageBackground:setAlpha(0.2) f8_arg0.unselectedFilmImage:setAlpha(0.2) @@ -357,9 +357,9 @@ CoD.MapInfoImage.TheaterUpdate = function (f8_arg0, f8_arg1, f8_arg2, f8_arg3, f CoD.MapInfoImage.DLCWarningUpdate(f8_arg0) end -CoD.MapInfoImage.Show = function (f9_arg0, f9_arg1) +CoD.MapInfoImage.Show = function(f9_arg0, f9_arg1) f9_arg0:registerAnimationState("show", { - alphaMultiplier = 1 + alphaMultiplier = 1, }) local f9_local0 = CoD.MapInfoImage.AnimDuration if f9_arg1 then @@ -368,9 +368,9 @@ CoD.MapInfoImage.Show = function (f9_arg0, f9_arg1) f9_arg0:animateToState("show", f9_local0) end -CoD.MapInfoImage.Hide = function (f10_arg0, f10_arg1) +CoD.MapInfoImage.Hide = function(f10_arg0, f10_arg1) f10_arg0:registerAnimationState("hide", { - alphaMultiplier = 0 + alphaMultiplier = 0, }) local f10_local0 = CoD.MapInfoImage.AnimDuration if f10_arg1 then @@ -379,7 +379,7 @@ CoD.MapInfoImage.Hide = function (f10_arg0, f10_arg1) f10_arg0:animateToState("hide", f10_local0) end -CoD.MapInfoImage.ShowLeagueInfo = function (f11_arg0, f11_arg1) +CoD.MapInfoImage.ShowLeagueInfo = function(f11_arg0, f11_arg1) if f11_arg1 then f11_arg0.gameTypeText:setText(UIExpression.ToUpper(nil, f11_arg1.description)) f11_arg0.mapNameText:setText(UIExpression.ToUpper(nil, CoD.Menu.GetOnlinePlayerCountText(Engine.GetPlaylistID()))) @@ -389,7 +389,7 @@ CoD.MapInfoImage.ShowLeagueInfo = function (f11_arg0, f11_arg1) CoD.MapInfoImage.UpdateLiveStreamCamera(f11_arg0, nil) end -CoD.MapInfoImage.DLCWarningUpdate = function (f12_arg0) +CoD.MapInfoImage.DLCWarningUpdate = function(f12_arg0) if f12_arg0.dlcWarningContainer ~= nil then local f12_local0 = Engine.DoesPartyHaveDLCForMap(Dvar.ui_mapname:get()) local f12_local1 = "" @@ -410,4 +410,4 @@ CoD.MapInfoImage.DLCWarningUpdate = function (f12_arg0) end f12_arg0.dlcWarningContainer.warningLabel:setText(f12_local1) end -end \ No newline at end of file +end diff --git a/ui/t6/mapslist.lua b/ui/t6/mapslist.lua index fd41301e..d10bd2b3 100644 --- a/ui/t6/mapslist.lua +++ b/ui/t6/mapslist.lua @@ -1,6 +1,6 @@ -require( "T6.Lobby" ) -require( "T6.Menus.PopupMenus" ) -require( "T6.ListBox" ) +require("T6.Lobby") +require("T6.Menus.PopupMenus") +require("T6.ListBox") local GameModes = { "ZMUI_ZCLASSIC_GAMEMODE_CAPS", @@ -29,23 +29,23 @@ local Locations = { "ZMUI_CORNFIELD_CAPS", "ZMUI_NUKED_STARTLOC_CAPS", -- "ZMUI_GREEN_ROOFTOP_CAPS", -- TODO: add localized string, uncomment when location is added - -- "ZMUI_BLUE_ROOFTOP_CAPS", -- TODO: add localized string, uncomment when location is added - -- "ZMUI_BLUE_HIGHRISE_CAPS", -- TODO: add localized string, uncomment when location is added + -- "ZMUI_BLUE_ROOFTOP_CAPS", -- TODO: add localized string, uncomment when location is added + -- "ZMUI_BLUE_HIGHRISE_CAPS", -- TODO: add localized string, uncomment when location is added "ZMUI_CELLBLOCK_CAPS", - "ZMUI_DOCKS_CAPS", + "ZMUI_DOCKS_CAPS", "ZMUI_STREET_LOC_CAPS", - "ZMUI_MAZE_CAPS", + "ZMUI_MAZE_CAPS", -- "ZMUI_TRENCHES_CAPS", -- TODO: add localized string, uncomment when location is added - -- "ZMUI_EXCAVATION_SITE_CAPS", -- TODO: add localized string, uncomment when location is added - -- "ZMUI_CHURCH_CAPS", -- TODO: add localized string, uncomment when location is added - -- "ZMUI_CRAZY_PLACE_CAPS", -- TODO: add localized string, uncomment when location is added + -- "ZMUI_EXCAVATION_SITE_CAPS", -- TODO: add localized string, uncomment when location is added + -- "ZMUI_CHURCH_CAPS", -- TODO: add localized string, uncomment when location is added + -- "ZMUI_CRAZY_PLACE_CAPS", -- TODO: add localized string, uncomment when location is added } -local function gameModeListFocusChangedEventHandler( self, event ) +local function gameModeListFocusChangedEventHandler(self, event) local focusedIndex = self.listBox:getFocussedIndex() end -local function gameModeListSelectionClickedEventHandler( self, event ) +local function gameModeListSelectionClickedEventHandler(self, event) local focusedIndex = self.listBox:getFocussedIndex() local gameMode = GameModes[focusedIndex] @@ -89,61 +89,61 @@ local function gameModeListSelectionClickedEventHandler( self, event ) self:close() end -local function gameModeListBackEventHandler( self, event ) - CoD.Menu.ButtonPromptBack( self, event ) +local function gameModeListBackEventHandler(self, event) + CoD.Menu.ButtonPromptBack(self, event) end -local function gameModeListCreateButtonMutables( controller, mutables ) +local function gameModeListCreateButtonMutables(controller, mutables) local text = LUI.UIText.new() - text:setLeftRight( true, false, 0, 0 ) - text:setTopBottom( true, true, 0, 0 ) - text:setRGB( 1, 1, 1 ) - text:setAlpha( 1 ) - mutables:addElement( text ) + text:setLeftRight(true, false, 0, 0) + text:setTopBottom(true, true, 0, 0) + text:setRGB(1, 1, 1) + text:setAlpha(1) + mutables:addElement(text) mutables.text = text end -local function gameModeListGetButtonData( controller, index, mutables, self ) +local function gameModeListGetButtonData(controller, index, mutables, self) local gameMode = GameModes[index] - mutables.text:setText( Engine.Localize(gameMode) ) + mutables.text:setText(Engine.Localize(gameMode)) end -function LUI.createMenu.SelectGameModeListZM( controller ) - local self = CoD.Menu.New( "SelectGameModeListZM" ) +function LUI.createMenu.SelectGameModeListZM(controller) + local self = CoD.Menu.New("SelectGameModeListZM") self.controller = controller if UIExpression.DvarBool(nil, "ui_game_lobby_open") == 1 then - self:setPreviousMenu( "PrivateOnlineGameLobby" ) + self:setPreviousMenu("PrivateOnlineGameLobby") else - self:setPreviousMenu( "MainLobby" ) + self:setPreviousMenu("MainLobby") end - self:registerEventHandler( "open_menu", CoD.Lobby.OpenMenu ) + self:registerEventHandler("open_menu", CoD.Lobby.OpenMenu) self:addSelectButton() self:addBackButton() - self:addTitle( Engine.Localize("MPUI_GAMEMODE_CAPS") ) + self:addTitle(Engine.Localize("MPUI_GAMEMODE_CAPS")) - local listBox = CoD.ListBox.new( nil, controller, 15, CoD.CoD9Button.Height, 250, gameModeListCreateButtonMutables, gameModeListGetButtonData, 0, 0 ) - listBox:setLeftRight( true, false, 0, 250 ) - listBox:setTopBottom( true, false, 75, 75 + 530 ) - listBox:addScrollBar( 530 + (8 * 12), 2 ) - listBox:setTotalItems( #GameModes ) - self:addElement( listBox ) + local listBox = CoD.ListBox.new(nil, controller, 15, CoD.CoD9Button.Height, 250, gameModeListCreateButtonMutables, gameModeListGetButtonData, 0, 0) + listBox:setLeftRight(true, false, 0, 250) + listBox:setTopBottom(true, false, 75, 75 + 530) + listBox:addScrollBar(530 + (8 * 12), 2) + listBox:setTotalItems(#GameModes) + self:addElement(listBox) self.listBox = listBox - self:registerEventHandler( "button_prompt_back", gameModeListBackEventHandler ) - self:registerEventHandler( "listbox_focus_changed", gameModeListFocusChangedEventHandler ) - self:registerEventHandler( "listbox_clicked", gameModeListSelectionClickedEventHandler ) + self:registerEventHandler("button_prompt_back", gameModeListBackEventHandler) + self:registerEventHandler("listbox_focus_changed", gameModeListFocusChangedEventHandler) + self:registerEventHandler("listbox_clicked", gameModeListSelectionClickedEventHandler) return self end -local function mapListFocusChangedEventHandler( self, event ) +local function mapListFocusChangedEventHandler(self, event) local focusedIndex = self.listBox:getFocussedIndex() end -local function mapListSelectionClickedEventHandler( self, event ) +local function mapListSelectionClickedEventHandler(self, event) local focusedIndex = self.listBox:getFocussedIndex() local map = Maps[focusedIndex] @@ -178,51 +178,51 @@ local function mapListSelectionClickedEventHandler( self, event ) self:close() end -local function mapListCreateButtonMutables( controller, mutables ) +local function mapListCreateButtonMutables(controller, mutables) local text = LUI.UIText.new() - text:setLeftRight( true, false, 0, 0 ) - text:setTopBottom( true, true, 0, 0 ) - text:setRGB( 1, 1, 1 ) - text:setAlpha( 1 ) - mutables:addElement( text ) + text:setLeftRight(true, false, 0, 0) + text:setTopBottom(true, true, 0, 0) + text:setRGB(1, 1, 1) + text:setAlpha(1) + mutables:addElement(text) mutables.text = text end -local function mapListGetButtonData( controller, index, mutables, self ) +local function mapListGetButtonData(controller, index, mutables, self) local map = Maps[index] - mutables.text:setText( Engine.Localize(map) ) + mutables.text:setText(Engine.Localize(map)) end -function LUI.createMenu.SelectMapListZM( controller ) - local self = CoD.Menu.New( "SelectMapListZM" ) +function LUI.createMenu.SelectMapListZM(controller) + local self = CoD.Menu.New("SelectMapListZM") self.controller = controller - self:setPreviousMenu( "SelectGameModeListZM" ) - self:registerEventHandler( "open_menu", CoD.Lobby.OpenMenu ) + self:setPreviousMenu("SelectGameModeListZM") + self:registerEventHandler("open_menu", CoD.Lobby.OpenMenu) self:addSelectButton() self:addBackButton() - self:addTitle( Engine.Localize("MPUI_MAPS_CAPS") ) + self:addTitle(Engine.Localize("MPUI_MAPS_CAPS")) - local listBox = CoD.ListBox.new( nil, controller, 15, CoD.CoD9Button.Height, 250, mapListCreateButtonMutables, mapListGetButtonData, 0, 0 ) - listBox:setLeftRight( true, false, 0, 250 ) - listBox:setTopBottom( true, false, 75, 75 + 530 ) - listBox:addScrollBar( 530 + (8 * 12), 2 ) - listBox:setTotalItems( #Maps ) - self:addElement( listBox ) + local listBox = CoD.ListBox.new(nil, controller, 15, CoD.CoD9Button.Height, 250, mapListCreateButtonMutables, mapListGetButtonData, 0, 0) + listBox:setLeftRight(true, false, 0, 250) + listBox:setTopBottom(true, false, 75, 75 + 530) + listBox:addScrollBar(530 + (8 * 12), 2) + listBox:setTotalItems(#Maps) + self:addElement(listBox) self.listBox = listBox - self:registerEventHandler( "listbox_focus_changed", mapListFocusChangedEventHandler ) - self:registerEventHandler( "listbox_clicked", mapListSelectionClickedEventHandler ) + self:registerEventHandler("listbox_focus_changed", mapListFocusChangedEventHandler) + self:registerEventHandler("listbox_clicked", mapListSelectionClickedEventHandler) return self end -local function locationListFocusChangedEventHandler( self, event ) +local function locationListFocusChangedEventHandler(self, event) local focusedIndex = self.listBox:getFocussedIndex() end -local function locationListSelectionClickedEventHandler( self, event ) +local function locationListSelectionClickedEventHandler(self, event) local focusedIndex = self.listBox:getFocussedIndex() local location = Locations[focusedIndex] @@ -292,42 +292,42 @@ local function locationListSelectionClickedEventHandler( self, event ) self:close() end -local function locationListCreateButtonMutables( controller, mutables ) +local function locationListCreateButtonMutables(controller, mutables) local text = LUI.UIText.new() - text:setLeftRight( true, false, 0, 0 ) - text:setTopBottom( true, true, 0, 0 ) - text:setRGB( 1, 1, 1 ) - text:setAlpha( 1 ) - mutables:addElement( text ) + text:setLeftRight(true, false, 0, 0) + text:setTopBottom(true, true, 0, 0) + text:setRGB(1, 1, 1) + text:setAlpha(1) + mutables:addElement(text) mutables.text = text end -local function locationListGetButtonData( controller, index, mutables, self ) +local function locationListGetButtonData(controller, index, mutables, self) local location = Locations[index] - mutables.text:setText( Engine.Localize(location) ) + mutables.text:setText(Engine.Localize(location)) end -function LUI.createMenu.SelectLocationListZM( controller ) - local self = CoD.Menu.New( "SelectLocationListZM" ) +function LUI.createMenu.SelectLocationListZM(controller) + local self = CoD.Menu.New("SelectLocationListZM") self.controller = controller - self:setPreviousMenu( "SelectGameModeListZM" ) - self:registerEventHandler( "open_menu", CoD.Lobby.OpenMenu ) + self:setPreviousMenu("SelectGameModeListZM") + self:registerEventHandler("open_menu", CoD.Lobby.OpenMenu) self:addSelectButton() self:addBackButton() - self:addTitle( Engine.Localize("MPUI_MAPS_CAPS") ) + self:addTitle(Engine.Localize("MPUI_MAPS_CAPS")) - local listBox = CoD.ListBox.new( nil, controller, 15, CoD.CoD9Button.Height, 250, locationListCreateButtonMutables, locationListGetButtonData, 0, 0 ) - listBox:setLeftRight( true, false, 0, 250 ) - listBox:setTopBottom( true, false, 75, 75 + 530 ) - listBox:addScrollBar( 530 + (8 * 12), 2 ) - listBox:setTotalItems( #Locations ) - self:addElement( listBox ) + local listBox = CoD.ListBox.new(nil, controller, 15, CoD.CoD9Button.Height, 250, locationListCreateButtonMutables, locationListGetButtonData, 0, 0) + listBox:setLeftRight(true, false, 0, 250) + listBox:setTopBottom(true, false, 75, 75 + 530) + listBox:addScrollBar(530 + (8 * 12), 2) + listBox:setTotalItems(#Locations) + self:addElement(listBox) self.listBox = listBox - self:registerEventHandler( "listbox_focus_changed", locationListFocusChangedEventHandler ) - self:registerEventHandler( "listbox_clicked", locationListSelectionClickedEventHandler ) + self:registerEventHandler("listbox_focus_changed", locationListFocusChangedEventHandler) + self:registerEventHandler("listbox_clicked", locationListSelectionClickedEventHandler) return self -end \ No newline at end of file +end diff --git a/ui_mp/t6/hud.lua b/ui_mp/t6/hud.lua index e91f61f1..73086a61 100644 --- a/ui_mp/t6/hud.lua +++ b/ui_mp/t6/hud.lua @@ -68,10 +68,10 @@ if CoD.isWIIU then require("T6.WiiUSystemServices") end local HUD_OpenIngameMenu, HUD_SetupEventHandlers, HUD_KillcamUpdate, HUD_UpdateKillstreakHud, HUD_ForceKillKillstreakHud, HUD_SelectingLocationUpdate, HUD_GameEndedUpdate, HUD_ReloadShoutcasterHud, HUD_UpdateVehicleHud, HUD_FactionPopup, FactionPopupAddTextEvent, f0_local11, f0_local12 = nil -function HUD_IngameMenuClosed() -end -LUI.createMenu.HUD = function (LocalClientIndex) +function HUD_IngameMenuClosed() end + +LUI.createMenu.HUD = function(LocalClientIndex) local HUDWidget = CoD.Menu.NewFromState("HUD", { leftAnchor = true, rightAnchor = true, @@ -80,7 +80,7 @@ LUI.createMenu.HUD = function (LocalClientIndex) topAnchor = true, bottomAnchor = true, top = 0, - bottom = 0 + bottom = 0, }) if not LUI.roots.UIRootFull.safeAreaOverlay then LUI.roots.UIRootFull.safeAreaOverlay = CoD.SetupSafeAreaOverlay() @@ -116,7 +116,7 @@ function HUD_OcclusionChange(HUDWidget, ClientInstance) Engine.EnableWiiURemotePointer(ClientInstance.controller, not ClientInstance.occluded) end -HUD_SetupEventHandlers = function (HUDWidget) +HUD_SetupEventHandlers = function(HUDWidget) HUD_SetupEventHandlers_Common(HUDWidget) if CoD.isZombie == false then HUD_SetupEventHandlers_Multiplayer(HUDWidget) @@ -133,22 +133,22 @@ function HUD_Show(HUDWidget, ClientInstance) HUDWidget:setAlpha(1) end -local WiiToggleFriends = function (HUDWidget, ClientInstance) +local WiiToggleFriends = function(HUDWidget, ClientInstance) if LUI.roots["UIRoot" .. ClientInstance.controller].ingameFriendsList then LUI.roots[rootName]:processEvent({ name = "closeFriendsList", - controller = ClientInstance.controller + controller = ClientInstance.controller, }) LUI.roots[rootName]:processEvent({ name = "closeallpopups", - controller = ClientInstance.controller + controller = ClientInstance.controller, }) else HUDWidget:openPopup("FriendsList", ClientInstance.controller) end end -local PCInputSourceChanged = function (HUDWidget, ClientInstance) +local PCInputSourceChanged = function(HUDWidget, ClientInstance) if HUDWidget.scoreBoard then HUDWidget.scoreBoard:processEvent(ClientInstance) end @@ -224,7 +224,7 @@ end function HUD_FirstSnapshot(HUDWidget, ClientInstance) HUDWidget:dispatchEventToChildren({ name = "close_all_popups", - controller = ClientInstance.controller + controller = ClientInstance.controller, }) HUDWidget:removeAllChildren() HUDWidget:setOwner(ClientInstance.controller) @@ -266,7 +266,7 @@ function HUD_FirstSnapshot_Common(HUDWidget, ClientInstance) HUDWidget.scoreBoard = LUI.createMenu.Scoreboard(ClientInstance.controller) HUDWidget.scoreboardUpdateTimer = LUI.UITimer.new(1000, { name = "update_scoreboard", - controller = ClientInstance.controller + controller = ClientInstance.controller, }, false) HUDWidget:addElement(LUI.createMenu.DeadSpectate(ClientInstance.controller)) end @@ -294,7 +294,7 @@ function HUD_FirstSnapshot_Multiplayer(HUDWidget, ClientInstance) topAnchor = true, bottomAnchor = true, top = 0, - bottom = 0 + bottom = 0, }) else f18_local2 = CoD.ScorePopup.new({ @@ -305,7 +305,7 @@ function HUD_FirstSnapshot_Multiplayer(HUDWidget, ClientInstance) topAnchor = true, bottomAnchor = true, top = 0, - bottom = 0 + bottom = 0, }) end HUDWidget:addElement(f18_local2) @@ -325,7 +325,7 @@ function HUD_FirstSnapshot_Multiplayer(HUDWidget, ClientInstance) topAnchor = false, bottomAnchor = true, top = -249, - bottom = -149 + bottom = -149, }) end CoD.GameMessages.BoldGameMessagesWindow(HUDWidget, { @@ -336,7 +336,7 @@ function HUD_FirstSnapshot_Multiplayer(HUDWidget, ClientInstance) topAnchor = false, bottomAnchor = false, top = 50, - bottom = 70 + bottom = 70, }) if Engine.GameModeIsMode(CoD.GAMEMODE_LOCAL_SPLITSCREEN) == false then CoD.LiveStream.AddInGameStatusWidget(HUDWidget, ClientInstance.controller, { @@ -347,7 +347,7 @@ function HUD_FirstSnapshot_Multiplayer(HUDWidget, ClientInstance) topAnchor = true, bottomAnchor = false, top = 0, - bottom = 150 + bottom = 150, }) CoD.DemoHUD.AddHUDWidgets(HUDWidget, ClientInstance) end @@ -423,7 +423,7 @@ function HUD_FirstSnapshot_Zombie(HUDWidget, ClientInstance) bottomAnchor = true, bottom = 0, top = 0, - ui3DWindow = 0 + ui3DWindow = 0, })) end if not Engine.IsSplitscreen() then @@ -435,7 +435,7 @@ function HUD_FirstSnapshot_Zombie(HUDWidget, ClientInstance) topAnchor = false, bottomAnchor = true, top = -320, - bottom = -220 + bottom = -220, }) CoD.GameMessages.BoldGameMessagesWindow(HUDWidget, { leftAnchor = false, @@ -445,7 +445,7 @@ function HUD_FirstSnapshot_Zombie(HUDWidget, ClientInstance) topAnchor = true, bottomAnchor = false, top = 50, - bottom = 70 + bottom = 70, }) end if Engine.GameModeIsMode(CoD.GAMEMODE_LOCAL_SPLITSCREEN) == false then @@ -466,7 +466,7 @@ function HUD_ToggleZombieHudContainer(HUDWidget, ClientInstance) end end -HUD_OpenIngameMenu = function (HUDWidget, ClientInstance) +HUD_OpenIngameMenu = function(HUDWidget, ClientInstance) if HUDWidget.m_inputDisabled then return elseif ClientInstance.menuName == "class" and Engine.IsMigrating(ClientInstance.controller) == true then @@ -493,7 +493,7 @@ HUD_OpenIngameMenu = function (HUDWidget, ClientInstance) end if HUDWidget.SpectateHUD ~= nil then HUDWidget.SpectateHUD:processEvent({ - name = "spectate_ingame_menu_opened" + name = "spectate_ingame_menu_opened", }) end end @@ -507,7 +507,7 @@ function HUD_CloseInGameMenu(HUDWidget, ClientInstance) end if HUDWidget.SpectateHUD ~= nil then HUDWidget.SpectateHUD:processEvent({ - name = "spectate_ingame_menu_closed" + name = "spectate_ingame_menu_closed", }) end if CoD.isZombie == true then @@ -522,44 +522,44 @@ function HUD_OpenScoreBoard(HUDWidget, ClientInstance) HUDWidget:addElement(HUDWidget.scoreBoard) HUDWidget.scoreBoard:processEvent({ name = "update_scoreboard", - controller = ClientInstance.controller + controller = ClientInstance.controller, }) HUDWidget:addElement(HUDWidget.scoreboardUpdateTimer) if CoD.isZombie == true then if HUDWidget.scoreBoard.questItemDisplay then HUDWidget.scoreBoard.questItemDisplay:processEvent({ name = "update_quest_item_display_scoreboard", - controller = ClientInstance.controller + controller = ClientInstance.controller, }) end if HUDWidget.scoreBoard.persistentItemDisplay then HUDWidget.scoreBoard.persistentItemDisplay:processEvent({ name = "update_persistent_item_display_scoreboard", - controller = ClientInstance.controller + controller = ClientInstance.controller, }) end if HUDWidget.scoreBoard.craftableItemDisplay then HUDWidget.scoreBoard.craftableItemDisplay:processEvent({ name = "update_craftable_item_display_scoreboard", - controller = ClientInstance.controller + controller = ClientInstance.controller, }) end if HUDWidget.scoreBoard.captureZoneWheelDisplay then HUDWidget.scoreBoard.captureZoneWheelDisplay:processEvent({ name = "update_capture_zone_wheel_display_scoreboard", - controller = ClientInstance.controller + controller = ClientInstance.controller, }) end end if HUDWidget.SpectateHUD ~= nil then HUDWidget.SpectateHUD:processEvent({ - name = "spectate_scoreboard_opened" + name = "spectate_scoreboard_opened", }) if HUDWidget.SpectateHUD.m_selectedClientNum ~= nil then HUDWidget.scoreBoard:processEvent({ name = "focus_client", controller = ClientInstance.controller, - clientNum = HUDWidget.SpectateHUD.m_selectedClientNum + clientNum = HUDWidget.SpectateHUD.m_selectedClientNum, }) end end @@ -573,7 +573,7 @@ function HUD_CloseScoreBoard(HUDWidget, ClientInstance) HUDWidget.scoreboardUpdateTimer:reset() if HUDWidget.SpectateHUD ~= nil then HUDWidget.SpectateHUD:processEvent({ - name = "spectate_scoreboard_closed" + name = "spectate_scoreboard_closed", }) end end @@ -583,7 +583,7 @@ function HUD_DebugReload(HUDWidget, ClientInstance) if HUDWidget.m_eventHandlers.debug_reload ~= HUD_DebugReload then HUDWidget:registerEventHandler("debug_reload", HUD_DebugReload) HUDWidget:processEvent({ - name = "debug_reload" + name = "debug_reload", }) return else @@ -592,7 +592,7 @@ function HUD_DebugReload(HUDWidget, ClientInstance) HUDWidget.reaperHUD = nil HUD_SetupEventHandlers(HUDWidget) HUD_FirstSnapshot(HUDWidget, { - controller = HUDWidget.controller + controller = HUDWidget.controller, }) Engine.ForceHUDRefresh(HUDWidget.controller) end @@ -621,7 +621,7 @@ function HUD_StartKillcamHud(HUDWidget, ClientInstance) if f29_local0 then f29_local0:processEvent({ name = "killcam_open", - controller = ClientInstance.controller + controller = ClientInstance.controller, }) end end @@ -635,13 +635,13 @@ function HUD_StopKillcamHud(HUDWidget, ClientInstance) if f30_local0 then f30_local0:processEvent({ name = "killcam_close", - controller = ClientInstance.controller + controller = ClientInstance.controller, }) end end end -HUD_KillcamUpdate = function (HUDWidget, ClientInstance) +HUD_KillcamUpdate = function(HUDWidget, ClientInstance) if UIExpression.IsVisibilityBitSet(ClientInstance.controller, CoD.BIT_IN_KILLCAM) == 1 then if HUDWidget.killcamHUD then if HUDWidget.killcamHUD.isFinalKillcam ~= UIExpression.IsVisibilityBitSet(ClientInstance.controller, CoD.BIT_FINAL_KILLCAM) then @@ -657,7 +657,7 @@ HUD_KillcamUpdate = function (HUDWidget, ClientInstance) HUDWidget:dispatchEventToChildren(ClientInstance) end -local f0_local18 = function (f32_arg0) +local f0_local18 = function(f32_arg0) local f32_local0 if Engine.IsSplitscreen() ~= false or Engine.IsDemoShoutcaster() ~= true and (UIExpression.IsVisibilityBitSet(f32_arg0, CoD.BIT_SPECTATING_CLIENT) ~= 1 or UIExpression.IsVisibilityBitSet(f32_arg0, CoD.BIT_TEAM_SPECTATOR) ~= 1 or UIExpression.IsVisibilityBitSet(f32_arg0, CoD.BIT_GAME_ENDED) ~= 0 or UIExpression.IsVisibilityBitSet(f32_arg0, CoD.BIT_UI_ACTIVE) ~= 0) then f32_local0 = false @@ -667,7 +667,7 @@ local f0_local18 = function (f32_arg0) return f32_local0 end -HUD_GameEndedUpdate = function (HUDWidget, ClientInstance) +HUD_GameEndedUpdate = function(HUDWidget, ClientInstance) if f0_local18(ClientInstance.controller) then if HUDWidget.SpectateHUD == nil then local f33_local0 = CoD.SpectateHUD.new(ClientInstance) @@ -683,7 +683,7 @@ HUD_GameEndedUpdate = function (HUDWidget, ClientInstance) HUDWidget:dispatchEventToChildren(ClientInstance) end -HUD_ReloadShoutcasterHud = function (HUDWidget, ClientInstance) +HUD_ReloadShoutcasterHud = function(HUDWidget, ClientInstance) if HUDWidget.SpectateHUD ~= nil then HUDWidget.SpectateHUD:close() HUDWidget.SpectateHUD = nil @@ -691,7 +691,7 @@ HUD_ReloadShoutcasterHud = function (HUDWidget, ClientInstance) HUD_GameEndedUpdate(HUDWidget, ClientInstance) end -local f0_local19 = function (f35_arg0) +local f0_local19 = function(f35_arg0) local f35_local0 if UIExpression.IsVisibilityBitSet(f35_arg0, CoD.BIT_SELECTING_LOCATION) ~= 1 or UIExpression.IsVisibilityBitSet(f35_arg0, CoD.BIT_SPECTATING_CLIENT) ~= 0 or UIExpression.IsVisibilityBitSet(f35_arg0, CoD.BIT_IS_DEMO_PLAYING) ~= 0 or UIExpression.IsVisibilityBitSet(f35_arg0, CoD.BIT_SCOREBOARD_OPEN) ~= 0 then f35_local0 = false @@ -701,7 +701,7 @@ local f0_local19 = function (f35_arg0) return f35_local0 end -HUD_SelectingLocationUpdate = function (HUDWidget, ClientInstance) +HUD_SelectingLocationUpdate = function(HUDWidget, ClientInstance) if f0_local19(ClientInstance.controller) then if HUDWidget.locationSelectorMap == nil then if HUDWidget.selectorContainer == nil then @@ -718,7 +718,7 @@ HUD_SelectingLocationUpdate = function (HUDWidget, ClientInstance) topAnchor = false, bottomAnchor = false, top = -275, - bottom = 275 + bottom = 275, }, CoD.COMPASS_TYPE_FULL) HUDWidget.selectorContainer:addElement(HUDWidget.locationSelectorMap) Engine.BlurWorld(ClientInstance.controller, 2) @@ -733,13 +733,12 @@ HUD_SelectingLocationUpdate = function (HUDWidget, ClientInstance) HUDWidget:dispatchEventToChildren(ClientInstance) end -HUD_UpdateKillstreakHud = function (HUDWidget, ClientInstance) +HUD_UpdateKillstreakHud = function(HUDWidget, ClientInstance) if ClientInstance.chopperGunner == true then if HUDWidget.chopperGunnerHUD == nil then local predatorHUD = CoD.ChopperGunnerHUD.new(ClientInstance.controller) HUDWidget:addElement(predatorHUD) HUDWidget.chopperGunnerHUD = predatorHUD - end else HUDWidget.chopperGunnerHUD = nil @@ -749,7 +748,6 @@ HUD_UpdateKillstreakHud = function (HUDWidget, ClientInstance) local predatorHUD = CoD.ReaperHUD.new(ClientInstance.controller) HUDWidget:addElement(predatorHUD) HUDWidget.reaperHUD = predatorHUD - end else HUDWidget.reaperHUD = nil @@ -759,7 +757,6 @@ HUD_UpdateKillstreakHud = function (HUDWidget, ClientInstance) local predatorHUD = CoD.PredatorHUD.new(ClientInstance.controller) HUDWidget:addElement(predatorHUD) HUDWidget.predatorHUD = predatorHUD - end else HUDWidget.predatorHUD = nil @@ -767,11 +764,11 @@ HUD_UpdateKillstreakHud = function (HUDWidget, ClientInstance) HUDWidget:dispatchEventToChildren(ClientInstance) end -HUD_ForceKillKillstreakHud = function (HUDWidget, ClientInstance) +HUD_ForceKillKillstreakHud = function(HUDWidget, ClientInstance) Engine.DisableSceneFilter(HUDWidget:getOwner(), 4) end -HUD_UpdateVehicleHud = function (HUDWidget, ClientInstance) +HUD_UpdateVehicleHud = function(HUDWidget, ClientInstance) if HUDWidget.vehicleHUD then if HUDWidget.vehicleHUD.vehicleType == ClientInstance.vehicleType then return @@ -792,7 +789,7 @@ HUD_UpdateVehicleHud = function (HUDWidget, ClientInstance) end end -HUD_FactionPopup = function (HUDWidget, ClientInstance) +HUD_FactionPopup = function(HUDWidget, ClientInstance) local f40_local0 = UIExpression.Team(ClientInstance.controller, "name") local f40_local1, f40_local2, f40_local3, f40_local4, f40_local5 = nil if f40_local0 == "TEAM_ALLIES" then @@ -820,7 +817,7 @@ HUD_FactionPopup = function (HUDWidget, ClientInstance) topAnchor = true, bottomAnchor = true, top = 0, - bottom = 0 + bottom = 0, }) HUDWidget.safeArea:addElement(Widget) @@ -841,7 +838,7 @@ HUD_FactionPopup = function (HUDWidget, ClientInstance) topAnchor = true, bottomAnchor = false, top = f40_local6, - bottom = f40_local6 + f40_local10 + bottom = f40_local6 + f40_local10, }) Widget.text.label:setRGB(CoD.offWhite.r, CoD.offWhite.g, CoD.offWhite.b) Widget.image = LUI.UIImage.new({ @@ -853,7 +850,7 @@ HUD_FactionPopup = function (HUDWidget, ClientInstance) bottomAnchor = false, top = f40_local7, bottom = f40_local7 + f40_local6, - material = f40_local1 + material = f40_local1, }) Widget:addElement(Widget.image) local f40_local11 = f40_local6 + f40_local10 @@ -866,7 +863,7 @@ HUD_FactionPopup = function (HUDWidget, ClientInstance) topAnchor = true, bottomAnchor = false, top = 0, - bottom = f40_local6 + bottom = f40_local6, }) Widget:addElement(Widget.imageGlow) Widget:registerEventHandler("add_text", FactionPopupAddTextEvent) @@ -876,17 +873,17 @@ HUD_FactionPopup = function (HUDWidget, ClientInstance) Widget:addElement(LUI.UITimer.new(2000, "out", true)) end -FactionPopupAddTextEvent = function (HUDWidget, ClientInstance) +FactionPopupAddTextEvent = function(HUDWidget, ClientInstance) HUDWidget:addElement(HUDWidget.text) end -f0_local11 = function (HUDWidget, ClientInstance) +f0_local11 = function(HUDWidget, ClientInstance) HUDWidget.text:out() HUDWidget:addElement(LUI.UITimer.new(CoD.AdditiveTextOverlay.PulseOutTime, "out2", true)) HUDWidget:addElement(LUI.UITimer.new(CoD.AdditiveTextOverlay.PulseOutTime * 2, "close", true)) end -f0_local12 = function (HUDWidget, ClientInstance) +f0_local12 = function(HUDWidget, ClientInstance) HUDWidget.imageGlow:out() HUDWidget.image:close() HUDWidget.darkSplash:close() @@ -909,10 +906,10 @@ function HUD_Handle_ChooseClass_HotKey(HUDWidget, ClientInstance) if UIExpression.Team(ClientInstance.controller, "name") ~= "TEAM_SPECTATOR" and CoD.IsWagerMode() == false and not (Engine.GetGametypeSetting("disableClassSelection") == 1) then HUD_OpenIngameMenu(HUDWidget, { menuName = "changeclass", - controller = ClientInstance.controller + controller = ClientInstance.controller, }) end end DisableGlobals() -Engine.StopEditingPresetClass() \ No newline at end of file +Engine.StopEditingPresetClass() diff --git a/ui_mp/t6/hud/ammocounter.lua b/ui_mp/t6/hud/ammocounter.lua index 4261e813..942ed5e3 100644 --- a/ui_mp/t6/hud/ammocounter.lua +++ b/ui_mp/t6/hud/ammocounter.lua @@ -2,13 +2,13 @@ CoD.AmmoCounter = {} CoD.AmmoCounter.TextHeight = 28 CoD.AmmoCounter.LowAmmoFadeTime = 500 CoD.AmmoCounter.PulseDuration = 500 -CoD.AmmoCounter.new = function (f1_arg0) +CoD.AmmoCounter.new = function(f1_arg0) local Widget = LUI.UIElement.new(f1_arg0) Widget:registerAnimationState("hide", { - alphaMultiplier = 0 + alphaMultiplier = 0, }) Widget:registerAnimationState("show", { - alphaMultiplier = 1 + alphaMultiplier = 1, }) Widget:animateToState("hide") local f1_local1 = 36 @@ -20,7 +20,7 @@ CoD.AmmoCounter.new = function (f1_arg0) leftAnchor = true, topAnchor = true, rightAnchor = false, - bottomAnchor = false + bottomAnchor = false, }) Widget:addElement(Widget_1) local f1_local3 = CoD.AmmoCounter.TextHeight @@ -33,14 +33,14 @@ CoD.AmmoCounter.new = function (f1_arg0) topAnchor = true, rightAnchor = true, bottomAnchor = true, - alpha = 1 + alpha = 1, }) Widget.ammoLabel:setFont(CoD.fonts.Big) Widget.ammoLabel:registerAnimationState("pulse_low", { - alpha = 1 + alpha = 1, }) Widget.ammoLabel:registerAnimationState("pulse_high", { - alpha = 0.5 + alpha = 0.5, }) Widget.ammoLabel:registerEventHandler("transition_complete_pulse_high", CoD.AmmoCounter.Ammo_PulseHigh) Widget.ammoLabel:registerEventHandler("transition_complete_pulse_low", CoD.AmmoCounter.Ammo_PulseLow) @@ -51,7 +51,7 @@ CoD.AmmoCounter.new = function (f1_arg0) return Widget end -CoD.AmmoCounter.UpdateAmmo = function (f2_arg0, f2_arg1) +CoD.AmmoCounter.UpdateAmmo = function(f2_arg0, f2_arg1) if f2_arg1.ammoInClip == 0 and f2_arg1.ammoStock == 0 and f2_arg1.lowClip ~= true then return end @@ -74,7 +74,7 @@ CoD.AmmoCounter.UpdateAmmo = function (f2_arg0, f2_arg1) end end -CoD.AmmoCounter.ShouldHideAmmoCounter = function (f3_arg0, f3_arg1) +CoD.AmmoCounter.ShouldHideAmmoCounter = function(f3_arg0, f3_arg1) if f3_arg0.weapon ~= nil then if Engine.IsWeaponType(f3_arg0.weapon, "melee") then return true @@ -87,7 +87,7 @@ CoD.AmmoCounter.ShouldHideAmmoCounter = function (f3_arg0, f3_arg1) return false end -CoD.AmmoCounter.UpdateVisibility = function (f4_arg0, f4_arg1) +CoD.AmmoCounter.UpdateVisibility = function(f4_arg0, f4_arg1) local f4_local0 = f4_arg1.controller if f4_arg1.weapon ~= nil then f4_arg0.weapon = f4_arg1.weapon @@ -104,14 +104,14 @@ CoD.AmmoCounter.UpdateVisibility = function (f4_arg0, f4_arg1) end end -CoD.AmmoCounter.Ammo_PulseHigh = function (f5_arg0, f5_arg1) +CoD.AmmoCounter.Ammo_PulseHigh = function(f5_arg0, f5_arg1) if f5_arg1.interrupted ~= true then f5_arg0:animateToState("pulse_low", CoD.AmmoCounter.LowAmmoFadeTime, true, false) end end -CoD.AmmoCounter.Ammo_PulseLow = function (f6_arg0, f6_arg1) +CoD.AmmoCounter.Ammo_PulseLow = function(f6_arg0, f6_arg1) if f6_arg1.interrupted ~= true then f6_arg0:animateToState("pulse_high", CoD.AmmoCounter.LowAmmoFadeTime, false, true) end -end \ No newline at end of file +end diff --git a/ui_mp/t6/hud/offhandicons.lua b/ui_mp/t6/hud/offhandicons.lua index 11cf5220..8179b26e 100644 --- a/ui_mp/t6/hud/offhandicons.lua +++ b/ui_mp/t6/hud/offhandicons.lua @@ -3,7 +3,7 @@ CoD.OffhandIcons.Size = 24 CoD.OffhandIcons.Spacing = 1 CoD.OffhandIcons.AlphaMultiplier = 0.75 CoD.OffhandIcons.Width = CoD.OffhandIcons.Size * 1.5 -CoD.OffhandIcons.new = function (HudRef, InstanceRef) +CoD.OffhandIcons.new = function(HudRef, InstanceRef) local Widget = LUI.UIElement.new(InstanceRef) Widget.type = HudRef Widget.setMaterialAndQuantity = CoD.OffhandIcons.SetMaterialAndQuantity @@ -11,7 +11,7 @@ CoD.OffhandIcons.new = function (HudRef, InstanceRef) return Widget end -CoD.OffhandIcons.SetMaterialAndQuantity = function (f2_arg0, f2_arg1, f2_arg2) +CoD.OffhandIcons.SetMaterialAndQuantity = function(f2_arg0, f2_arg1, f2_arg2) local f2_local0 = nil if f2_arg0.icons == nil then f2_local0 = {} @@ -50,7 +50,7 @@ CoD.OffhandIcons.SetMaterialAndQuantity = function (f2_arg0, f2_arg1, f2_arg2) end end -CoD.OffhandIcons.UpdateOffhand = function (f3_arg0, f3_arg1) +CoD.OffhandIcons.UpdateOffhand = function(f3_arg0, f3_arg1) local f3_local0 = f3_arg1[f3_arg0.type] if f3_local0 == nil then if not f3_arg0.iconOutline then @@ -61,7 +61,7 @@ CoD.OffhandIcons.UpdateOffhand = function (f3_arg0, f3_arg1) end end -CoD.OffhandIcons.UpdateTomahawkInUse = function (f4_arg0, f4_arg1) +CoD.OffhandIcons.UpdateTomahawkInUse = function(f4_arg0, f4_arg1) local f4_local0 = f4_arg1.newValue if f4_local0 == 0 then if f4_arg0.iconOutline then @@ -93,7 +93,7 @@ CoD.OffhandIcons.UpdateTomahawkInUse = function (f4_arg0, f4_arg1) end end -CoD.OffhandIcons.UpgradeTomahawkIcon = function (f5_arg0, f5_arg1) +CoD.OffhandIcons.UpgradeTomahawkIcon = function(f5_arg0, f5_arg1) if f5_arg1.newValue == 0 then f5_arg0.iconOutlineImage = CoD.AmmoAreaZombie.TomahawkOutline else @@ -104,12 +104,12 @@ CoD.OffhandIcons.UpgradeTomahawkIcon = function (f5_arg0, f5_arg1) end end -CoD.OffhandIcons.PulseBright = function (f6_arg0, f6_arg1) +CoD.OffhandIcons.PulseBright = function(f6_arg0, f6_arg1) f6_arg0:beginAnimation("pulse_low", f6_arg1) f6_arg0:setAlpha(1) end -CoD.OffhandIcons.PulseLow = function (f7_arg0, f7_arg1) +CoD.OffhandIcons.PulseLow = function(f7_arg0, f7_arg1) f7_arg0:beginAnimation("pulse_high", f7_arg1) f7_arg0:setAlpha(0.1) -end \ No newline at end of file +end diff --git a/ui_mp/t6/hud/scoreboard.lua b/ui_mp/t6/hud/scoreboard.lua index f1255812..6a26b59d 100644 --- a/ui_mp/t6/hud/scoreboard.lua +++ b/ui_mp/t6/hud/scoreboard.lua @@ -23,7 +23,7 @@ local f0_local14 = 0 local SCOREBOARD_PING_BARS = {} local f0_local16 = 232 local SCOREBOARD_ROW_SELECTED = { - name = "row_selected" + name = "row_selected", } local ScoreboardWidgetRowSelectorFunc = nil local f0_local24 = 27 @@ -45,15 +45,15 @@ local IsDLCMap2, IsDLCMap4, IsClassic = nil, nil, nil CoD.ScoreboardRow = InheritFrom(LUI.UIElement) -local ScoreboardWidgetSetOwnerFunc = function (ScoreboardWidget, LocalClientIndex) +local ScoreboardWidgetSetOwnerFunc = function(ScoreboardWidget, LocalClientIndex) ScoreboardWidget.m_ownerController = LocalClientIndex end -local ScoreboardWidgetGetOwnerFunc = function (ScoreboardWidget) +local ScoreboardWidgetGetOwnerFunc = function(ScoreboardWidget) return ScoreboardWidget.m_ownerController end -local ZombiesCleansedScoreboardCheck = function (ScoreboardColumnName) +local ZombiesCleansedScoreboardCheck = function(ScoreboardColumnName) if Dvar.ui_gametype:get() == CoD.Zombie.GAMETYPE_ZCLEANSED and ScoreboardColumnName == "MPUI_DOWNS" then return "MPUI_RETURNS" else @@ -61,7 +61,7 @@ local ZombiesCleansedScoreboardCheck = function (ScoreboardColumnName) end end -local CreateScoreboardHeaderTitle = function (ScoreboardWidget) +local CreateScoreboardHeaderTitle = function(ScoreboardWidget) local HeaderTitle = nil if ScoreboardWidget.mode == "theater" then HeaderTitle = Engine.Localize("MENU_THEATER_PARTY") @@ -166,7 +166,7 @@ function CreateScoreBoardBody(ScoreboardWidget, LocalClientIndex, UnusedArg1) topAnchor = true, bottomAnchor = false, top = 0, - bottom = 0 + bottom = 0, }, 1.35) ScoreboardWidget:addElement(ScoreboardWidget.scoreboardContainer) if not UnusedArg1 then @@ -278,7 +278,7 @@ function CreateScoreBoardBody(ScoreboardWidget, LocalClientIndex, UnusedArg1) ScoreboardWidgetUpdateFunc(ScoreboardWidget) end -local ClientInputSourceChangedCallback = function (ScoreboardWidget, ClientInstance) +local ClientInputSourceChangedCallback = function(ScoreboardWidget, ClientInstance) if ScoreboardWidget.spectatePlayerButtonPrompt then ScoreboardWidget.spectatePlayerButtonPrompt:processEvent(ClientInstance) end @@ -288,8 +288,8 @@ local ClientInputSourceChangedCallback = function (ScoreboardWidget, ClientInsta ScoreboardWidget:dispatchEventToChildren(ClientInstance) end -LUI.createMenu.Scoreboard = function (LocalClientIndex) - local BodyVerticalOffset = f0_local41; +LUI.createMenu.Scoreboard = function(LocalClientIndex) + local BodyVerticalOffset = f0_local41 if CoD.isZombie == true then IsDLCMap2 = CoD.Zombie.IsDLCMap(CoD.Zombie.DLC2Maps) IsDLCMap4 = CoD.Zombie.IsDLCMap(CoD.Zombie.DLC4Maps) @@ -332,14 +332,14 @@ LUI.createMenu.Scoreboard = function (LocalClientIndex) return ScoreboardWidget end -ScoreboardWidgetCloseFunc = function (ScoreboardWidget, UnusedArg1) +ScoreboardWidgetCloseFunc = function(ScoreboardWidget, UnusedArg1) ScoreboardWidget.focusableRowIndex = nil ScoreboardWidget.selectedClientNum = nil ScoreboardWidget.selectedScoreboardIndex = nil CoD.Menu.close(ScoreboardWidget) end -ScoreboardWidgetCreateTeamElement = function (UnusedArg1) +ScoreboardWidgetCreateTeamElement = function(UnusedArg1) local ScoreboardFactionWidget = LUI.UIElement.new() ScoreboardFactionWidget:setLeftRight(true, true, 0, 0) ScoreboardFactionWidget:setUseStencil(true) @@ -358,7 +358,7 @@ ScoreboardWidgetCreateTeamElement = function (UnusedArg1) ScoreboardFactionWidget.highlightGlow:setAlpha(0.4) ScoreboardFactionWidget:addElement(ScoreboardFactionWidget.highlightGlow) local f9_local1 = 116 - local f9_local2 = ((f0_local30) + f0_local24 - 2) / 2 - f9_local1 / 2 + local f9_local2 = (f0_local30 + f0_local24 - 2) / 2 - f9_local1 / 2 ScoreboardFactionWidget.factionIcon = LUI.UIImage.new() ScoreboardFactionWidget.factionIcon:setLeftRight(true, false, f9_local2, f9_local2 + f9_local1) ScoreboardFactionWidget.factionIcon:setTopBottom(false, false, -f9_local1 / 2, f9_local1 / 2) @@ -393,7 +393,7 @@ ScoreboardWidgetCreateTeamElement = function (UnusedArg1) return ScoreboardFactionWidget end -ScoreboardWidgetRowSelectorFunc = function (ScoreboardWidget, ScoreboardRowSelected) +ScoreboardWidgetRowSelectorFunc = function(ScoreboardWidget, ScoreboardRowSelected) if ScoreboardWidget.frontEndOnly then return end @@ -412,7 +412,7 @@ ScoreboardWidgetRowSelectorFunc = function (ScoreboardWidget, ScoreboardRowSelec end end -ScoreboardWidgetShowGamercardFunc = function (ScoreboardWidget, ClientInstance) +ScoreboardWidgetShowGamercardFunc = function(ScoreboardWidget, ClientInstance) if ScoreboardWidget.frontEndOnly then return elseif ScoreboardWidget.selectedClientNum then @@ -427,7 +427,7 @@ ScoreboardWidgetShowGamercardFunc = function (ScoreboardWidget, ClientInstance) end end -ScoreboardWidgetToggleMuteFunc = function (ScoreboardWidget, UnusedArg1) +ScoreboardWidgetToggleMuteFunc = function(ScoreboardWidget, UnusedArg1) if ScoreboardWidget.frontEndOnly then return elseif ScoreboardWidget.selectedClientNum then @@ -469,7 +469,7 @@ function FullscreenStop(ScoreboardWidget, ClientInstance) ScoreboardWidget:dispatchEventToChildren(ClientInstance) end -f0_local38 = function (ScoreboardWidget, ClientNum) +f0_local38 = function(ScoreboardWidget, ClientNum) if ScoreboardWidget.frontEndOnly then return elseif UIExpression.IsDemoPlaying(ScoreboardWidget.m_ownerController) == 1 then @@ -744,7 +744,7 @@ function UpdateTheaterScoreboard(ScoreboardWidget) end end -ScoreboardWidgetUpdateFunc = function (ScoreboardWidget) +ScoreboardWidgetUpdateFunc = function(ScoreboardWidget) if ScoreboardWidget.mode == "theater" and not ScoreboardWidget.frontEndOnly then UpdateTheaterScoreboard(ScoreboardWidget) else @@ -752,7 +752,7 @@ ScoreboardWidgetUpdateFunc = function (ScoreboardWidget) end end -ScoreboardUpdateTeamElement = function (TeamElement, FactionTeam, FactionColorR, FactionColorG, FactionColorB, ScoreboardTeam, MinRowsPerTeam, f21_arg7) +ScoreboardUpdateTeamElement = function(TeamElement, FactionTeam, FactionColorR, FactionColorG, FactionColorB, ScoreboardTeam, MinRowsPerTeam, f21_arg7) local VerticalOffset = MinRowsPerTeam * f0_local29 + (MinRowsPerTeam + 1) * f0_local31 TeamElement:setTopBottom(true, false, f21_arg7, f21_arg7 + VerticalOffset) TeamElement:setAlpha(1) @@ -846,7 +846,7 @@ ScoreboardUpdateTeamElement = function (TeamElement, FactionTeam, FactionColorR, TeamElement.factionName:setRGB(FactionColorR, FactionColorG, FactionColorB) end -CoD.ScoreboardRow.GetRowTextColor = function (ScoreboardRowIndex) +CoD.ScoreboardRow.GetRowTextColor = function(ScoreboardRowIndex) if CoD.isZombie == true then local ZombiesColorIndex = (ScoreboardRowIndex - 1) % 4 + 1 return CoD.Zombie.PlayerColors[ZombiesColorIndex].r, CoD.Zombie.PlayerColors[ZombiesColorIndex].g, CoD.Zombie.PlayerColors[ZombiesColorIndex].b @@ -855,7 +855,7 @@ CoD.ScoreboardRow.GetRowTextColor = function (ScoreboardRowIndex) end end -CoD.ScoreboardRow.new = function (LocalClientIndex, ScoreboardRowIndex) +CoD.ScoreboardRow.new = function(LocalClientIndex, ScoreboardRowIndex) local RowTextColorR, RowTextColorG, RowTextColorB = CoD.ScoreboardRow.GetRowTextColor(ScoreboardRowIndex) local ScoreboardRowWidget = LUI.UIElement.new() ScoreboardRowWidget:setClass(CoD.ScoreboardRow) @@ -949,7 +949,7 @@ CoD.ScoreboardRow.new = function (LocalClientIndex, ScoreboardRowIndex) return ScoreboardRowWidget end -CoD.ScoreboardRow.setClient = function (ScoreboardRow, FactionColorR, FactionColorG, FactionColorB, VerticalOffset, ScoreboardMode, ClientNum, FocusableRowIndex, PlayerIndex, ScoreboardTeam, ScoreboardFrontEndOnly) +CoD.ScoreboardRow.setClient = function(ScoreboardRow, FactionColorR, FactionColorG, FactionColorB, VerticalOffset, ScoreboardMode, ClientNum, FocusableRowIndex, PlayerIndex, ScoreboardTeam, ScoreboardFrontEndOnly) local IsTheaterMode = ScoreboardMode == "theater" local PlayerRank, PlayerRankIcon, PlayerPrestige, PlayerGamerTag, PlayerScoreboardIndex, PlayerScoreboardClientNum = nil, nil, nil, nil, nil, nil local MaxColumns = SCOREBOARD_DEFAULT_MAX_COLUMNS @@ -1119,7 +1119,7 @@ CoD.ScoreboardRow.setClient = function (ScoreboardRow, FactionColorR, FactionCol return VerticalOffset end -CoD.ScoreboardRow.gainFocus = function (Button, EventGainFocus) +CoD.ScoreboardRow.gainFocus = function(Button, EventGainFocus) CoD.ScoreboardRow.super.gainFocus(Button, EventGainFocus) Button.border:setAlpha(1) Button:dispatchEventToChildren(EventGainFocus) @@ -1127,13 +1127,13 @@ CoD.ScoreboardRow.gainFocus = function (Button, EventGainFocus) Button:dispatchEventToParent(SCOREBOARD_ROW_SELECTED) end -CoD.ScoreboardRow.loseFocus = function (Button, EventLoseFocus) +CoD.ScoreboardRow.loseFocus = function(Button, EventLoseFocus) CoD.ScoreboardRow.super.loseFocus(Button, EventLoseFocus) Button.border:setAlpha(0) Button:dispatchEventToChildren(EventLoseFocus) end -CoD.ScoreboardRow.focusClient = function (ScoreboardWidget, EventFocusClient) +CoD.ScoreboardRow.focusClient = function(ScoreboardWidget, EventFocusClient) if ScoreboardWidget.clientNum == EventFocusClient.clientNum then ScoreboardWidget:processEvent(LUI.UIButton.GainFocusEvent) elseif ScoreboardWidget:isInFocus() then @@ -1147,7 +1147,9 @@ CoD.ScoreboardRow:registerEventHandler("focus_client", CoD.ScoreboardRow.focusCl function Split(Source, Delimiters) local Elements = {} - local Pattern = '([^'..Delimiters..']+)' - string.gsub(Source, Pattern, function(value) Elements[#Elements + 1] = value; end); + local Pattern = "([^" .. Delimiters .. "]+)" + string.gsub(Source, Pattern, function(value) + Elements[#Elements + 1] = value + end) return Elements -end \ No newline at end of file +end diff --git a/ui_mp/t6/hud/weaponlabel.lua b/ui_mp/t6/hud/weaponlabel.lua index e06c7942..0c4c6d35 100644 --- a/ui_mp/t6/hud/weaponlabel.lua +++ b/ui_mp/t6/hud/weaponlabel.lua @@ -2,7 +2,7 @@ CoD.WeaponLabel = {} CoD.WeaponLabel.TextHeight = 32 CoD.WeaponLabel.FadeTime = 2000 CoD.WeaponLabel.WeaponFontName = "Default" -CoD.WeaponLabel.new = function (f1_arg0) +CoD.WeaponLabel.new = function(f1_arg0) local Widget = LUI.UIElement.new(f1_arg0) local f1_local1 = CoD.textSize[CoD.WeaponLabel.WeaponFontName] local f1_local2 = CoD.fonts[CoD.WeaponLabel.WeaponFontName] @@ -15,19 +15,19 @@ CoD.WeaponLabel.new = function (f1_arg0) topAnchor = false, rightAnchor = true, bottomAnchor = false, - alphaMultiplier = 1 + alphaMultiplier = 1, }) Widget.weaponLabel:setFont(f1_local2) Widget.weaponLabel:registerAnimationState("fade_out", { - alphaMultiplier = 0 + alphaMultiplier = 0, }) Widget:addElement(Widget.weaponLabel) Widget:registerEventHandler("hud_update_weapon_select", CoD.WeaponLabel.UpdateWeapon) return Widget end -CoD.WeaponLabel.UpdateWeapon = function (f2_arg0, f2_arg1) +CoD.WeaponLabel.UpdateWeapon = function(f2_arg0, f2_arg1) f2_arg0.weaponLabel:animateToState("default") f2_arg0.weaponLabel:setText(UIExpression.ToUpper(nil, Engine.Localize(f2_arg1.weaponDisplayName))) -- f2_arg0.weaponLabel:animateToState("fade_out", CoD.WeaponLabel.FadeTime) -end \ No newline at end of file +end diff --git a/ui_mp/t6/menus/privategamelobby_project.lua b/ui_mp/t6/menus/privategamelobby_project.lua index d10c5fa0..de0d5f10 100644 --- a/ui_mp/t6/menus/privategamelobby_project.lua +++ b/ui_mp/t6/menus/privategamelobby_project.lua @@ -15,7 +15,7 @@ CoD.PrivateGameLobby.Dvars[1].values[2] = 1 CoD.PrivateGameLobby.Dvars[1].gameTypes = {} CoD.PrivateGameLobby.Dvars[1].gameTypes[1] = "zgrief" -CoD.PrivateGameLobby.ButtonPrompt_TeamPrev = function (f1_arg0, ClientInstance) +CoD.PrivateGameLobby.ButtonPrompt_TeamPrev = function(f1_arg0, ClientInstance) if Engine.PartyHostIsReadyToStart() == true then return else @@ -24,7 +24,7 @@ CoD.PrivateGameLobby.ButtonPrompt_TeamPrev = function (f1_arg0, ClientInstance) end end -CoD.PrivateGameLobby.ButtonPrompt_TeamNext = function (f2_arg0, ClientInstance) +CoD.PrivateGameLobby.ButtonPrompt_TeamNext = function(f2_arg0, ClientInstance) if Engine.PartyHostIsReadyToStart() == true then return else @@ -33,7 +33,7 @@ CoD.PrivateGameLobby.ButtonPrompt_TeamNext = function (f2_arg0, ClientInstance) end end -CoD.PrivateGameLobby.ShouldEnableTeamCycling = function (PrivateGameLobbyWidget) +CoD.PrivateGameLobby.ShouldEnableTeamCycling = function(PrivateGameLobbyWidget) if PrivateGameLobbyWidget.panelManager == nil then return false elseif not PrivateGameLobbyWidget.panelManager:isPanelOnscreen("lobbyPane") then @@ -49,7 +49,7 @@ CoD.PrivateGameLobby.ShouldEnableTeamCycling = function (PrivateGameLobbyWidget) end end -CoD.PrivateGameLobby.SetupTeamCycling = function (PrivateGameLobbyWidget) +CoD.PrivateGameLobby.SetupTeamCycling = function(PrivateGameLobbyWidget) if CoD.PrivateGameLobby.ShouldEnableTeamCycling(PrivateGameLobbyWidget) then PrivateGameLobbyWidget.cycleTeamButtonPrompt:enable() else @@ -57,22 +57,22 @@ CoD.PrivateGameLobby.SetupTeamCycling = function (PrivateGameLobbyWidget) end end -CoD.PrivateGameLobby.CurrentPanelChanged = function (PrivateGameLobbyWidget, f5_arg1) +CoD.PrivateGameLobby.CurrentPanelChanged = function(PrivateGameLobbyWidget, f5_arg1) CoD.Lobby.CurrentPanelChanged(PrivateGameLobbyWidget, f5_arg1) CoD.PrivateGameLobby.SetupTeamCycling(PrivateGameLobbyWidget) end -CoD.PrivateGameLobby.ButtonPrompt_PartyUpdateStatus = function (PrivateGameLobbyWidget, f6_arg1) +CoD.PrivateGameLobby.ButtonPrompt_PartyUpdateStatus = function(PrivateGameLobbyWidget, f6_arg1) CoD.GameLobby.UpdateStatusText(PrivateGameLobbyWidget, f6_arg1) CoD.PrivateGameLobby.SetupTeamCycling(PrivateGameLobbyWidget) PrivateGameLobbyWidget:dispatchEventToChildren(f6_arg1) end -CoD.PrivateGameLobby.DoesGametypeSupportBots = function (Gametype) +CoD.PrivateGameLobby.DoesGametypeSupportBots = function(Gametype) return true end -CoD.PrivateGameLobby.BotButton_Update = function (BotsButton) +CoD.PrivateGameLobby.BotButton_Update = function(BotsButton) local Gametype = UIExpression.DvarString(nil, "ui_gameType") local EnemyBots = UIExpression.DvarInt(nil, "bot_enemies") BotsButton.starImage:setAlpha(0) @@ -94,7 +94,7 @@ CoD.PrivateGameLobby.BotButton_Update = function (BotsButton) end end -CoD.PrivateGameLobby.PopulateButtons_Project_Multiplayer = function (PrivateGameLobbyButtonPane, IsHost) +CoD.PrivateGameLobby.PopulateButtons_Project_Multiplayer = function(PrivateGameLobbyButtonPane, IsHost) if IsHost == true then local SetupGameText = Engine.Localize("MPUI_SETUP_GAME_CAPS") local f9_local1_1, f9_local1_2, f9_local1_3, f9_local1_4 = GetTextDimensions(SetupGameText, CoD.CoD9Button.Font, CoD.CoD9Button.TextHeight) @@ -169,7 +169,7 @@ CoD.PrivateGameLobby.PopulateButtons_Project_Multiplayer = function (PrivateGame top = -CoD.textSize.Condensed / 2, bottom = CoD.textSize.Condensed / 2, font = CoD.fonts.Condensed, - alignment = LUI.Alignment.Left + alignment = LUI.Alignment.Left, }) ToggleDemoRecording:addElement(recImage) ToggleDemoRecording.recImage = recImage @@ -184,7 +184,7 @@ CoD.PrivateGameLobby.PopulateButtons_Project_Multiplayer = function (PrivateGame end end -CoD.PrivateGameLobby.UpdateDemoRecordingButton = function (ToggleDemoRecording) +CoD.PrivateGameLobby.UpdateDemoRecordingButton = function(ToggleDemoRecording) if Dvar.demo_recordPrivateMatch:get() then ToggleDemoRecording.recImage:setRGB(1, 0, 0) ToggleDemoRecording.recText:setText(Engine.Localize("MENU_ON_CAPS")) @@ -194,12 +194,12 @@ CoD.PrivateGameLobby.UpdateDemoRecordingButton = function (ToggleDemoRecording) end end -CoD.PrivateGameLobby.DemoRecordingButton_ToggleDemoRecording = function (ToggleDemoRecording, f11_arg1) +CoD.PrivateGameLobby.DemoRecordingButton_ToggleDemoRecording = function(ToggleDemoRecording, f11_arg1) Dvar.demo_recordPrivateMatch:set(not Dvar.demo_recordPrivateMatch:get()) CoD.PrivateGameLobby.UpdateDemoRecordingButton(ToggleDemoRecording) end -CoD.PrivateGameLobby.PopulateFlyoutButtons_Project_Multiplayer = function (PrivateGameLobbyButtonPane) +CoD.PrivateGameLobby.PopulateFlyoutButtons_Project_Multiplayer = function(PrivateGameLobbyButtonPane) if not CoD.isZombie then PrivateGameLobbyButtonPane.body.setupGameFlyoutContainer.changeMapButton = PrivateGameLobbyButtonPane.body.setupGameFlyoutContainer.buttonList:addButton(Engine.Localize("MPUI_CHANGE_MAP_CAPS")) PrivateGameLobbyButtonPane.body.setupGameFlyoutContainer.changeMapButton.hintText = Engine.Localize("MPUI_CHANGE_MAP_DESC") @@ -216,7 +216,7 @@ CoD.PrivateGameLobby.PopulateFlyoutButtons_Project_Multiplayer = function (Priva PrivateGameLobbyButtonPane.body.setupGameFlyoutContainer.editGameOptionsButton:registerEventHandler("button_update", CoD.PrivateGameLobby.Button_UpdateHostButton) end -local AddGameOptionsButtons = function (PrivateGameLobbyButtonPane, GameOptions, GameOptionsType) +local AddGameOptionsButtons = function(PrivateGameLobbyButtonPane, GameOptions, GameOptionsType) local Gametype = UIExpression.DvarString(nil, "ui_gameType") local f13_local1 = 220 if Gametype == "zcleansed" then @@ -266,7 +266,7 @@ local AddGameOptionsButtons = function (PrivateGameLobbyButtonPane, GameOptions, end end -CoD.PrivateGameLobby.PopulateButtons_Project_Zombie = function (PrivateGameLobbyButtonPane, IsHost) +CoD.PrivateGameLobby.PopulateButtons_Project_Zombie = function(PrivateGameLobbyButtonPane, IsHost) if UIExpression.DvarString(nil, "ui_gametype") == CoD.Zombie.GAMETYPE_ZGRIEF then Engine.SetGametypeSetting("allowInGameTeamChange", 1) else @@ -330,34 +330,34 @@ CoD.PrivateGameLobby.PopulateButtons_Project_Zombie = function (PrivateGameLobby end end -CoD.PrivateGameLobby.ButtonGameLobbyUpdate_Zombie = function (GametypeSettingButton, f14_arg1) +CoD.PrivateGameLobby.ButtonGameLobbyUpdate_Zombie = function(GametypeSettingButton, f14_arg1) GametypeSettingButton:refreshChoice() GametypeSettingButton:dispatchEventToChildren(f14_arg1) end -CoD.PrivateGameLobby.ButtonGainFocusZombie = function (GametypeSettingButton, ClientInstance) +CoD.PrivateGameLobby.ButtonGainFocusZombie = function(GametypeSettingButton, ClientInstance) CoD.CoD9Button.GainFocus(GametypeSettingButton, ClientInstance) GametypeSettingButton:dispatchEventToParent({ name = "enable_sliding_zm", enableSliding = false, - controller = ClientInstance.controller + controller = ClientInstance.controller, }) end -CoD.PrivateGameLobby.ButtonLoseFocusZombie = function (GametypeSettingButton, ClientInstance) +CoD.PrivateGameLobby.ButtonLoseFocusZombie = function(GametypeSettingButton, ClientInstance) CoD.CoD9Button.LoseFocus(GametypeSettingButton, ClientInstance) GametypeSettingButton:dispatchEventToParent({ name = "enable_sliding_zm", enableSliding = true, - controller = ClientInstance.controller + controller = ClientInstance.controller, }) end -CoD.PrivateGameLobby.EnableSlidingZombie = function (f17_arg0, f17_arg1) +CoD.PrivateGameLobby.EnableSlidingZombie = function(f17_arg0, f17_arg1) f17_arg0.panelManager.slidingEnabled = f17_arg1.enableSliding end -CoD.PrivateGameLobby.PopulateButtons_Project = function (PrivateGameLobbyButtonPane, IsHost) +CoD.PrivateGameLobby.PopulateButtons_Project = function(PrivateGameLobbyButtonPane, IsHost) if CoD.isZombie == true then CoD.PrivateGameLobby.PopulateButtons_Project_Zombie(PrivateGameLobbyButtonPane, IsHost) else @@ -365,7 +365,7 @@ CoD.PrivateGameLobby.PopulateButtons_Project = function (PrivateGameLobbyButtonP end end -local LobbyTeamChangeAllowed = function () +local LobbyTeamChangeAllowed = function() if Engine.GetGametypeSetting("allowSpectating") == 1 then return true elseif Engine.GetGametypeSetting("autoTeamBalance") == 1 then @@ -381,7 +381,7 @@ local LobbyTeamChangeAllowed = function () end end -CoD.PrivateGameLobby.PopulateButtonPrompts_Project = function (PrivateGameLobbyWidget) +CoD.PrivateGameLobby.PopulateButtonPrompts_Project = function(PrivateGameLobbyWidget) if PrivateGameLobbyWidget.cycleTeamButtonPrompt ~= nil then PrivateGameLobbyWidget.cycleTeamButtonPrompt:close() end @@ -398,7 +398,7 @@ CoD.PrivateGameLobby.PopulateButtonPrompts_Project = function (PrivateGameLobbyW end end -CoD.PrivateGameLobby.LeaveLobby_Project_Multiplayer = function (PrivateGameLobbyWidget, ClientInstance) +CoD.PrivateGameLobby.LeaveLobby_Project_Multiplayer = function(PrivateGameLobbyWidget, ClientInstance) Engine.SetDvar("invite_visible", 1) Engine.SetGametype(Dvar.ui_gametype:get()) if Engine.SessionModeIsMode(CoD.SESSIONMODE_OFFLINE) == true or Engine.SessionModeIsMode(CoD.SESSIONMODE_SYSTEMLINK) == true then @@ -422,20 +422,20 @@ CoD.PrivateGameLobby.LeaveLobby_Project_Multiplayer = function (PrivateGameLobby end Engine.SessionModeSetPrivate(false) PrivateGameLobbyWidget:processEvent({ - name = "lose_host" + name = "lose_host", }) PrivateGameLobbyWidget:goBack(ClientInstance) end -CoD.PrivateGameLobby.LeaveLobby_Project_Zombie_After_Animation = function (PrivateGameLobbyWidget, ClientInstance) +CoD.PrivateGameLobby.LeaveLobby_Project_Zombie_After_Animation = function(PrivateGameLobbyWidget, ClientInstance) CoD.PrivateGameLobby.LeaveLobby_Project_Multiplayer(PrivateGameLobbyWidget, { name = PrivateGameLobbyWidget.leaveType, - controller = ClientInstance.controller + controller = ClientInstance.controller, }) PrivateGameLobbyWidget.leaveType = nil end -CoD.PrivateGameLobby.LeaveLobby_Project_Zombie = function (PrivateGameLobbyWidget, ClientInstance) +CoD.PrivateGameLobby.LeaveLobby_Project_Zombie = function(PrivateGameLobbyWidget, ClientInstance) PrivateGameLobbyWidget.leaveType = ClientInstance.name CoD.GameGlobeZombie.gameGlobe.currentMenu = PrivateGameLobbyWidget if PrivateGameLobbyWidget.menuName == "TheaterLobby" then @@ -446,7 +446,7 @@ CoD.PrivateGameLobby.LeaveLobby_Project_Zombie = function (PrivateGameLobbyWidge CoD.PrivateGameLobby.LeaveLobby_Project_Zombie_After_Animation(PrivateGameLobbyWidget, ClientInstance) end -CoD.PrivateGameLobby.LeaveLobby_Project = function (PrivateGameLobbyWidget, ClientInstance) +CoD.PrivateGameLobby.LeaveLobby_Project = function(PrivateGameLobbyWidget, ClientInstance) if CoD.isZombie == true then CoD.PrivateGameLobby.LeaveLobby_Project_Zombie(PrivateGameLobbyWidget, ClientInstance) else @@ -454,7 +454,7 @@ CoD.PrivateGameLobby.LeaveLobby_Project = function (PrivateGameLobbyWidget, Clie end end -CoD.PrivateGameLobby.OpenChangeStartLoc = function (PrivateGameLobbyWidget, ClientInstance) +CoD.PrivateGameLobby.OpenChangeStartLoc = function(PrivateGameLobbyWidget, ClientInstance) Engine.PartyHostSetUIState(CoD.PARTYHOST_STATE_SELECTING_GAMETYPE) Engine.SetDvar("ui_game_lobby_open", 1) if UIExpression.DvarString(nil, "ui_gameType") == "zclassic" then @@ -470,7 +470,7 @@ CoD.PrivateGameLobby.OpenChangeStartLoc = function (PrivateGameLobbyWidget, Clie PrivateGameLobbyWidget:close() end -CoD.PrivateGameLobby.OpenSetupGameFlyout = function (PrivateGameLobbyWidget, f28_arg1) +CoD.PrivateGameLobby.OpenSetupGameFlyout = function(PrivateGameLobbyWidget, f28_arg1) if PrivateGameLobbyWidget.buttonPane ~= nil and PrivateGameLobbyWidget.buttonPane.body ~= nil then CoD.PrivateGameLobby.RemoveSetupGameFlyout(PrivateGameLobbyWidget.buttonPane) CoD.PrivateGameLobby.AddSetupGameFlyout(PrivateGameLobbyWidget.buttonPane) @@ -478,13 +478,13 @@ CoD.PrivateGameLobby.OpenSetupGameFlyout = function (PrivateGameLobbyWidget, f28 CoD.ButtonList.DisableInput(PrivateGameLobbyWidget.buttonPane.body.buttonList) PrivateGameLobbyWidget.buttonPane.body.buttonList:animateToState("disabled") PrivateGameLobbyWidget.buttonPane.body.setupGameFlyoutContainer:processEvent({ - name = "gain_focus" + name = "gain_focus", }) PrivateGameLobbyWidget:registerEventHandler("button_prompt_back", CoD.PrivateGameLobby.CloseSetupGameFlyout) end end -CoD.PrivateGameLobby.CloseSetupGameFlyout = function (PrivateGameLobbyWidget, f29_arg1) +CoD.PrivateGameLobby.CloseSetupGameFlyout = function(PrivateGameLobbyWidget, f29_arg1) if PrivateGameLobbyWidget.buttonPane ~= nil and PrivateGameLobbyWidget.buttonPane.body ~= nil and PrivateGameLobbyWidget.buttonPane.body.setupGameFlyoutContainer ~= nil then CoD.PrivateGameLobby.RemoveSetupGameFlyout(PrivateGameLobbyWidget.buttonPane) CoD.ButtonList.EnableInput(PrivateGameLobbyWidget.buttonPane.body.buttonList) @@ -495,41 +495,41 @@ CoD.PrivateGameLobby.CloseSetupGameFlyout = function (PrivateGameLobbyWidget, f2 end end -CoD.PrivateGameLobby.OpenBotsMenu = function (PrivateGameLobbyWidget, ClientInstance) +CoD.PrivateGameLobby.OpenBotsMenu = function(PrivateGameLobbyWidget, ClientInstance) Engine.PartyHostSetUIState(CoD.PARTYHOST_STATE_EDITING_GAME_OPTIONS) PrivateGameLobbyWidget:openPopup("EditBotOptions", ClientInstance.controller) Engine.PlaySound("cac_screen_fade") end -CoD.PrivateGameLobby.OpenChangeMap = function (PrivateGameLobbyWidget, ClientInstance) +CoD.PrivateGameLobby.OpenChangeMap = function(PrivateGameLobbyWidget, ClientInstance) Engine.PartyHostSetUIState(CoD.PARTYHOST_STATE_SELECTING_MAP) PrivateGameLobbyWidget:openPopup("ChangeMap", ClientInstance.controller) Engine.PlaySound("cac_screen_fade") end -CoD.PrivateGameLobby.OpenChangeGameMode = function (PrivateGameLobbyWidget, ClientInstance) +CoD.PrivateGameLobby.OpenChangeGameMode = function(PrivateGameLobbyWidget, ClientInstance) Engine.PartyHostSetUIState(CoD.PARTYHOST_STATE_SELECTING_GAMETYPE) PrivateGameLobbyWidget:openPopup("ChangeGameMode", ClientInstance.controller) Engine.PlaySound("cac_screen_fade") end -CoD.PrivateGameLobby.OpenEditGameOptionsMenu = function (PrivateGameLobbyWidget, ClientInstance) +CoD.PrivateGameLobby.OpenEditGameOptionsMenu = function(PrivateGameLobbyWidget, ClientInstance) Engine.PartyHostSetUIState(CoD.PARTYHOST_STATE_EDITING_GAME_OPTIONS) PrivateGameLobbyWidget:openPopup("EditGameOptions", ClientInstance.controller) Engine.PlaySound("cac_screen_fade") end -CoD.PrivateGameLobby.OpenViewGameOptionsMenu = function (PrivateGameLobbyWidget, ClientInstance) +CoD.PrivateGameLobby.OpenViewGameOptionsMenu = function(PrivateGameLobbyWidget, ClientInstance) Engine.PartyHostSetUIState(CoD.PARTYHOST_STATE_EDITING_GAME_OPTIONS) PrivateGameLobbyWidget:openPopup("ViewGameOptions", ClientInstance.controller) end -CoD.PrivateGameLobby.CloseAllPopups = function (PrivateGameLobbyWidget, ClientInstance) +CoD.PrivateGameLobby.CloseAllPopups = function(PrivateGameLobbyWidget, ClientInstance) CoD.PrivateGameLobby.CloseSetupGameFlyout(PrivateGameLobbyWidget, ClientInstance) CoD.Menu.MenuChanged(PrivateGameLobbyWidget, ClientInstance) end -CoD.PrivateGameLobby.RegisterEventHandler_Project = function (PrivateGameLobbyWidget) +CoD.PrivateGameLobby.RegisterEventHandler_Project = function(PrivateGameLobbyWidget) if CoD.isZombie == true then PrivateGameLobbyWidget:registerEventHandler("open_change_startLoc", CoD.PrivateGameLobby.OpenChangeStartLoc) PrivateGameLobbyWidget:registerEventHandler("open_setup_game_flyout", CoD.PrivateGameLobby.OpenSetupGameFlyout) @@ -546,4 +546,4 @@ CoD.PrivateGameLobby.RegisterEventHandler_Project = function (PrivateGameLobbyWi PrivateGameLobbyWidget:registerEventHandler("open_viewGameOptions_menu", CoD.PrivateGameLobby.OpenViewGameOptionsMenu) PrivateGameLobbyWidget:registerEventHandler("close_all_popups", CoD.PrivateGameLobby.CloseAllPopups) end -end \ No newline at end of file +end diff --git a/ui_mp/t6/zombie/ammoareazombie.lua b/ui_mp/t6/zombie/ammoareazombie.lua index ee2ba275..4b7a950a 100644 --- a/ui_mp/t6/zombie/ammoareazombie.lua +++ b/ui_mp/t6/zombie/ammoareazombie.lua @@ -17,7 +17,7 @@ CoD.AmmoAreaZombie.CircleSize = 128 CoD.AmmoAreaZombie.InventoryIconSize = 64 CoD.AmmoAreaZombie.InventoryIconEnabledAlpha = 1 CoD.AmmoAreaZombie.InventoryAnimationDuration = 250 -LUI.createMenu.AmmoAreaZombie = function (f1_arg0) +LUI.createMenu.AmmoAreaZombie = function(f1_arg0) local f1_local0 = CoD.Menu.NewSafeAreaFromState("AmmoAreaZombie", f1_arg0) f1_local0:setOwner(f1_arg0) f1_local0.scaleContainer = CoD.SplitscreenScaler.new(nil, CoD.Zombie.SplitscreenMultiplier) @@ -167,7 +167,7 @@ LUI.createMenu.AmmoAreaZombie = function (f1_arg0) return f1_local0 end -CoD.AmmoAreaZombie.UpdateActionSlots = function (f2_arg0, f2_arg1) +CoD.AmmoAreaZombie.UpdateActionSlots = function(f2_arg0, f2_arg1) if f2_arg0.actionSlots == nil then f2_arg0.actionSlots = {} else @@ -195,7 +195,7 @@ CoD.AmmoAreaZombie.UpdateActionSlots = function (f2_arg0, f2_arg1) leftAnchor = false, topAnchor = true, rightAnchor = false, - bottomAnchor = false + bottomAnchor = false, } elseif f2_local4 == 2 then f2_local7 = { @@ -206,7 +206,7 @@ CoD.AmmoAreaZombie.UpdateActionSlots = function (f2_arg0, f2_arg1) leftAnchor = false, topAnchor = false, rightAnchor = false, - bottomAnchor = true + bottomAnchor = true, } elseif f2_local4 == 3 then f2_local7 = { @@ -217,7 +217,7 @@ CoD.AmmoAreaZombie.UpdateActionSlots = function (f2_arg0, f2_arg1) leftAnchor = true, topAnchor = false, rightAnchor = false, - bottomAnchor = false + bottomAnchor = false, } elseif f2_local4 == 4 then f2_local7 = { @@ -228,7 +228,7 @@ CoD.AmmoAreaZombie.UpdateActionSlots = function (f2_arg0, f2_arg1) leftAnchor = false, topAnchor = false, rightAnchor = true, - bottomAnchor = false + bottomAnchor = false, } end if f2_local7 ~= nil then @@ -265,7 +265,7 @@ CoD.AmmoAreaZombie.UpdateActionSlots = function (f2_arg0, f2_arg1) bottomAnchor = false, top = -f2_local14 / 2 - f2_local4 * f2_local14 - f2_local10, bottom = f2_local14 / 2 - f2_local4 * f2_local14 - f2_local10, - alignment = LUI.Alignment.Right + alignment = LUI.Alignment.Right, } elseif f2_local4 == 3 then f2_local11 = { @@ -277,7 +277,7 @@ CoD.AmmoAreaZombie.UpdateActionSlots = function (f2_arg0, f2_arg1) bottomAnchor = false, top = -f2_local14 / 2 - f2_local4 * f2_local14 - f2_local10, bottom = f2_local14 / 2 - f2_local4 * f2_local14 - f2_local10, - alignment = LUI.Alignment.Right + alignment = LUI.Alignment.Right, } elseif f2_local4 == 2 then f2_local11 = { @@ -289,7 +289,7 @@ CoD.AmmoAreaZombie.UpdateActionSlots = function (f2_arg0, f2_arg1) bottomAnchor = true, top = -f2_local14 / 2 - f2_local4 * f2_local14 - f2_local10, bottom = f2_local14 / 2 - f2_local4 * f2_local14 - f2_local10, - alignment = LUI.Alignment.Right + alignment = LUI.Alignment.Right, } elseif f2_local4 == 4 then f2_local11 = { @@ -301,7 +301,7 @@ CoD.AmmoAreaZombie.UpdateActionSlots = function (f2_arg0, f2_arg1) bottomAnchor = true, top = -f2_local14 / 2 - f2_local4 * f2_local14 - f2_local10, bottom = f2_local14 / 2 - f2_local4 * f2_local14 - f2_local10, - alignment = LUI.Alignment.Right + alignment = LUI.Alignment.Right, } end if f2_local11 ~= nil then @@ -317,11 +317,11 @@ CoD.AmmoAreaZombie.UpdateActionSlots = function (f2_arg0, f2_arg1) Widget:addElement(Widget.keyPrompt) if CoD.useController and Engine.LastInput_Gamepad() or UIExpression.DvarBool(nil, "hud_dpad_controller") == 1 then CoD.AmmoAreaZombie.ActionSlotInputSourceChanged(Widget, { - source = 0 + source = 0, }) else CoD.AmmoAreaZombie.ActionSlotInputSourceChanged(Widget, { - source = 1 + source = 1, }) end end @@ -331,7 +331,7 @@ CoD.AmmoAreaZombie.UpdateActionSlots = function (f2_arg0, f2_arg1) end end -CoD.AmmoAreaZombie.UpdateInventoryWeapon = function (f3_arg0, f3_arg1) +CoD.AmmoAreaZombie.UpdateInventoryWeapon = function(f3_arg0, f3_arg1) local f3_local0 = f3_arg0.inventoryWeapon local f3_local1 = nil if f3_arg1.teleported ~= true then @@ -347,7 +347,7 @@ CoD.AmmoAreaZombie.UpdateInventoryWeapon = function (f3_arg0, f3_arg1) end end -CoD.AmmoAreaZombie.UpdateFading = function (f4_arg0, f4_arg1) +CoD.AmmoAreaZombie.UpdateFading = function(f4_arg0, f4_arg1) if UIExpression.IsVisibilityBitSet(controller, CoD.BIT_HUD_VISIBLE) == 1 then if f4_arg1.alpha == 0 then f4_arg0:beginAnimation("fading", 500) @@ -356,14 +356,14 @@ CoD.AmmoAreaZombie.UpdateFading = function (f4_arg0, f4_arg1) end end -CoD.AmmoAreaZombie.GetThreeDigits = function (f5_arg0) +CoD.AmmoAreaZombie.GetThreeDigits = function(f5_arg0) local f5_local0 = math.floor(f5_arg0 / 100) f5_arg0 = f5_arg0 - f5_local0 * 100 local f5_local1 = math.floor(f5_arg0 / 10) return f5_local0, f5_local1, f5_arg0 - f5_local1 * 10 end -CoD.AmmoAreaZombie.UpdateAmmo = function (f6_arg0, f6_arg1) +CoD.AmmoAreaZombie.UpdateAmmo = function(f6_arg0, f6_arg1) if f6_arg1.ammoInClip == 0 and f6_arg1.ammoStock == 0 and f6_arg1.lowClip ~= true then return end @@ -471,11 +471,9 @@ CoD.AmmoAreaZombie.UpdateAmmo = function (f6_arg0, f6_arg1) end end -CoD.AmmoAreaZombie.UpdateFuel = function (f7_arg0, f7_arg1) +CoD.AmmoAreaZombie.UpdateFuel = function(f7_arg0, f7_arg1) end -end - -CoD.AmmoAreaZombie.UpdateOverheat = function (f8_arg0, f8_arg1) +CoD.AmmoAreaZombie.UpdateOverheat = function(f8_arg0, f8_arg1) if CoD.AmmoAreaZombie.ShouldHideOverheatCounter(f8_arg0, f8_arg1) then return end @@ -549,7 +547,7 @@ CoD.AmmoAreaZombie.UpdateOverheat = function (f8_arg0, f8_arg1) end end -CoD.AmmoAreaZombie.UpdateVisibility = function (f9_arg0, f9_arg1) +CoD.AmmoAreaZombie.UpdateVisibility = function(f9_arg0, f9_arg1) local f9_local0 = f9_arg1.controller if UIExpression.IsVisibilityBitSet(f9_local0, CoD.BIT_HUD_VISIBLE) == 1 and UIExpression.IsVisibilityBitSet(f9_local0, CoD.BIT_IS_PLAYER_IN_AFTERLIFE) == 0 and UIExpression.IsVisibilityBitSet(f9_local0, CoD.BIT_EMP_ACTIVE) == 0 and UIExpression.IsVisibilityBitSet(f9_local0, CoD.BIT_DEMO_CAMERA_MODE_MOVIECAM) == 0 and UIExpression.IsVisibilityBitSet(f9_local0, CoD.BIT_DEMO_ALL_GAME_HUD_HIDDEN) == 0 and UIExpression.IsVisibilityBitSet(f9_local0, CoD.BIT_IN_VEHICLE) == 0 and UIExpression.IsVisibilityBitSet(f9_local0, CoD.BIT_IN_GUIDED_MISSILE) == 0 and UIExpression.IsVisibilityBitSet(f9_local0, CoD.BIT_IN_REMOTE_KILLSTREAK_STATIC) == 0 and UIExpression.IsVisibilityBitSet(f9_local0, CoD.BIT_AMMO_COUNTER_HIDE) == 0 and UIExpression.IsVisibilityBitSet(f9_local0, CoD.BIT_IS_FLASH_BANGED) == 0 and UIExpression.IsVisibilityBitSet(f9_local0, CoD.BIT_UI_ACTIVE) == 0 and UIExpression.IsVisibilityBitSet(f9_local0, CoD.BIT_GAME_ENDED) == 0 and UIExpression.IsVisibilityBitSet(f9_local0, CoD.BIT_SCOREBOARD_OPEN) == 0 and UIExpression.IsVisibilityBitSet(f9_local0, CoD.BIT_IN_KILLCAM) == 0 and UIExpression.IsVisibilityBitSet(f9_local0, CoD.BIT_HUD_HARDCORE) == 0 and (not CoD.IsShoutcaster(f9_local0) or CoD.ExeProfileVarBool(f9_local0, "shoutcaster_inventory") and Engine.IsSpectatingActiveClient(f9_local0)) and CoD.FSM_VISIBILITY(f9_local0) == 0 then if f9_arg0.visible ~= true then @@ -564,7 +562,7 @@ CoD.AmmoAreaZombie.UpdateVisibility = function (f9_arg0, f9_arg1) CoD.AmmoAreaZombie.UpdateAmmoVisibility(f9_arg0, f9_arg1) end -CoD.AmmoAreaZombie.ShouldHideAmmoCounter = function (f10_arg0, f10_arg1) +CoD.AmmoAreaZombie.ShouldHideAmmoCounter = function(f10_arg0, f10_arg1) if f10_arg0.weapon ~= nil then if Engine.IsWeaponType(f10_arg0.weapon, "melee") then return true @@ -575,7 +573,7 @@ CoD.AmmoAreaZombie.ShouldHideAmmoCounter = function (f10_arg0, f10_arg1) return false end -CoD.AmmoAreaZombie.ShouldHideOverheatCounter = function (f10_arg0, f10_arg1) +CoD.AmmoAreaZombie.ShouldHideOverheatCounter = function(f10_arg0, f10_arg1) if f10_arg0.weapon ~= nil then if CoD.isZombie == true and (Engine.IsWeaponType(f10_arg0.weapon, "gas") or Engine.IsOverheatWeapon(f10_arg0.weapon)) then return false @@ -584,7 +582,7 @@ CoD.AmmoAreaZombie.ShouldHideOverheatCounter = function (f10_arg0, f10_arg1) return true end -CoD.AmmoAreaZombie.UpdateAmmoVisibility = function (f11_arg0, f11_arg1) +CoD.AmmoAreaZombie.UpdateAmmoVisibility = function(f11_arg0, f11_arg1) if f11_arg1.weapon ~= nil then f11_arg0.weapon = f11_arg1.weapon end @@ -595,7 +593,7 @@ CoD.AmmoAreaZombie.UpdateAmmoVisibility = function (f11_arg0, f11_arg1) end end -CoD.AmmoAreaZombie.UpdateWeapon = function (f12_arg0, f12_arg1) +CoD.AmmoAreaZombie.UpdateWeapon = function(f12_arg0, f12_arg1) if f12_arg1.weapon and (Engine.IsWeaponType(f12_arg1.weapon, "melee") or Engine.IsWeaponType(f12_arg1.weapon, "riotshield") or Engine.IsWeaponType(f12_arg1.weapon, "grenade")) then f12_arg0.hideAmmo = true else @@ -605,7 +603,7 @@ CoD.AmmoAreaZombie.UpdateWeapon = function (f12_arg0, f12_arg1) f12_arg0:dispatchEventToChildren(f12_arg1) end -CoD.AmmoAreaZombie.UpdateWeaponSelect = function (f13_arg0, f13_arg1) +CoD.AmmoAreaZombie.UpdateWeaponSelect = function(f13_arg0, f13_arg1) f13_arg0.weaponLabelContainer:setAlpha(1) local f13_local0 = UIExpression.ToUpper(nil, Engine.Localize(f13_arg1.weaponDisplayName)) if CoD.isZombie == true then @@ -616,7 +614,7 @@ CoD.AmmoAreaZombie.UpdateWeaponSelect = function (f13_arg0, f13_arg1) f13_arg0:dispatchEventToChildren(f13_arg1) end -CoD.AmmoAreaZombie.SetKeyBind = function (f14_arg0) +CoD.AmmoAreaZombie.SetKeyBind = function(f14_arg0) local f14_local0, f14_local1 = nil if f14_arg0.keyPrompt ~= nil and f14_arg0.slotIndex ~= nil then if f14_arg0.slotIndex == 4 then @@ -634,7 +632,7 @@ CoD.AmmoAreaZombie.SetKeyBind = function (f14_arg0) end end -CoD.AmmoAreaZombie.ActionSlotInputSourceChanged = function (f15_arg0, f15_arg1) +CoD.AmmoAreaZombie.ActionSlotInputSourceChanged = function(f15_arg0, f15_arg1) if CoD.isPC then if CoD.useController and f15_arg1.source == 0 or UIExpression.DvarBool(nil, "hud_dpad_controller") == 1 then f15_arg0:animateToState("default") @@ -651,7 +649,7 @@ CoD.AmmoAreaZombie.ActionSlotInputSourceChanged = function (f15_arg0, f15_arg1) end end -CoD.AmmoAreaZombie.InputSourceChanged = function (f16_arg0, f16_arg1) +CoD.AmmoAreaZombie.InputSourceChanged = function(f16_arg0, f16_arg1) if CoD.isPC then if f16_arg0.carouselArrows ~= nil then f16_arg0.carouselArrows:setAlpha(1) @@ -665,4 +663,4 @@ CoD.AmmoAreaZombie.InputSourceChanged = function (f16_arg0, f16_arg1) end end end -end \ No newline at end of file +end diff --git a/ui_mp/t6/zombie/hudafterlifedisplay.lua b/ui_mp/t6/zombie/hudafterlifedisplay.lua index 247960d9..5b2faeb7 100644 --- a/ui_mp/t6/zombie/hudafterlifedisplay.lua +++ b/ui_mp/t6/zombie/hudafterlifedisplay.lua @@ -7,7 +7,7 @@ CoD.HudAfterlifeDisplay.IconHeight = CoD.HudAfterlifeDisplay.IconWidth / CoD.Hud CoD.HudAfterlifeDisplay.InventoryWidth = 64 CoD.HudAfterlifeDisplay.InventoryHeight = CoD.HudAfterlifeDisplay.InventoryWidth / CoD.HudAfterlifeDisplay.IconRatio CoD.HudAfterlifeDisplay.PULSE_DURATION = 3000 -LUI.createMenu.AfterlifeArea = function (f1_arg0) +LUI.createMenu.AfterlifeArea = function(f1_arg0) local f1_local0 = CoD.Menu.NewSafeAreaFromState("AfterlifeArea", f1_arg0) f1_local0:setOwner(f1_arg0) CoD.HudAfterlifeDisplay.AfterlifeMeterMaterial = RegisterMaterial("hud_zombie_afterlife_meter") @@ -95,7 +95,7 @@ LUI.createMenu.AfterlifeArea = function (f1_arg0) return f1_local0 end -CoD.HudAfterlifeDisplay.UpdateVisibility = function (f2_arg0, f2_arg1) +CoD.HudAfterlifeDisplay.UpdateVisibility = function(f2_arg0, f2_arg1) local f2_local0 = f2_arg1.controller if UIExpression.IsVisibilityBitSet(f2_local0, CoD.BIT_HUD_VISIBLE) == 1 and UIExpression.IsVisibilityBitSet(f2_local0, CoD.BIT_EMP_ACTIVE) == 0 and UIExpression.IsVisibilityBitSet(f2_local0, CoD.BIT_DEMO_CAMERA_MODE_MOVIECAM) == 0 and UIExpression.IsVisibilityBitSet(f2_local0, CoD.BIT_DEMO_ALL_GAME_HUD_HIDDEN) == 0 and UIExpression.IsVisibilityBitSet(f2_local0, CoD.BIT_IN_VEHICLE) == 0 and UIExpression.IsVisibilityBitSet(f2_local0, CoD.BIT_IN_GUIDED_MISSILE) == 0 and UIExpression.IsVisibilityBitSet(f2_local0, CoD.BIT_IN_REMOTE_KILLSTREAK_STATIC) == 0 and UIExpression.IsVisibilityBitSet(f2_local0, CoD.BIT_AMMO_COUNTER_HIDE) == 0 and UIExpression.IsVisibilityBitSet(f2_local0, CoD.BIT_IS_FLASH_BANGED) == 0 and UIExpression.IsVisibilityBitSet(f2_local0, CoD.BIT_UI_ACTIVE) == 0 and UIExpression.IsVisibilityBitSet(f2_local0, CoD.BIT_SCOREBOARD_OPEN) == 0 and UIExpression.IsVisibilityBitSet(f2_local0, CoD.BIT_IS_SCOPED) == 0 and (not CoD.IsShoutcaster(f2_local0) or CoD.ExeProfileVarBool(f2_local0, "shoutcaster_scorestreaks") and Engine.IsSpectatingActiveClient(f2_local0)) and CoD.FSM_VISIBILITY(f2_local0) == 0 then if f2_arg0.visible ~= true then @@ -111,7 +111,7 @@ CoD.HudAfterlifeDisplay.UpdateVisibility = function (f2_arg0, f2_arg1) f2_arg0:dispatchEventToChildren(f2_arg1) end -CoD.HudAfterlifeDisplay.UpdatePlayerLives = function (f3_arg0, f3_arg1) +CoD.HudAfterlifeDisplay.UpdatePlayerLives = function(f3_arg0, f3_arg1) f3_arg0.afterlifeInventoryCount:setText(f3_arg1.newValue) if f3_arg1.oldValue < f3_arg1.newValue then if f3_arg0.afterLifeInventoryContainer.alternatorTimer then @@ -121,7 +121,7 @@ CoD.HudAfterlifeDisplay.UpdatePlayerLives = function (f3_arg0, f3_arg1) end end -CoD.HudAfterlifeDisplay.UpdatePlayerInAfterlife = function (f4_arg0, f4_arg1) +CoD.HudAfterlifeDisplay.UpdatePlayerInAfterlife = function(f4_arg0, f4_arg1) local f4_local0 = f4_arg0.entNum ~= f4_arg1.entNum f4_arg0.entNum = f4_arg1.entNum if f4_arg1.newValue == 1 then @@ -141,7 +141,7 @@ CoD.HudAfterlifeDisplay.UpdatePlayerInAfterlife = function (f4_arg0, f4_arg1) end end -CoD.HudAfterlifeDisplay.UpdateAfterlifeMana = function (f5_arg0, f5_arg1) +CoD.HudAfterlifeDisplay.UpdateAfterlifeMana = function(f5_arg0, f5_arg1) local f5_local0 = f5_arg0.entNum ~= f5_arg1.entNum f5_arg0.afterlifeIcon:completeAnimation() if f5_arg1.newValue ~= 0 and f5_arg1.wasDemoJump == false and f5_local0 == false then @@ -150,7 +150,7 @@ CoD.HudAfterlifeDisplay.UpdateAfterlifeMana = function (f5_arg0, f5_arg1) f5_arg0.afterlifeIcon:setShaderVector(0, f5_arg1.newValue, 0, 0, 0) end -CoD.HudAfterlifeDisplay.UpdateAfterlifeWaypoint = function (f6_arg0, f6_arg1) +CoD.HudAfterlifeDisplay.UpdateAfterlifeWaypoint = function(f6_arg0, f6_arg1) local f6_local0 = f6_arg1.newValue local f6_local1 = f6_local0 - 1 local f6_local2 = f6_arg1.entNum @@ -187,7 +187,7 @@ CoD.HudAfterlifeDisplay.UpdateAfterlifeWaypoint = function (f6_arg0, f6_arg1) end end -CoD.HudAfterlifeDisplay.UpdateAfterlifeIconsDemoJump = function (f7_arg0, f7_arg1) +CoD.HudAfterlifeDisplay.UpdateAfterlifeIconsDemoJump = function(f7_arg0, f7_arg1) local f7_local0 = {} for f7_local1 = 1, #f7_arg0.afterlifeWaypointIcons, 1 do if Engine.IsEntityNumberInUse(f7_arg1.controller, f7_arg0.afterlifeWaypointIcons[f7_local1].entNum, CoD.EntityType.ET_SCRIPTMOVER) == false then @@ -202,7 +202,7 @@ CoD.HudAfterlifeDisplay.UpdateAfterlifeIconsDemoJump = function (f7_arg0, f7_arg end end -CoD.HudAfterlifeDisplay.AfterlifeWaypointExists = function (f8_arg0, f8_arg1) +CoD.HudAfterlifeDisplay.AfterlifeWaypointExists = function(f8_arg0, f8_arg1) local f8_local0 = false for f8_local1 = 1, #f8_arg0.afterlifeWaypointIcons, 1 do if f8_arg0.afterlifeWaypointIcons[f8_local1].entNum == f8_arg1 then @@ -213,12 +213,12 @@ CoD.HudAfterlifeDisplay.AfterlifeWaypointExists = function (f8_arg0, f8_arg1) return f8_local0 end -CoD.HudAfterlifeDisplay.PulseOff = function (f9_arg0, f9_arg1) +CoD.HudAfterlifeDisplay.PulseOff = function(f9_arg0, f9_arg1) f9_arg0:beginAnimation("pulse_off", f9_arg1) f9_arg0:setAlpha(0.1) end -CoD.HudAfterlifeDisplay.PulseOn = function (f10_arg0, f10_arg1) +CoD.HudAfterlifeDisplay.PulseOn = function(f10_arg0, f10_arg1) f10_arg0:beginAnimation("pulse_on", f10_arg1) f10_arg0:setAlpha(1) -end \ No newline at end of file +end diff --git a/ui_mp/t6/zombie/hudcompetitivescoreboardzombie.lua b/ui_mp/t6/zombie/hudcompetitivescoreboardzombie.lua index 2bdcfb19..14ad8f72 100644 --- a/ui_mp/t6/zombie/hudcompetitivescoreboardzombie.lua +++ b/ui_mp/t6/zombie/hudcompetitivescoreboardzombie.lua @@ -4,7 +4,7 @@ CoD.CompetitiveScoreboard.RowHeight = 30 CoD.CompetitiveScoreboard.FloatingLosePointsColor = { r = 0.21, g = 0, - b = 0 + b = 0, } CoD.CompetitiveScoreboard.IsDLC2Map = CoD.Zombie.IsDLCMap(CoD.Zombie.DLC2Maps) CoD.CompetitiveScoreboard.IsDLC3Map = CoD.Zombie.IsDLCMap(CoD.Zombie.DLC3Maps) @@ -22,37 +22,37 @@ CoD.CompetitiveScoreboard.ClientFields = {} CoD.CompetitiveScoreboard.ClientFields.score_cf_damage = { min = 0, max = 7, - scoreScale = 10 + scoreScale = 10, } CoD.CompetitiveScoreboard.ClientFields.score_cf_death_normal = { min = 0, max = 3, - scoreScale = 50 + scoreScale = 50, } CoD.CompetitiveScoreboard.ClientFields.score_cf_death_torso = { min = 0, max = 3, - scoreScale = 60 + scoreScale = 60, } CoD.CompetitiveScoreboard.ClientFields.score_cf_death_neck = { min = 0, max = 3, - scoreScale = 70 + scoreScale = 70, } CoD.CompetitiveScoreboard.ClientFields.score_cf_death_head = { min = 0, max = 3, - scoreScale = 100 + scoreScale = 100, } CoD.CompetitiveScoreboard.ClientFields.score_cf_death_melee = { min = 0, max = 3, - scoreScale = 130 + scoreScale = 130, } CoD.CompetitiveScoreboard.ClientFields.score_cf_double_points_active = { min = 0, max = 1, - scoreScale = 2 + scoreScale = 2, } CoD.CompetitiveScoreboard.DoublePointsActive_ClientFieldName = "score_cf_double_points_active" CoD.CompetitiveScoreboard.FlyingDurationMin = 800 @@ -76,59 +76,59 @@ if CoD.CompetitiveScoreboard.IsDLC2Map == true then CoD.CompetitiveScoreboard.CharacterNames = {} CoD.CompetitiveScoreboard.CharacterNames[1] = { name = "Finn", - modelName = "c_zom_player_oleary_fb" + modelName = "c_zom_player_oleary_fb", } CoD.CompetitiveScoreboard.CharacterNames[2] = { name = "Sal", - modelName = "c_zom_player_deluca_fb" + modelName = "c_zom_player_deluca_fb", } CoD.CompetitiveScoreboard.CharacterNames[3] = { name = "Billy", - modelName = "c_zom_player_handsome_fb" + modelName = "c_zom_player_handsome_fb", } CoD.CompetitiveScoreboard.CharacterNames[4] = { name = "Weasel", - modelName = "c_zom_player_arlington_fb" + modelName = "c_zom_player_arlington_fb", } elseif CoD.CompetitiveScoreboard.IsDLC3Map == true then CoD.CompetitiveScoreboard.CharacterNames = {} CoD.CompetitiveScoreboard.CharacterNames[1] = { name = "Misty", - modelName = "c_zom_player_farmgirl_fb" + modelName = "c_zom_player_farmgirl_fb", } CoD.CompetitiveScoreboard.CharacterNames[2] = { name = "Marlton", - modelName = "c_zom_player_engineer_fb" + modelName = "c_zom_player_engineer_fb", } CoD.CompetitiveScoreboard.CharacterNames[3] = { name = "Stuhlinger", - modelName = "c_zom_player_reporter_dam_fb" + modelName = "c_zom_player_reporter_dam_fb", } CoD.CompetitiveScoreboard.CharacterNames[4] = { name = "Russman", - modelName = "c_zom_player_oldman_fb" + modelName = "c_zom_player_oldman_fb", } elseif CoD.CompetitiveScoreboard.IsDLC4Map == true then CoD.CompetitiveScoreboard.CharacterNames = {} CoD.CompetitiveScoreboard.CharacterNames[1] = { name = "Richtofen", - modelName = "c_zom_tomb_richtofen_fb" + modelName = "c_zom_tomb_richtofen_fb", } CoD.CompetitiveScoreboard.CharacterNames[2] = { name = "Takeo", - modelName = "c_zom_tomb_takeo_fb" + modelName = "c_zom_tomb_takeo_fb", } CoD.CompetitiveScoreboard.CharacterNames[3] = { name = "Nikolai", - modelName = "c_zom_tomb_nikolai_fb" + modelName = "c_zom_tomb_nikolai_fb", } CoD.CompetitiveScoreboard.CharacterNames[4] = { name = "Dempsey", - modelName = "c_zom_tomb_dempsey_fb" + modelName = "c_zom_tomb_dempsey_fb", } end -LUI.createMenu.CompetitiveScoreboard = function (LocalClientIndex) +LUI.createMenu.CompetitiveScoreboard = function(LocalClientIndex) local CompetitiveScoreboardWidget = CoD.Menu.NewSafeAreaFromState("CompetitiveScoreboard", LocalClientIndex) CompetitiveScoreboardWidget:setOwner(LocalClientIndex) CompetitiveScoreboardWidget.scaleContainer = CoD.SplitscreenScaler.new(nil, CoD.Zombie.SplitscreenMultiplier) @@ -184,13 +184,13 @@ LUI.createMenu.CompetitiveScoreboard = function (LocalClientIndex) 0, 0, 0, - 0 + 0, } CoD.CompetitiveScoreboard.HelmetStates = { 0, 0, 0, - 0 + 0, } PlayerScoreListWidget.shovelIcon = LUI.UIImage.new() PlayerScoreListWidget.shovelIcon:setLeftRight(false, true, -CoD.CompetitiveScoreboard.RowHeight, 0) @@ -258,7 +258,7 @@ LUI.createMenu.CompetitiveScoreboard = function (LocalClientIndex) return CompetitiveScoreboardWidget end -CoD.CompetitiveScoreboard.CompetitiveScoreShow = function (PlayerScoreListWidget, ClientIndex, AnimDelay) +CoD.CompetitiveScoreboard.CompetitiveScoreShow = function(PlayerScoreListWidget, ClientIndex, AnimDelay) if not AnimDelay then AnimDelay = 0 end @@ -269,7 +269,7 @@ CoD.CompetitiveScoreboard.CompetitiveScoreShow = function (PlayerScoreListWidget PlayerScoreListWidget:setAlpha(1) end -CoD.CompetitiveScoreboard.CompetitiveScoreShowSelf = function (PlayerScoreListWidget, ClientScoreIndex, AnimDelay) +CoD.CompetitiveScoreboard.CompetitiveScoreShowSelf = function(PlayerScoreListWidget, ClientScoreIndex, AnimDelay) if not AnimDelay then AnimDelay = 0 end @@ -280,7 +280,7 @@ CoD.CompetitiveScoreboard.CompetitiveScoreShowSelf = function (PlayerScoreListWi PlayerScoreListWidget:setAlpha(1) end -CoD.CompetitiveScoreboard.CompetitiveScoreHide = function (PlayerScoreListWidget, AnimDelay) +CoD.CompetitiveScoreboard.CompetitiveScoreHide = function(PlayerScoreListWidget, AnimDelay) if not AnimDelay then AnimDelay = 0 end @@ -288,7 +288,7 @@ CoD.CompetitiveScoreboard.CompetitiveScoreHide = function (PlayerScoreListWidget PlayerScoreListWidget:setAlpha(0) end -CoD.CompetitiveScoreboard.CompetitiveScoreTextShowPlayerColor = function (Text, ClientIndex, AnimDelay) +CoD.CompetitiveScoreboard.CompetitiveScoreTextShowPlayerColor = function(Text, ClientIndex, AnimDelay) if not AnimDelay then AnimDelay = 0 end @@ -296,7 +296,7 @@ CoD.CompetitiveScoreboard.CompetitiveScoreTextShowPlayerColor = function (Text, Text:setRGB(CoD.Zombie.PlayerColors[ClientIndex].r, CoD.Zombie.PlayerColors[ClientIndex].g, CoD.Zombie.PlayerColors[ClientIndex].b) end -CoD.CompetitiveScoreboard.UpdateVisibility = function (CompetitiveScoreboardWidget, ClientInstance) +CoD.CompetitiveScoreboard.UpdateVisibility = function(CompetitiveScoreboardWidget, ClientInstance) local LocalClientIndex = ClientInstance.controller if UIExpression.IsVisibilityBitSet(LocalClientIndex, CoD.BIT_HUD_VISIBLE) == 1 and UIExpression.IsVisibilityBitSet(LocalClientIndex, CoD.BIT_IS_PLAYER_IN_AFTERLIFE) == 0 and UIExpression.IsVisibilityBitSet(LocalClientIndex, CoD.BIT_EMP_ACTIVE) == 0 and UIExpression.IsVisibilityBitSet(LocalClientIndex, CoD.BIT_DEMO_CAMERA_MODE_MOVIECAM) == 0 and UIExpression.IsVisibilityBitSet(LocalClientIndex, CoD.BIT_DEMO_ALL_GAME_HUD_HIDDEN) == 0 and UIExpression.IsVisibilityBitSet(LocalClientIndex, CoD.BIT_IN_VEHICLE) == 0 and UIExpression.IsVisibilityBitSet(LocalClientIndex, CoD.BIT_IN_GUIDED_MISSILE) == 0 and UIExpression.IsVisibilityBitSet(LocalClientIndex, CoD.BIT_IN_REMOTE_KILLSTREAK_STATIC) == 0 and UIExpression.IsVisibilityBitSet(LocalClientIndex, CoD.BIT_AMMO_COUNTER_HIDE) == 0 and UIExpression.IsVisibilityBitSet(LocalClientIndex, CoD.BIT_IS_FLASH_BANGED) == 0 and UIExpression.IsVisibilityBitSet(LocalClientIndex, CoD.BIT_UI_ACTIVE) == 0 and UIExpression.IsVisibilityBitSet(LocalClientIndex, CoD.BIT_SCOREBOARD_OPEN) == 0 and UIExpression.IsVisibilityBitSet(LocalClientIndex, CoD.BIT_IS_SCOPED) == 0 and (not CoD.IsShoutcaster(LocalClientIndex) or CoD.IsShoutcasterProfileVariableTrue(LocalClientIndex, "shoutcaster_scorestreaks") and Engine.IsSpectatingActiveClient(LocalClientIndex)) and CoD.FSM_VISIBILITY(LocalClientIndex) == 0 then if CompetitiveScoreboardWidget.visible ~= true then @@ -312,7 +312,7 @@ CoD.CompetitiveScoreboard.UpdateVisibility = function (CompetitiveScoreboardWidg CompetitiveScoreboardWidget:dispatchEventToChildren(ClientInstance) end -CoD.CompetitiveScoreboard.UpdateTeamChange = function (CompetitiveScoreboardWidget, ClientInstance) +CoD.CompetitiveScoreboard.UpdateTeamChange = function(CompetitiveScoreboardWidget, ClientInstance) if Dvar.ui_gametype:get() == CoD.Zombie.GAMETYPE_ZCLEANSED then if ClientInstance.team == CoD.TEAM_AXIS then if CompetitiveScoreboardWidget.visible == true then @@ -328,7 +328,7 @@ CoD.CompetitiveScoreboard.UpdateTeamChange = function (CompetitiveScoreboardWidg end end -CoD.CompetitiveScoreboard.CopyPreNavCardAndShow = function (CompetitiveScoreboardWidget, PlayerScoreListWidget, LocalClientIndex) +CoD.CompetitiveScoreboard.CopyPreNavCardAndShow = function(CompetitiveScoreboardWidget, PlayerScoreListWidget, LocalClientIndex) local PreviousPlayerScoreListWidget = nil for PlayerScoreListWidgetIndex = 1, CoD.CompetitiveScoreboard.TeamPlayerCount, 1 do PreviousPlayerScoreListWidget = CompetitiveScoreboardWidget.Scores[PlayerScoreListWidgetIndex] @@ -346,7 +346,7 @@ CoD.CompetitiveScoreboard.CopyPreNavCardAndShow = function (CompetitiveScoreboar end end -CoD.CompetitiveScoreboard.UpdateItemDisplay = function (UnusedArg1, PlayerScoreListWidget, ClientInstance) +CoD.CompetitiveScoreboard.UpdateItemDisplay = function(UnusedArg1, PlayerScoreListWidget, ClientInstance) if PlayerScoreListWidget.clientNum then local ClientIndex = PlayerScoreListWidget.clientNum + 1 local ShovelClientFieldState = CoD.CompetitiveScoreboard.ShovelStates[ClientIndex] @@ -378,7 +378,7 @@ CoD.CompetitiveScoreboard.UpdateItemDisplay = function (UnusedArg1, PlayerScoreL end end -CoD.CompetitiveScoreboard.Update = function (CompetitiveScoreboardWidget, ClientInstance) +CoD.CompetitiveScoreboard.Update = function(CompetitiveScoreboardWidget, ClientInstance) local ClientScoreIndex = 1 local PlayerScoreListWidget = nil if #ClientInstance.competitivescores <= #CompetitiveScoreboardWidget.Scores then @@ -443,7 +443,7 @@ CoD.CompetitiveScoreboard.Update = function (CompetitiveScoreboardWidget, Client end end -CoD.CompetitiveScoreboard.Update_ClientFields_FlyingScore = function (CompetitiveScoreboardWidget, ClientInstance) +CoD.CompetitiveScoreboard.Update_ClientFields_FlyingScore = function(CompetitiveScoreboardWidget, ClientInstance) local PlayerScoreListWidget = nil for PlayerScoreListWidgetIndex = 1, CoD.CompetitiveScoreboard.TeamPlayerCount, 1 do if CompetitiveScoreboardWidget.Scores[PlayerScoreListWidgetIndex].clientNum == ClientInstance.entNum then @@ -476,7 +476,7 @@ CoD.CompetitiveScoreboard.Update_ClientFields_FlyingScore = function (Competitiv end end -CoD.CompetitiveScoreboard.FloatingScoreStart = function (PlayerScoreListWidget, ScoreAmount) +CoD.CompetitiveScoreboard.FloatingScoreStart = function(PlayerScoreListWidget, ScoreAmount) local AvailableFloatingScoreText = CoD.CompetitiveScoreboard.GetFloatingScoreText(PlayerScoreListWidget) if AvailableFloatingScoreText ~= nil then AvailableFloatingScoreText:setAlpha(1) @@ -499,7 +499,7 @@ CoD.CompetitiveScoreboard.FloatingScoreStart = function (PlayerScoreListWidget, end end -CoD.CompetitiveScoreboard.GetScore = function (CompetitiveScoreboardWidget, ClientIndex) +CoD.CompetitiveScoreboard.GetScore = function(CompetitiveScoreboardWidget, ClientIndex) for PlayerScoreListWidgetIndex = 1, CoD.CompetitiveScoreboard.TeamPlayerCount, 1 do if CompetitiveScoreboardWidget.Scores[PlayerScoreListWidgetIndex].clientNum == ClientIndex then return CompetitiveScoreboardWidget.Scores[PlayerScoreListWidgetIndex] @@ -508,7 +508,7 @@ CoD.CompetitiveScoreboard.GetScore = function (CompetitiveScoreboardWidget, Clie return nil end -CoD.CompetitiveScoreboard.GetFloatingScoreText = function (PlayerScoreListWidget) +CoD.CompetitiveScoreboard.GetFloatingScoreText = function(PlayerScoreListWidget) for ScoreTextIndex = 1, CoD.CompetitiveScoreboard.ClientFieldMaxValue, 1 do if PlayerScoreListWidget.floatingScoreTexts[ScoreTextIndex].isUsed == false then return PlayerScoreListWidget.floatingScoreTexts[ScoreTextIndex] @@ -517,7 +517,7 @@ CoD.CompetitiveScoreboard.GetFloatingScoreText = function (PlayerScoreListWidget return nil end -CoD.CompetitiveScoreboard.FloatingTextFlyingFinish = function (FloatingScoreText, ClientInstance) +CoD.CompetitiveScoreboard.FloatingTextFlyingFinish = function(FloatingScoreText, ClientInstance) if ClientInstance.interrupted ~= true then FloatingScoreText.isUsed = false FloatingScoreText:setLeftRight(true, false, -30, -30 + CoD.CompetitiveScoreboard.RowWidth) @@ -525,7 +525,7 @@ CoD.CompetitiveScoreboard.FloatingTextFlyingFinish = function (FloatingScoreText end end -CoD.CompetitiveScoreboard.Update_ClientField_NavCards = function (CompetitiveScoreboardWidget, ClientInstance) +CoD.CompetitiveScoreboard.Update_ClientField_NavCards = function(CompetitiveScoreboardWidget, ClientInstance) local PlayerScoreListWidget = CoD.CompetitiveScoreboard.GetScore(CompetitiveScoreboardWidget, ClientInstance.entNum) for NavCardIconIndex = 1, CoD.CompetitiveScoreboard.NavCardsCount, 1 do if CoD.CompetitiveScoreboard.HasBit(ClientInstance.newValue, CoD.CompetitiveScoreboard.Bit(NavCardIconIndex)) == true then @@ -542,7 +542,7 @@ CoD.CompetitiveScoreboard.Update_ClientField_NavCards = function (CompetitiveSco end end -CoD.CompetitiveScoreboard.Update_ClientField_Shovel = function (CompetitiveScoreboardWidget, ClientInstance) +CoD.CompetitiveScoreboard.Update_ClientField_Shovel = function(CompetitiveScoreboardWidget, ClientInstance) local ShovelClientFieldState = ClientInstance.newValue local ClientFieldNameIndex = tonumber(string.sub(ClientInstance.name, string.len(ClientInstance.name))) - 1 local PlayerScoreListWidget = CoD.CompetitiveScoreboard.GetScore(CompetitiveScoreboardWidget, ClientFieldNameIndex) @@ -568,7 +568,7 @@ CoD.CompetitiveScoreboard.Update_ClientField_Shovel = function (CompetitiveScore end end -CoD.CompetitiveScoreboard.Update_ClientField_Helmet = function (CompetitiveScoreboardWidget, ClientInstance) +CoD.CompetitiveScoreboard.Update_ClientField_Helmet = function(CompetitiveScoreboardWidget, ClientInstance) local HelmetClientFieldState = ClientInstance.newValue local ClientFieldNameIndex = tonumber(string.sub(ClientInstance.name, string.len(ClientInstance.name))) - 1 local PlayerScoreListWidget = CoD.CompetitiveScoreboard.GetScore(CompetitiveScoreboardWidget, ClientFieldNameIndex) @@ -589,15 +589,15 @@ CoD.CompetitiveScoreboard.Update_ClientField_Helmet = function (CompetitiveScore end end -CoD.CompetitiveScoreboard.Bit = function (Index) +CoD.CompetitiveScoreboard.Bit = function(Index) return 2 ^ (Index - 1) end -CoD.CompetitiveScoreboard.HasBit = function (ClientFieldValue, NavCardBit) +CoD.CompetitiveScoreboard.HasBit = function(ClientFieldValue, NavCardBit) return NavCardBit <= ClientFieldValue % (NavCardBit + NavCardBit) end -CoD.CompetitiveScoreboard.UpdateCharacterName = function (CompetitiveScoreboardWidget, ClientInstanceModelName, PlayerScoreListWidget, ClientIndex) +CoD.CompetitiveScoreboard.UpdateCharacterName = function(CompetitiveScoreboardWidget, ClientInstanceModelName, PlayerScoreListWidget, ClientIndex) if not ClientInstanceModelName and PlayerScoreListWidget.characterName then PlayerScoreListWidget.characterName:setText("") return @@ -622,14 +622,14 @@ CoD.CompetitiveScoreboard.UpdateCharacterName = function (CompetitiveScoreboardW end end -CoD.CompetitiveScoreboard.FadeoutCharacterName = function (CharacterNameWidget, ClientInstance) +CoD.CompetitiveScoreboard.FadeoutCharacterName = function(CharacterNameWidget, ClientInstance) CharacterNameWidget:beginAnimation("fade_out", CoD.CompetitiveScoreboard.CHARACTER_NAME_FADE_OUT_DURATION) CharacterNameWidget:setAlpha(0) end -CoD.CompetitiveScoreboard.ClearCharacterName = function (PlayerScoreListWidget) +CoD.CompetitiveScoreboard.ClearCharacterName = function(PlayerScoreListWidget) if PlayerScoreListWidget.playerModelName then PlayerScoreListWidget.playerModelName = nil PlayerScoreListWidget.characterName:setText("") end -end \ No newline at end of file +end diff --git a/ui_mp/t6/zombie/hudcraftablestombzombie.lua b/ui_mp/t6/zombie/hudcraftablestombzombie.lua index 040666a8..04a7a10f 100644 --- a/ui_mp/t6/zombie/hudcraftablestombzombie.lua +++ b/ui_mp/t6/zombie/hudcraftablestombzombie.lua @@ -21,7 +21,7 @@ CoD.CraftablesTomb.OneInchIconHeight = CoD.CraftablesTomb.OneInchIconWidth CoD.CraftablesTomb.NEED_TABLET = 0 CoD.CraftablesTomb.HAVE_TABLET_CLEAN = 1 CoD.CraftablesTomb.NEED_TABLET_DIRTY = 2 -LUI.createMenu.CraftablesTombArea = function (f1_arg0) +LUI.createMenu.CraftablesTombArea = function(f1_arg0) local f1_local0 = CoD.Menu.NewSafeAreaFromState("CraftablesTombArea", f1_arg0) f1_local0:setOwner(f1_arg0) f1_local0.topLeftScaleContainer = CoD.SplitscreenScaler.new(nil, CoD.Zombie.SplitscreenMultiplier) @@ -118,7 +118,7 @@ LUI.createMenu.CraftablesTombArea = function (f1_arg0) return f1_local0 end -CoD.CraftablesTomb.UpdateVisibility = function (f2_arg0, f2_arg1) +CoD.CraftablesTomb.UpdateVisibility = function(f2_arg0, f2_arg1) local f2_local0 = f2_arg1.controller if UIExpression.IsVisibilityBitSet(f2_local0, CoD.BIT_HUD_VISIBLE) == 1 and UIExpression.IsVisibilityBitSet(f2_local0, CoD.BIT_EMP_ACTIVE) == 0 and UIExpression.IsVisibilityBitSet(f2_local0, CoD.BIT_DEMO_CAMERA_MODE_MOVIECAM) == 0 and UIExpression.IsVisibilityBitSet(f2_local0, CoD.BIT_DEMO_ALL_GAME_HUD_HIDDEN) == 0 and UIExpression.IsVisibilityBitSet(f2_local0, CoD.BIT_IN_VEHICLE) == 0 and UIExpression.IsVisibilityBitSet(f2_local0, CoD.BIT_IN_GUIDED_MISSILE) == 0 and UIExpression.IsVisibilityBitSet(f2_local0, CoD.BIT_IN_REMOTE_KILLSTREAK_STATIC) == 0 and UIExpression.IsVisibilityBitSet(f2_local0, CoD.BIT_AMMO_COUNTER_HIDE) == 0 and UIExpression.IsVisibilityBitSet(f2_local0, CoD.BIT_IS_FLASH_BANGED) == 0 and UIExpression.IsVisibilityBitSet(f2_local0, CoD.BIT_UI_ACTIVE) == 0 and UIExpression.IsVisibilityBitSet(f2_local0, CoD.BIT_SCOREBOARD_OPEN) == 0 and UIExpression.IsVisibilityBitSet(f2_local0, CoD.BIT_IS_SCOPED) == 0 and (not CoD.IsShoutcaster(f2_local0) or CoD.ExeProfileVarBool(f2_local0, "shoutcaster_scorestreaks") and Engine.IsSpectatingActiveClient(f2_local0)) and CoD.FSM_VISIBILITY(f2_local0) == 0 then if f2_arg0.visible ~= true then @@ -134,7 +134,7 @@ CoD.CraftablesTomb.UpdateVisibility = function (f2_arg0, f2_arg1) f2_arg0:dispatchEventToChildren(f2_arg1) end -CoD.CraftablesTomb.UpdateTabletState = function (f3_arg0, f3_arg1) +CoD.CraftablesTomb.UpdateTabletState = function(f3_arg0, f3_arg1) local f3_local0 = f3_arg1.newValue if f3_local0 == CoD.CraftablesTomb.NEED_TABLET then f3_arg0.tabletContainer:setAlpha(0) @@ -145,4 +145,4 @@ CoD.CraftablesTomb.UpdateTabletState = function (f3_arg0, f3_arg1) f3_arg0.tabletIcon:setImage(CoD.CraftablesTomb.OneInchPunchDirtyMaterial) f3_arg0.tabletContainer:setAlpha(1) end -end \ No newline at end of file +end diff --git a/ui_mp/t6/zombie/huddpadareazombie.lua b/ui_mp/t6/zombie/huddpadareazombie.lua index 658e7167..ce0da7de 100644 --- a/ui_mp/t6/zombie/huddpadareazombie.lua +++ b/ui_mp/t6/zombie/huddpadareazombie.lua @@ -6,7 +6,7 @@ CoD.DPadArea.InventoryAnimationDuration = 250 CoD.DPadArea.ArrowColor = { r = 1, g = 1, - b = 1 + b = 1, } CoD.DPadArea.RewardIconSize = 64 CoD.DPadArea.InterlacedLinesMaterial = RegisterMaterial("hud_dpad_blood") @@ -18,7 +18,7 @@ if CoD.isPS3 == true then else CoD.DPadArea.DPadMaterial = RegisterMaterial("hud_dpad_xenon") end -LUI.createMenu.DPadArea = function (f1_arg0) +LUI.createMenu.DPadArea = function(f1_arg0) local f1_local0 = CoD.Menu.NewSafeAreaFromState("DPadArea", f1_arg0) f1_local0:setOwner(f1_arg0) f1_local0.scaleContainer = CoD.SplitscreenScaler.new(nil, CoD.Zombie.SplitscreenMultiplier) @@ -43,7 +43,7 @@ LUI.createMenu.DPadArea = function (f1_arg0) red = 0.21, green = 0, blue = 0, - material = CoD.DPadArea.InterlacedLinesMaterial + material = CoD.DPadArea.InterlacedLinesMaterial, })) Widget.circleBackground = LUI.UIImage.new() Widget.circleBackground:setLeftRight(true, true, 0, 0) @@ -59,7 +59,7 @@ LUI.createMenu.DPadArea = function (f1_arg0) leftAnchor = true, topAnchor = true, rightAnchor = true, - bottomAnchor = true + bottomAnchor = true, })) Widget:addElement(CoD.OtherAmmoCounters.new({ left = 0, @@ -69,7 +69,7 @@ LUI.createMenu.DPadArea = function (f1_arg0) leftAnchor = true, topAnchor = true, rightAnchor = true, - bottomAnchor = true + bottomAnchor = true, })) local f1_local3 = -88 local f1_local4 = -131 @@ -81,7 +81,7 @@ LUI.createMenu.DPadArea = function (f1_arg0) leftAnchor = false, topAnchor = false, rightAnchor = true, - bottomAnchor = true + bottomAnchor = true, })) local f1_local5 = -49 local f1_local6 = -1 @@ -93,7 +93,7 @@ LUI.createMenu.DPadArea = function (f1_arg0) leftAnchor = false, topAnchor = false, rightAnchor = true, - bottomAnchor = true + bottomAnchor = true, })) Widget:addElement(CoD.OffhandIcons.new("tactical", { left = f1_local5 - CoD.OffhandIcons.Width * 2, @@ -103,7 +103,7 @@ LUI.createMenu.DPadArea = function (f1_arg0) leftAnchor = false, topAnchor = false, rightAnchor = true, - bottomAnchor = true + bottomAnchor = true, })) Widget.carouselArrows = LUI.UIElement.new({ left = 0, @@ -113,7 +113,7 @@ LUI.createMenu.DPadArea = function (f1_arg0) leftAnchor = true, topAnchor = true, rightAnchor = true, - bottomAnchor = true + bottomAnchor = true, }) Widget:addElement(Widget.carouselArrows) local f1_local7 = 8 @@ -132,7 +132,7 @@ LUI.createMenu.DPadArea = function (f1_arg0) green = CoD.DPadArea.ArrowColor.g, blue = CoD.DPadArea.ArrowColor.b, alpha = CoD.HUDAlphaFull, - material = CoD.DPadArea.ArrowMaterial + material = CoD.DPadArea.ArrowMaterial, })) Widget.carouselArrows:addElement(LUI.UIImage.new({ left = -f1_local7 / 2, @@ -148,7 +148,7 @@ LUI.createMenu.DPadArea = function (f1_arg0) blue = CoD.DPadArea.ArrowColor.b, alpha = CoD.HUDAlphaFull, material = CoD.DPadArea.ArrowMaterial, - zRot = 180 + zRot = 180, })) Widget.carouselArrows:addElement(LUI.UIImage.new({ left = -f1_local9 - f1_local8 / 2 - f1_local7 / 2, @@ -164,7 +164,7 @@ LUI.createMenu.DPadArea = function (f1_arg0) blue = CoD.DPadArea.ArrowColor.b, alpha = CoD.HUDAlphaFull, material = CoD.DPadArea.ArrowMaterial, - zRot = 90 + zRot = 90, })) Widget.carouselArrows:addElement(LUI.UIImage.new({ left = f1_local9 + f1_local8 / 2 - f1_local7 / 2, @@ -180,7 +180,7 @@ LUI.createMenu.DPadArea = function (f1_arg0) blue = CoD.DPadArea.ArrowColor.b, alpha = CoD.HUDAlphaFull, material = CoD.DPadArea.ArrowMaterial, - zRot = -90 + zRot = -90, })) local f1_local10 = 3 @@ -193,10 +193,10 @@ LUI.createMenu.DPadArea = function (f1_arg0) topAnchor = true, rightAnchor = false, bottomAnchor = false, - alpha = 0 + alpha = 0, }) inventoryWeapon:registerAnimationState("show", { - alpha = 1 + alpha = 1, }) Widget:addElement(inventoryWeapon) Widget.inventoryWeapon = inventoryWeapon @@ -210,7 +210,7 @@ LUI.createMenu.DPadArea = function (f1_arg0) topAnchor = true, rightAnchor = false, bottomAnchor = false, - alpha = CoD.DPadArea.RewardIconEnabledAlpha + alpha = CoD.DPadArea.RewardIconEnabledAlpha, }) inventoryWeapon:addElement(inventoryWeaponIcon) Widget.inventoryWeaponIcon = inventoryWeaponIcon @@ -223,7 +223,7 @@ LUI.createMenu.DPadArea = function (f1_arg0) leftAnchor = false, topAnchor = false, rightAnchor = false, - bottomAnchor = true + bottomAnchor = true, }) f1_local13:setText(Engine.Localize("MPUI_HINT_INVENTORY_CAPS", UIExpression.KeyBinding(f1_arg0, "+weapnext_inventory"))) f1_local13:setFont(CoD.fonts.Big) @@ -252,11 +252,11 @@ LUI.createMenu.DPadArea = function (f1_arg0) Widget:registerEventHandler("input_source_changed", CoD.DPadArea.InputSourceChanged) if CoD.useController and Engine.LastInput_Gamepad() or UIExpression.DvarBool(nil, "hud_dpad_controller") == 1 then CoD.DPadArea.InputSourceChanged(Widget, { - source = 0 + source = 0, }) else CoD.DPadArea.InputSourceChanged(Widget, { - source = 1 + source = 1, }) end end @@ -264,7 +264,7 @@ LUI.createMenu.DPadArea = function (f1_arg0) return f1_local0 end -CoD.DPadArea.UpdateActionSlots = function (f2_arg0, f2_arg1) +CoD.DPadArea.UpdateActionSlots = function(f2_arg0, f2_arg1) if f2_arg0.actionSlots == nil then f2_arg0.actionSlots = {} else @@ -293,7 +293,7 @@ CoD.DPadArea.UpdateActionSlots = function (f2_arg0, f2_arg1) topAnchor = true, rightAnchor = false, bottomAnchor = false, - alphaMultiplier = 1 + alphaMultiplier = 1, } elseif f2_local4 == 2 then f2_local7 = { @@ -305,7 +305,7 @@ CoD.DPadArea.UpdateActionSlots = function (f2_arg0, f2_arg1) topAnchor = false, rightAnchor = false, bottomAnchor = true, - alphaMultiplier = 1 + alphaMultiplier = 1, } elseif f2_local4 == 3 then f2_local7 = { @@ -317,7 +317,7 @@ CoD.DPadArea.UpdateActionSlots = function (f2_arg0, f2_arg1) topAnchor = false, rightAnchor = false, bottomAnchor = false, - alphaMultiplier = 1 + alphaMultiplier = 1, } elseif f2_local4 == 4 then f2_local7 = { @@ -328,7 +328,7 @@ CoD.DPadArea.UpdateActionSlots = function (f2_arg0, f2_arg1) leftAnchor = false, topAnchor = false, rightAnchor = true, - bottomAnchor = false + bottomAnchor = false, } end if f2_local7 ~= nil then @@ -349,7 +349,7 @@ CoD.DPadArea.UpdateActionSlots = function (f2_arg0, f2_arg1) green = CoD.HUDBaseColor.g, blue = CoD.HUDBaseColor.b, alpha = f2_local5, - material = f2_local9.material + material = f2_local9.material, })) if f2_local4 ~= 1 and f2_local4 ~= 2 and f2_local9.hasSelectFireAttachment == false then local f2_local8 = LUI.UIText.new({ @@ -364,7 +364,7 @@ CoD.DPadArea.UpdateActionSlots = function (f2_arg0, f2_arg1) red = 1, green = 1, blue = 1, - alpha = CoD.HUDAlphaFull + alpha = CoD.HUDAlphaFull, }) f2_local8:setText(f2_local9.ammo) Widget:addElement(f2_local8) @@ -382,7 +382,7 @@ CoD.DPadArea.UpdateActionSlots = function (f2_arg0, f2_arg1) bottomAnchor = false, top = -f2_local11 / 2 - f2_local4 * f2_local11 - f2_local10, bottom = f2_local11 / 2 - f2_local4 * f2_local11 - f2_local10, - alignment = LUI.Alignment.Right + alignment = LUI.Alignment.Right, } elseif f2_local4 == 3 then f2_local8 = { @@ -394,7 +394,7 @@ CoD.DPadArea.UpdateActionSlots = function (f2_arg0, f2_arg1) bottomAnchor = false, top = -f2_local11 / 2 - f2_local4 * f2_local11 - f2_local10, bottom = f2_local11 / 2 - f2_local4 * f2_local11 - f2_local10, - alignment = LUI.Alignment.Right + alignment = LUI.Alignment.Right, } elseif f2_local4 == 2 then f2_local8 = { @@ -406,7 +406,7 @@ CoD.DPadArea.UpdateActionSlots = function (f2_arg0, f2_arg1) bottomAnchor = true, top = -f2_local11 / 2 - f2_local4 * f2_local11 - f2_local10, bottom = f2_local11 / 2 - f2_local4 * f2_local11 - f2_local10, - alignment = LUI.Alignment.Right + alignment = LUI.Alignment.Right, } elseif f2_local4 == 4 then f2_local8 = { @@ -418,7 +418,7 @@ CoD.DPadArea.UpdateActionSlots = function (f2_arg0, f2_arg1) bottomAnchor = true, top = -f2_local11 / 2 - f2_local4 * f2_local11 - f2_local10, bottom = f2_local11 / 2 - f2_local4 * f2_local11 - f2_local10, - alignment = LUI.Alignment.Right + alignment = LUI.Alignment.Right, } end if f2_local8 ~= nil then @@ -434,11 +434,11 @@ CoD.DPadArea.UpdateActionSlots = function (f2_arg0, f2_arg1) Widget:addElement(Widget.keyPrompt) if CoD.useController and Engine.LastInput_Gamepad() or UIExpression.DvarBool(nil, "hud_dpad_controller") == 1 then CoD.DPadArea.ActionSlotInputSourceChanged(Widget, { - source = 0 + source = 0, }) else CoD.DPadArea.ActionSlotInputSourceChanged(Widget, { - source = 1 + source = 1, }) end end @@ -448,7 +448,7 @@ CoD.DPadArea.UpdateActionSlots = function (f2_arg0, f2_arg1) end end -CoD.DPadArea.UpdateInventoryWeapon = function (f3_arg0, f3_arg1) +CoD.DPadArea.UpdateInventoryWeapon = function(f3_arg0, f3_arg1) local f3_local0 = f3_arg0.inventoryWeapon local f3_local1 = nil if f3_arg1.teleported ~= true then @@ -457,7 +457,7 @@ CoD.DPadArea.UpdateInventoryWeapon = function (f3_arg0, f3_arg1) if f3_arg1.materialName ~= nil then local f3_local2 = f3_arg0.inventoryWeaponIcon f3_local2:registerAnimationState("default", { - material = f3_arg1.material + material = f3_arg1.material, }) f3_local2:animateToState("default") f3_local0:animateToState("show", f3_local1) @@ -466,7 +466,7 @@ CoD.DPadArea.UpdateInventoryWeapon = function (f3_arg0, f3_arg1) end end -CoD.DPadArea.UpdateFading = function (f4_arg0, f4_arg1) +CoD.DPadArea.UpdateFading = function(f4_arg0, f4_arg1) if UIExpression.IsVisibilityBitSet(controller, CoD.BIT_HUD_VISIBLE) == 1 then if f4_arg1.alpha == 0 then f4_arg0:beginAnimation("fading", 500) @@ -475,7 +475,7 @@ CoD.DPadArea.UpdateFading = function (f4_arg0, f4_arg1) end end -CoD.DPadArea.UpdateVisibility = function (f5_arg0, f5_arg1) +CoD.DPadArea.UpdateVisibility = function(f5_arg0, f5_arg1) local f5_local0 = f5_arg1.controller if UIExpression.IsVisibilityBitSet(f5_local0, CoD.BIT_HUD_VISIBLE) == 1 and UIExpression.IsVisibilityBitSet(f5_local0, CoD.BIT_EMP_ACTIVE) == 0 and UIExpression.IsVisibilityBitSet(f5_local0, CoD.BIT_DEMO_CAMERA_MODE_MOVIECAM) == 0 and UIExpression.IsVisibilityBitSet(f5_local0, CoD.BIT_DEMO_ALL_GAME_HUD_HIDDEN) == 0 and UIExpression.IsVisibilityBitSet(f5_local0, CoD.BIT_IN_VEHICLE) == 0 and UIExpression.IsVisibilityBitSet(f5_local0, CoD.BIT_IN_GUIDED_MISSILE) == 0 and UIExpression.IsVisibilityBitSet(f5_local0, CoD.BIT_IN_REMOTE_KILLSTREAK_STATIC) == 0 and UIExpression.IsVisibilityBitSet(f5_local0, CoD.BIT_AMMO_COUNTER_HIDE) == 0 and UIExpression.IsVisibilityBitSet(f5_local0, CoD.BIT_IS_FLASH_BANGED) == 0 and UIExpression.IsVisibilityBitSet(f5_local0, CoD.BIT_UI_ACTIVE) == 0 and UIExpression.IsVisibilityBitSet(f5_local0, CoD.BIT_SCOREBOARD_OPEN) == 0 and UIExpression.IsVisibilityBitSet(f5_local0, CoD.BIT_IN_KILLCAM) == 0 and UIExpression.IsVisibilityBitSet(f5_local0, CoD.BIT_IS_SCOPED) == 0 and UIExpression.IsVisibilityBitSet(f5_local0, CoD.BIT_IS_PLAYER_ZOMBIE) == 0 and (not CoD.IsShoutcaster(f5_local0) or CoD.ExeProfileVarBool(f5_local0, "shoutcaster_scorestreaks") and Engine.IsSpectatingActiveClient(f5_local0)) and CoD.FSM_VISIBILITY(f5_local0) == 0 then if f5_arg0.visible ~= true then @@ -491,7 +491,7 @@ CoD.DPadArea.UpdateVisibility = function (f5_arg0, f5_arg1) f5_arg0:dispatchEventToChildren(f5_arg1) end -CoD.DPadArea.UpdateTeamChange = function (f6_arg0, f6_arg1) +CoD.DPadArea.UpdateTeamChange = function(f6_arg0, f6_arg1) if Dvar.ui_gametype:get() == CoD.Zombie.GAMETYPE_ZCLEANSED then if f6_arg1.team == CoD.TEAM_AXIS then if f6_arg0.visible == true then @@ -507,7 +507,7 @@ CoD.DPadArea.UpdateTeamChange = function (f6_arg0, f6_arg1) end end -CoD.DPadArea.SetKeyBind = function (f7_arg0) +CoD.DPadArea.SetKeyBind = function(f7_arg0) local f7_local0, f7_local1 = nil if f7_arg0.keyPrompt ~= nil and f7_arg0.slotIndex ~= nil then if f7_arg0.slotIndex == 4 then @@ -525,7 +525,7 @@ CoD.DPadArea.SetKeyBind = function (f7_arg0) end end -CoD.DPadArea.ActionSlotInputSourceChanged = function (f8_arg0, f8_arg1) +CoD.DPadArea.ActionSlotInputSourceChanged = function(f8_arg0, f8_arg1) if CoD.isPC then if CoD.useController and f8_arg1.source == 0 or UIExpression.DvarBool(nil, "hud_dpad_controller") == 1 then f8_arg0:animateToState("default") @@ -542,7 +542,7 @@ CoD.DPadArea.ActionSlotInputSourceChanged = function (f8_arg0, f8_arg1) end end -CoD.DPadArea.InputSourceChanged = function (f9_arg0, f9_arg1) +CoD.DPadArea.InputSourceChanged = function(f9_arg0, f9_arg1) if CoD.isPC then if f9_arg0.carouselArrows ~= nil then f9_arg0.carouselArrows:setAlpha(1) @@ -556,4 +556,4 @@ CoD.DPadArea.InputSourceChanged = function (f9_arg0, f9_arg1) end end end -end \ No newline at end of file +end diff --git a/ui_mp/t6/zombie/hudperkszombie.lua b/ui_mp/t6/zombie/hudperkszombie.lua index c40fb454..efdaea83 100644 --- a/ui_mp/t6/zombie/hudperkszombie.lua +++ b/ui_mp/t6/zombie/hudperkszombie.lua @@ -9,57 +9,57 @@ CoD.Perks.STATE_TBD = 3 CoD.Perks.ClientFieldNames = {} CoD.Perks.ClientFieldNames[1] = { clientFieldName = "perk_additional_primary_weapon", - material = RegisterMaterial("specialty_additionalprimaryweapon_zombies") + material = RegisterMaterial("specialty_additionalprimaryweapon_zombies"), } CoD.Perks.ClientFieldNames[2] = { clientFieldName = "perk_dead_shot", - material = RegisterMaterial("specialty_ads_zombies") + material = RegisterMaterial("specialty_ads_zombies"), } CoD.Perks.ClientFieldNames[3] = { clientFieldName = "perk_dive_to_nuke", - material = RegisterMaterial("specialty_divetonuke_zombies") + material = RegisterMaterial("specialty_divetonuke_zombies"), } CoD.Perks.ClientFieldNames[4] = { clientFieldName = "perk_double_tap", - material = RegisterMaterial("specialty_doubletap_zombies") + material = RegisterMaterial("specialty_doubletap_zombies"), } CoD.Perks.ClientFieldNames[5] = { clientFieldName = "perk_juggernaut", - material = RegisterMaterial("specialty_juggernaut_zombies") + material = RegisterMaterial("specialty_juggernaut_zombies"), } CoD.Perks.ClientFieldNames[6] = { clientFieldName = "perk_marathon", - material = RegisterMaterial("specialty_marathon_zombies") + material = RegisterMaterial("specialty_marathon_zombies"), } CoD.Perks.ClientFieldNames[7] = { clientFieldName = "perk_quick_revive", - material = RegisterMaterial("specialty_quickrevive_zombies") + material = RegisterMaterial("specialty_quickrevive_zombies"), } CoD.Perks.ClientFieldNames[8] = { clientFieldName = "perk_sleight_of_hand", - material = RegisterMaterial("specialty_fastreload_zombies") + material = RegisterMaterial("specialty_fastreload_zombies"), } CoD.Perks.ClientFieldNames[9] = { clientFieldName = "perk_tombstone", - material = RegisterMaterial("specialty_tombstone_zombies") + material = RegisterMaterial("specialty_tombstone_zombies"), } CoD.Perks.ClientFieldNames[10] = { clientFieldName = "perk_chugabud", - material = RegisterMaterial("specialty_chugabud_zombies") + material = RegisterMaterial("specialty_chugabud_zombies"), } CoD.Perks.ClientFieldNames[11] = { clientFieldName = "perk_electric_cherry", - material = RegisterMaterial("specialty_electric_cherry_zombie") + material = RegisterMaterial("specialty_electric_cherry_zombie"), } CoD.Perks.ClientFieldNames[12] = { clientFieldName = "perk_vulture", material = RegisterMaterial("specialty_vulture_zombies"), - glowMaterial = RegisterMaterial("zm_hud_stink_perk_glow") + glowMaterial = RegisterMaterial("zm_hud_stink_perk_glow"), } CoD.Perks.PulseDuration = 200 CoD.Perks.PulseScale = 1.3 CoD.Perks.PausedAlpha = 0.3 -LUI.createMenu.PerksArea = function (LocalClientIndex) +LUI.createMenu.PerksArea = function(LocalClientIndex) local PerksAreaWidget = CoD.Menu.NewSafeAreaFromState("PerksArea", LocalClientIndex) PerksAreaWidget:setOwner(LocalClientIndex) PerksAreaWidget.scaleContainer = CoD.SplitscreenScaler.new(nil, CoD.Zombie.SplitscreenMultiplier) @@ -111,7 +111,7 @@ LUI.createMenu.PerksArea = function (LocalClientIndex) return PerksAreaWidget end -CoD.Perks.UpdateVisibility = function (Menu, ClientInstance) +CoD.Perks.UpdateVisibility = function(Menu, ClientInstance) local f2_local0 = ClientInstance.controller if UIExpression.IsVisibilityBitSet(f2_local0, CoD.BIT_HUD_VISIBLE) == 1 and UIExpression.IsVisibilityBitSet(f2_local0, CoD.BIT_IS_PLAYER_IN_AFTERLIFE) == 0 and UIExpression.IsVisibilityBitSet(f2_local0, CoD.BIT_EMP_ACTIVE) == 0 and UIExpression.IsVisibilityBitSet(f2_local0, CoD.BIT_DEMO_CAMERA_MODE_MOVIECAM) == 0 and UIExpression.IsVisibilityBitSet(f2_local0, CoD.BIT_DEMO_ALL_GAME_HUD_HIDDEN) == 0 and UIExpression.IsVisibilityBitSet(f2_local0, CoD.BIT_IN_VEHICLE) == 0 and UIExpression.IsVisibilityBitSet(f2_local0, CoD.BIT_IN_GUIDED_MISSILE) == 0 and UIExpression.IsVisibilityBitSet(f2_local0, CoD.BIT_IN_REMOTE_KILLSTREAK_STATIC) == 0 and UIExpression.IsVisibilityBitSet(f2_local0, CoD.BIT_AMMO_COUNTER_HIDE) == 0 and UIExpression.IsVisibilityBitSet(f2_local0, CoD.BIT_IS_FLASH_BANGED) == 0 and UIExpression.IsVisibilityBitSet(f2_local0, CoD.BIT_UI_ACTIVE) == 0 and UIExpression.IsVisibilityBitSet(f2_local0, CoD.BIT_SCOREBOARD_OPEN) == 0 and UIExpression.IsVisibilityBitSet(f2_local0, CoD.BIT_IS_SCOPED) == 0 and (not CoD.IsShoutcaster(f2_local0) or CoD.ExeProfileVarBool(f2_local0, "shoutcaster_scorestreaks") and Engine.IsSpectatingActiveClient(f2_local0)) and CoD.FSM_VISIBILITY(f2_local0) == 0 then if Menu.visible ~= true then @@ -127,7 +127,7 @@ CoD.Perks.UpdateVisibility = function (Menu, ClientInstance) Menu:dispatchEventToChildren(ClientInstance) end -CoD.Perks.GetMaterial = function (Menu, ClientFieldName) +CoD.Perks.GetMaterial = function(Menu, ClientFieldName) local Material = nil for ClientFieldIndex = 1, #CoD.Perks.ClientFieldNames, 1 do if CoD.Perks.ClientFieldNames[ClientFieldIndex].clientFieldName == ClientFieldName then @@ -138,7 +138,7 @@ CoD.Perks.GetMaterial = function (Menu, ClientFieldName) return Material end -CoD.Perks.GetGlowMaterial = function (Menu, ClientFieldName) +CoD.Perks.GetGlowMaterial = function(Menu, ClientFieldName) local Material = nil for ClientFieldIndex = 1, #CoD.Perks.ClientFieldNames, 1 do if CoD.Perks.ClientFieldNames[ClientFieldIndex].clientFieldName == ClientFieldName then @@ -151,7 +151,7 @@ CoD.Perks.GetGlowMaterial = function (Menu, ClientFieldName) return Material end -CoD.Perks.RemovePerkIcon = function (Menu, OwnedPerkIndex) +CoD.Perks.RemovePerkIcon = function(Menu, OwnedPerkIndex) local PerkWidget, NextPerkWidget = nil, nil for PerkIndex = OwnedPerkIndex, #CoD.Perks.ClientFieldNames, 1 do PerkWidget = Menu.perks[PerkIndex] @@ -163,7 +163,6 @@ CoD.Perks.RemovePerkIcon = function (Menu, OwnedPerkIndex) if not NextPerkWidget then PerkWidget.perkIcon:setAlpha(0) if PerkWidget.perkGlowIcon then - else PerkWidget.perkId = nil break @@ -176,7 +175,6 @@ CoD.Perks.RemovePerkIcon = function (Menu, OwnedPerkIndex) PerkWidget.perkGlowIcon = nil end if PerkWidget.meterContainer then - else PerkWidget.perkId = nil break @@ -194,7 +192,7 @@ CoD.Perks.RemovePerkIcon = function (Menu, OwnedPerkIndex) end end -CoD.Perks.Update = function (Menu, ClientInstance) +CoD.Perks.Update = function(Menu, ClientInstance) local PerkWidget = nil for OwnedPerkIndex = 1, #CoD.Perks.ClientFieldNames, 1 do PerkWidget = Menu.perks[OwnedPerkIndex] @@ -204,7 +202,6 @@ CoD.Perks.Update = function (Menu, ClientInstance) PerkWidget.perkIcon:setImage(CoD.Perks.GetMaterial(Menu, ClientInstance.name)) PerkWidget.perkIcon:setAlpha(1) if PerkWidget.perkId == "perk_vulture" then - else local f6_local4 = CoD.Perks.GetGlowMaterial(Menu, ClientInstance.name) if f6_local4 and PerkWidget.perkGlowIcon then @@ -248,19 +245,18 @@ CoD.Perks.Update = function (Menu, ClientInstance) end end if ClientInstance.newValue == CoD.Perks.STATE_TBD then - end end end -CoD.Perks.IconPulseFinish = function (Menu, ClientInstance) +CoD.Perks.IconPulseFinish = function(Menu, ClientInstance) if ClientInstance.interrupted ~= true then Menu:beginAnimation("pulse_done", CoD.Perks.PulseDuration) Menu:setScale(1) end end -CoD.Perks.AddGlowIcon = function (Menu, PerkWidget) +CoD.Perks.AddGlowIcon = function(Menu, PerkWidget) if not PerkWidget.perkGlowIcon then local GlowIcon = LUI.UIImage.new() GlowIcon:setLeftRight(true, true, -CoD.Perks.IconSize / 2, CoD.Perks.IconSize / 2) @@ -271,7 +267,7 @@ CoD.Perks.AddGlowIcon = function (Menu, PerkWidget) end end -CoD.Perks.AddVultureMeter = function (Menu, PerkWidget) +CoD.Perks.AddVultureMeter = function(Menu, PerkWidget) if not PerkWidget.meterContainer then local f9_local0 = CoD.Perks.TopStart + CoD.Perks.IconSize * 2 local f9_local1 = -CoD.Perks.IconSize @@ -298,7 +294,7 @@ CoD.Perks.AddVultureMeter = function (Menu, PerkWidget) end end -CoD.Perks.UpdateVultureDiseaseMeter = function (Menu, ClientInstance) +CoD.Perks.UpdateVultureDiseaseMeter = function(Menu, ClientInstance) local f10_local0 = ClientInstance.newValue if Menu.meterContainer then Menu.meterContainer:setAlpha(f10_local0) @@ -306,4 +302,4 @@ CoD.Perks.UpdateVultureDiseaseMeter = function (Menu, ClientInstance) if Menu.perkGlowIcon then Menu.perkGlowIcon:setAlpha(f10_local0) end -end \ No newline at end of file +end diff --git a/ui_mp/t6/zombie/hudreimagined.lua b/ui_mp/t6/zombie/hudreimagined.lua index aadcabc9..44840d0f 100644 --- a/ui_mp/t6/zombie/hudreimagined.lua +++ b/ui_mp/t6/zombie/hudreimagined.lua @@ -1,60 +1,60 @@ CoD.Reimagined = {} -LUI.createMenu.ReimaginedArea = function (LocalClientIndex) - local safeArea = CoD.Menu.NewSafeAreaFromState("ReimaginedArea", LocalClientIndex) - safeArea:setOwner(LocalClientIndex) +LUI.createMenu.ReimaginedArea = function(LocalClientIndex) + local safeArea = CoD.Menu.NewSafeAreaFromState("ReimaginedArea", LocalClientIndex) + safeArea:setOwner(LocalClientIndex) - local x = 7 - local y = -163 - local width = 169 - local height = 13 - local bgDiff = 2 + local x = 7 + local y = -163 + local width = 169 + local height = 13 + local bgDiff = 2 - local healthBarWidget = LUI.UIElement.new() - healthBarWidget:setLeftRight(true, false, x, x) + local healthBarWidget = LUI.UIElement.new() + healthBarWidget:setLeftRight(true, false, x, x) healthBarWidget:setTopBottom(false, true, y, y) - healthBarWidget.width = width - healthBarWidget.height = height - healthBarWidget.bgDiff = bgDiff - safeArea:addElement(healthBarWidget) + healthBarWidget.width = width + healthBarWidget.height = height + healthBarWidget.bgDiff = bgDiff + safeArea:addElement(healthBarWidget) - local healthBarBg = LUI.UIImage.new() + local healthBarBg = LUI.UIImage.new() healthBarBg:setLeftRight(true, false, 0, 0 + width) healthBarBg:setTopBottom(false, true, 0, 0 + height) healthBarBg:setImage(RegisterMaterial("white")) - healthBarBg:setRGB(0, 0, 0) - healthBarBg:setAlpha(0.5) + healthBarBg:setRGB(0, 0, 0) + healthBarBg:setAlpha(0.5) healthBarWidget:addElement(healthBarBg) - healthBarWidget.healthBarBg = healthBarBg + healthBarWidget.healthBarBg = healthBarBg - local healthBar = LUI.UIImage.new() + local healthBar = LUI.UIImage.new() healthBar:setLeftRight(true, false, bgDiff, width - bgDiff) healthBar:setTopBottom(true, false, bgDiff, height - bgDiff) healthBar:setImage(RegisterMaterial("white")) - healthBar:setAlpha(1) + healthBar:setAlpha(1) healthBarWidget:addElement(healthBar) - healthBarWidget.healthBar = healthBar + healthBarWidget.healthBar = healthBar - local shieldBar = LUI.UIImage.new() + local shieldBar = LUI.UIImage.new() shieldBar:setLeftRight(true, false, bgDiff, width - bgDiff) shieldBar:setTopBottom(true, false, bgDiff, (height - bgDiff) / 2) shieldBar:setImage(RegisterMaterial("white")) - shieldBar:setRGB(0.5, 0.5, 0.5) - shieldBar:setAlpha(0) + shieldBar:setRGB(0.5, 0.5, 0.5) + shieldBar:setAlpha(0) healthBarWidget:addElement(shieldBar) - healthBarWidget.shieldBar = shieldBar + healthBarWidget.shieldBar = shieldBar - local healthText = LUI.UIText.new() - healthText:setLeftRight(true, false, width + bgDiff * 2, 0) + local healthText = LUI.UIText.new() + healthText:setLeftRight(true, false, width + bgDiff * 2, 0) healthText:setTopBottom(false, true, 0 - bgDiff, height + bgDiff) - healthText:setFont(CoD.fonts.Condensed) - healthText:setAlignment(LUI.Alignment.Left) - healthBarWidget:addElement(healthText) - healthBarWidget.healthText = healthText + healthText:setFont(CoD.fonts.Condensed) + healthText:setAlignment(LUI.Alignment.Left) + healthBarWidget:addElement(healthText) + healthBarWidget.healthText = healthText - healthBarWidget:registerEventHandler("hud_update_refresh", CoD.Reimagined.HealthBarArea.UpdateVisibility) + healthBarWidget:registerEventHandler("hud_update_refresh", CoD.Reimagined.HealthBarArea.UpdateVisibility) healthBarWidget:registerEventHandler("hud_update_bit_" .. CoD.BIT_HUD_VISIBLE, CoD.Reimagined.HealthBarArea.UpdateVisibility) - healthBarWidget:registerEventHandler("hud_update_bit_" .. CoD.BIT_IS_PLAYER_IN_AFTERLIFE, CoD.Perks.UpdateVisibility) + healthBarWidget:registerEventHandler("hud_update_bit_" .. CoD.BIT_IS_PLAYER_IN_AFTERLIFE, CoD.Perks.UpdateVisibility) healthBarWidget:registerEventHandler("hud_update_bit_" .. CoD.BIT_EMP_ACTIVE, CoD.Reimagined.HealthBarArea.UpdateVisibility) healthBarWidget:registerEventHandler("hud_update_bit_" .. CoD.BIT_DEMO_CAMERA_MODE_MOVIECAM, CoD.Reimagined.HealthBarArea.UpdateVisibility) healthBarWidget:registerEventHandler("hud_update_bit_" .. CoD.BIT_DEMO_ALL_GAME_HUD_HIDDEN, CoD.Reimagined.HealthBarArea.UpdateVisibility) @@ -69,15 +69,15 @@ LUI.createMenu.ReimaginedArea = function (LocalClientIndex) healthBarWidget:registerEventHandler("hud_update_bit_" .. CoD.BIT_PLAYER_DEAD, CoD.Reimagined.HealthBarArea.UpdateVisibility) healthBarWidget:registerEventHandler("hud_update_bit_" .. CoD.BIT_IS_SCOPED, CoD.Reimagined.HealthBarArea.UpdateVisibility) healthBarWidget:registerEventHandler("hud_update_bit_" .. CoD.BIT_IS_PLAYER_ZOMBIE, CoD.Reimagined.HealthBarArea.UpdateVisibility) - healthBarWidget:registerEventHandler("hud_update_health", CoD.Reimagined.HealthBarArea.UpdateHealthBar) + healthBarWidget:registerEventHandler("hud_update_health", CoD.Reimagined.HealthBarArea.UpdateHealthBar) - healthBarWidget.visible = true + healthBarWidget.visible = true - return safeArea + return safeArea end CoD.Reimagined.HealthBarArea = {} -CoD.Reimagined.HealthBarArea.UpdateVisibility = function (Menu, ClientInstance) +CoD.Reimagined.HealthBarArea.UpdateVisibility = function(Menu, ClientInstance) local controller = ClientInstance.controller if UIExpression.IsVisibilityBitSet(controller, CoD.BIT_HUD_VISIBLE) == 1 and UIExpression.IsVisibilityBitSet(f2_local0, CoD.BIT_IS_PLAYER_IN_AFTERLIFE) == 0 and UIExpression.IsVisibilityBitSet(controller, CoD.BIT_EMP_ACTIVE) == 0 and UIExpression.IsVisibilityBitSet(controller, CoD.BIT_DEMO_CAMERA_MODE_MOVIECAM) == 0 and UIExpression.IsVisibilityBitSet(controller, CoD.BIT_DEMO_ALL_GAME_HUD_HIDDEN) == 0 and UIExpression.IsVisibilityBitSet(controller, CoD.BIT_IN_VEHICLE) == 0 and UIExpression.IsVisibilityBitSet(controller, CoD.BIT_IN_GUIDED_MISSILE) == 0 and UIExpression.IsVisibilityBitSet(controller, CoD.BIT_IN_REMOTE_KILLSTREAK_STATIC) == 0 and UIExpression.IsVisibilityBitSet(controller, CoD.BIT_AMMO_COUNTER_HIDE) == 0 and UIExpression.IsVisibilityBitSet(controller, CoD.BIT_IS_FLASH_BANGED) == 0 and UIExpression.IsVisibilityBitSet(controller, CoD.BIT_UI_ACTIVE) == 0 and UIExpression.IsVisibilityBitSet(controller, CoD.BIT_SCOREBOARD_OPEN) == 0 and UIExpression.IsVisibilityBitSet(controller, CoD.BIT_IN_KILLCAM) == 0 and UIExpression.IsVisibilityBitSet(controller, CoD.BIT_IS_SCOPED) == 0 and UIExpression.IsVisibilityBitSet(controller, CoD.BIT_IS_PLAYER_ZOMBIE) == 0 and (not CoD.IsShoutcaster(controller) or CoD.ExeProfileVarBool(controller, "shoutcaster_scorestreaks") and Engine.IsSpectatingActiveClient(controller)) and CoD.FSM_VISIBILITY(controller) == 0 then if Menu.visible ~= true then @@ -90,23 +90,23 @@ CoD.Reimagined.HealthBarArea.UpdateVisibility = function (Menu, ClientInstance) end end -CoD.Reimagined.HealthBarArea.UpdateHealthBar = function (Menu, ClientInstance) - local health = ClientInstance.data[1] - local maxHealth = ClientInstance.data[2] - local shieldHealth = ClientInstance.data[3] - local healthPercent = health / maxHealth - local shieldHealthPercent = shieldHealth / 100 +CoD.Reimagined.HealthBarArea.UpdateHealthBar = function(Menu, ClientInstance) + local health = ClientInstance.data[1] + local maxHealth = ClientInstance.data[2] + local shieldHealth = ClientInstance.data[3] + local healthPercent = health / maxHealth + local shieldHealthPercent = shieldHealth / 100 - Menu.healthBar:setLeftRight(true, false, Menu.bgDiff, (Menu.width * healthPercent) - Menu.bgDiff) + Menu.healthBar:setLeftRight(true, false, Menu.bgDiff, (Menu.width * healthPercent) - Menu.bgDiff) - if shieldHealthPercent > 0 then - Menu.shieldBar:setAlpha(1) - Menu.shieldBar:setLeftRight(true, false, Menu.bgDiff, (Menu.width * shieldHealthPercent) - Menu.bgDiff) - Menu.healthBar:setTopBottom(true, false, (Menu.height + Menu.bgDiff) / 2, Menu.height - Menu.bgDiff) - Menu.healthText:setText(health .. " | " .. shieldHealth) - else - Menu.shieldBar:setAlpha(0) - Menu.healthBar:setTopBottom(true, false, Menu.bgDiff, Menu.height - Menu.bgDiff) - Menu.healthText:setText(health) - end -end \ No newline at end of file + if shieldHealthPercent > 0 then + Menu.shieldBar:setAlpha(1) + Menu.shieldBar:setLeftRight(true, false, Menu.bgDiff, (Menu.width * shieldHealthPercent) - Menu.bgDiff) + Menu.healthBar:setTopBottom(true, false, (Menu.height + Menu.bgDiff) / 2, Menu.height - Menu.bgDiff) + Menu.healthText:setText(health .. " | " .. shieldHealth) + else + Menu.shieldBar:setAlpha(0) + Menu.healthBar:setTopBottom(true, false, Menu.bgDiff, Menu.height - Menu.bgDiff) + Menu.healthText:setText(health) + end +end diff --git a/ui_mp/t6/zombie/otherammocounters.lua b/ui_mp/t6/zombie/otherammocounters.lua index ad0ceb15..22a642a0 100644 --- a/ui_mp/t6/zombie/otherammocounters.lua +++ b/ui_mp/t6/zombie/otherammocounters.lua @@ -5,19 +5,19 @@ CoD.OtherAmmoCounters.PulseDuration = 500 CoD.OtherAmmoCounters.NormalColor = { r = 1, g = 1, - b = 1 + b = 1, } CoD.OtherAmmoCounters.OverheatColor = { r = 1, g = 0, - b = 0 + b = 0, } CoD.OtherAmmoCounters.LowFuelColor = { r = 1, g = 1, - b = 0 + b = 0, } -CoD.OtherAmmoCounters.new = function () +CoD.OtherAmmoCounters.new = function() local Widget = LUI.UIElement.new() Widget:setLeftRight(true, true, 0, 0) Widget:setTopBottom(true, true, 0, 0) @@ -43,7 +43,7 @@ CoD.OtherAmmoCounters.new = function () return Widget end -CoD.OtherAmmoCounters.UpdateHeat = function (f2_arg0, f2_arg1) +CoD.OtherAmmoCounters.UpdateHeat = function(f2_arg0, f2_arg1) f2_arg0.ammoLabel:setText(f2_arg1.heatPercent .. "%") if f2_arg1.overheat and f2_arg0.overheat ~= true then f2_arg0.overheat = true @@ -61,7 +61,7 @@ CoD.OtherAmmoCounters.UpdateHeat = function (f2_arg0, f2_arg1) end end -CoD.OtherAmmoCounters.UpdateFuel = function (f3_arg0, f3_arg1) +CoD.OtherAmmoCounters.UpdateFuel = function(f3_arg0, f3_arg1) f3_arg0.ammoLabel:setText(f3_arg1.fuelPercent .. "%") if f3_arg1.lowFuel and f3_arg0.lowFuel ~= true then f3_arg0.lowFuel = true @@ -77,7 +77,7 @@ CoD.OtherAmmoCounters.UpdateFuel = function (f3_arg0, f3_arg1) end end -CoD.OtherAmmoCounters.ShouldHideAmmoCounter = function (f4_arg0, f4_arg1) +CoD.OtherAmmoCounters.ShouldHideAmmoCounter = function(f4_arg0, f4_arg1) if f4_arg0.weapon ~= nil then if CoD.isZombie == true and (Engine.IsWeaponType(f4_arg0.weapon, "gas") or Engine.IsOverheatWeapon(f4_arg0.weapon)) then return false @@ -86,7 +86,7 @@ CoD.OtherAmmoCounters.ShouldHideAmmoCounter = function (f4_arg0, f4_arg1) return true end -CoD.OtherAmmoCounters.UpdateVisibility = function (f5_arg0, f5_arg1) +CoD.OtherAmmoCounters.UpdateVisibility = function(f5_arg0, f5_arg1) local f5_local0 = f5_arg1.controller if f5_arg1.weapon ~= nil then f5_arg0.weapon = f5_arg1.weapon @@ -105,16 +105,16 @@ CoD.OtherAmmoCounters.UpdateVisibility = function (f5_arg0, f5_arg1) end end -CoD.OtherAmmoCounters.Ammo_PulseHigh = function (f6_arg0, f6_arg1) +CoD.OtherAmmoCounters.Ammo_PulseHigh = function(f6_arg0, f6_arg1) if f6_arg1.interrupted ~= true then f6_arg0:beginAnimation("pluse_low", CoD.OtherAmmoCounters.LowAmmoFadeTime, true, false) f6_arg0:setAlpha(1) end end -CoD.OtherAmmoCounters.Ammo_PulseLow = function (f7_arg0, f7_arg1) +CoD.OtherAmmoCounters.Ammo_PulseLow = function(f7_arg0, f7_arg1) if f7_arg1.interrupted ~= true then f7_arg0:beginAnimation("pulse_high", CoD.OtherAmmoCounters.LowAmmoFadeTime, false, true) f7_arg0:setAlpha(0.5) end -end \ No newline at end of file +end