1
0
mirror of https://github.com/JezuzLizard/BO2-Reimagined.git synced 2025-06-09 23:02:53 -05:00

Format Lua

This commit is contained in:
Jbleezy
2024-01-20 17:50:15 -08:00
parent eadd8d8a17
commit 2caf123c8b
18 changed files with 537 additions and 543 deletions

1
.gitignore vendored
View File

@ -1,4 +1,5 @@
/.vscode
stylua.toml
*.ff
*.iwd
*.dds

View File

@ -227,7 +227,7 @@ CoD.MainLobby.OpenTheaterLobby = function (MainLobbyWidget, ClientInstance)
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,7 +236,7 @@ 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
@ -569,7 +569,7 @@ CoD.MainLobby.Update = function (MainLobbyWidget, ClientInstance)
return
elseif UIExpression.IsDemonwareFetchingDone(ClientInstance.controller) == 1 == true then
MainLobbyWidget.panelManager:processEvent({
name = "fetching_done"
name = "fetching_done",
})
end
CoD.MainLobby.UpdateButtonPaneButtonVisibilty(MainLobbyWidget.buttonPane)
@ -601,12 +601,12 @@ CoD.MainLobby.Back = function (MainLobbyWidget, ClientInstance)
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)
@ -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
@ -653,7 +653,7 @@ end
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
@ -680,11 +680,11 @@ CoD.MainLobby.GoToFindingGames_Zombie = function (MainLobbyWidget, ClientInstanc
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()
@ -769,7 +769,7 @@ LUI.createMenu.MainLobby = function (LocalClientIndex)
end
else
MainLobbyWidget.buttonPane.body.theaterButton:processEvent({
name = "gain_focus"
name = "gain_focus",
})
end
end
@ -833,7 +833,7 @@ end
CoD.MainLobby.OpenModsList = function(MainLobbyWidget, ClientInstance)
MainLobbyWidget:openMenu("Mods", ClientInstance.controller, {
parent = "MainLobby"
parent = "MainLobby",
})
MainLobbyWidget:close()
end

View File

@ -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)
@ -186,7 +186,7 @@ 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))))
@ -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)
@ -359,7 +359,7 @@ end
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
@ -370,7 +370,7 @@ end
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

View File

@ -68,8 +68,8 @@ 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
function HUD_IngameMenuClosed() end
LUI.createMenu.HUD = function(LocalClientIndex)
local HUDWidget = CoD.Menu.NewFromState("HUD", {
@ -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()
@ -137,11 +137,11 @@ 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)
@ -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
@ -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,7 +635,7 @@ function HUD_StopKillcamHud(HUDWidget, ClientInstance)
if f30_local0 then
f30_local0:processEvent({
name = "killcam_close",
controller = ClientInstance.controller
controller = ClientInstance.controller,
})
end
end
@ -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)
@ -739,7 +739,6 @@ HUD_UpdateKillstreakHud = function (HUDWidget, ClientInstance)
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
@ -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)
@ -909,7 +906,7 @@ 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

View File

@ -5,10 +5,10 @@ CoD.AmmoCounter.PulseDuration = 500
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)

View File

@ -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
@ -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
@ -289,7 +289,7 @@ local ClientInputSourceChangedCallback = function (ScoreboardWidget, ClientInsta
end
LUI.createMenu.Scoreboard = function(LocalClientIndex)
local BodyVerticalOffset = f0_local41;
local BodyVerticalOffset = f0_local41
if CoD.isZombie == true then
IsDLCMap2 = CoD.Zombie.IsDLCMap(CoD.Zombie.DLC2Maps)
IsDLCMap4 = CoD.Zombie.IsDLCMap(CoD.Zombie.DLC4Maps)
@ -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)
@ -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

View File

@ -15,11 +15,11 @@ 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)

View File

@ -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
@ -340,7 +340,7 @@ CoD.PrivateGameLobby.ButtonGainFocusZombie = function (GametypeSettingButton, Cl
GametypeSettingButton:dispatchEventToParent({
name = "enable_sliding_zm",
enableSliding = false,
controller = ClientInstance.controller
controller = ClientInstance.controller,
})
end
@ -349,7 +349,7 @@ CoD.PrivateGameLobby.ButtonLoseFocusZombie = function (GametypeSettingButton, Cl
GametypeSettingButton:dispatchEventToParent({
name = "enable_sliding_zm",
enableSliding = true,
controller = ClientInstance.controller
controller = ClientInstance.controller,
})
end
@ -422,7 +422,7 @@ CoD.PrivateGameLobby.LeaveLobby_Project_Multiplayer = function (PrivateGameLobby
end
Engine.SessionModeSetPrivate(false)
PrivateGameLobbyWidget:processEvent({
name = "lose_host"
name = "lose_host",
})
PrivateGameLobbyWidget:goBack(ClientInstance)
end
@ -430,7 +430,7 @@ end
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
@ -478,7 +478,7 @@ 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

View File

@ -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
@ -471,9 +471,7 @@ CoD.AmmoAreaZombie.UpdateAmmo = function (f6_arg0, f6_arg1)
end
end
CoD.AmmoAreaZombie.UpdateFuel = function (f7_arg0, f7_arg1)
end
CoD.AmmoAreaZombie.UpdateFuel = function(f7_arg0, f7_arg1) end
CoD.AmmoAreaZombie.UpdateOverheat = function(f8_arg0, f8_arg1)
if CoD.AmmoAreaZombie.ShouldHideOverheatCounter(f8_arg0, f8_arg1) then

View File

@ -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,55 +76,55 @@ 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
@ -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)

View File

@ -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")
@ -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
@ -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
@ -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)

View File

@ -9,52 +9,52 @@ 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
@ -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
@ -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,7 +245,6 @@ CoD.Perks.Update = function (Menu, ClientInstance)
end
end
if ClientInstance.newValue == CoD.Perks.STATE_TBD then
end
end
end

View File

@ -5,17 +5,17 @@ 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()
local Widget = LUI.UIElement.new()