1
0
mirror of https://github.com/JezuzLizard/BO2-Reimagined.git synced 2025-06-07 21:59:49 -05:00

Origins: show which table the gramophone is placed at

This commit is contained in:
Jbleezy 2024-01-28 22:21:24 -08:00
parent 29b117b955
commit 37480ddda6
7 changed files with 439 additions and 0 deletions

View File

@ -915,6 +915,7 @@
* Shovels automatically picked up
* Records automatically picked up
* Gramophone initially spawns at Excavation Site gramophone table
* Musical parts on HUD change record color to show which table the gramophone is currently placed at
* Musical parts on HUD fade out
* Added attachment name on HUD for upgraded attachment weapons
* Generators: increased capture reward points from 100 to 200

View File

@ -0,0 +1,82 @@
#include clientscripts\mp\zm_tomb_craftables;
#include clientscripts\mp\zombies\_zm_utility;
#include clientscripts\mp\zombies\_zm_craftables;
register_clientfields()
{
bits = 1;
registerclientfield("world", "piece_quadrotor_zm_body", 14000, bits, "int", undefined, 0);
registerclientfield("world", "piece_quadrotor_zm_brain", 14000, bits, "int", undefined, 0);
registerclientfield("world", "piece_quadrotor_zm_engine", 14000, bits, "int", undefined, 0);
setupclientfieldcodecallbacks("world", 1, "piece_quadrotor_zm_body");
setupclientfieldcodecallbacks("world", 1, "piece_quadrotor_zm_brain");
setupclientfieldcodecallbacks("world", 1, "piece_quadrotor_zm_engine");
registerclientfield("world", "piece_riotshield_dolly", 14000, bits, "int", undefined, 0);
registerclientfield("world", "piece_riotshield_door", 14000, bits, "int", undefined, 0);
registerclientfield("world", "piece_riotshield_clamp", 14000, bits, "int", undefined, 0);
setupclientfieldcodecallbacks("world", 1, "piece_riotshield_dolly");
setupclientfieldcodecallbacks("world", 1, "piece_riotshield_door");
setupclientfieldcodecallbacks("world", 1, "piece_riotshield_clamp");
registerclientfield("world", "piece_staff_zm_gem_air", 14000, bits, "int", undefined, 0);
registerclientfield("world", "piece_staff_zm_ustaff_air", 14000, bits, "int", undefined, 0);
registerclientfield("world", "piece_staff_zm_mstaff_air", 14000, bits, "int", undefined, 0);
registerclientfield("world", "piece_staff_zm_lstaff_air", 14000, bits, "int", undefined, 0);
setupclientfieldcodecallbacks("world", 1, "piece_staff_zm_gem_air");
setupclientfieldcodecallbacks("world", 1, "piece_staff_zm_ustaff_air");
setupclientfieldcodecallbacks("world", 1, "piece_staff_zm_mstaff_air");
setupclientfieldcodecallbacks("world", 1, "piece_staff_zm_lstaff_air");
registerclientfield("world", "piece_staff_zm_gem_fire", 14000, bits, "int", undefined, 0);
registerclientfield("world", "piece_staff_zm_ustaff_fire", 14000, bits, "int", undefined, 0);
registerclientfield("world", "piece_staff_zm_mstaff_fire", 14000, bits, "int", undefined, 0);
registerclientfield("world", "piece_staff_zm_lstaff_fire", 14000, bits, "int", undefined, 0);
setupclientfieldcodecallbacks("world", 1, "piece_staff_zm_gem_fire");
setupclientfieldcodecallbacks("world", 1, "piece_staff_zm_ustaff_fire");
setupclientfieldcodecallbacks("world", 1, "piece_staff_zm_mstaff_fire");
setupclientfieldcodecallbacks("world", 1, "piece_staff_zm_lstaff_fire");
registerclientfield("world", "piece_staff_zm_gem_lightning", 14000, bits, "int", undefined, 0);
registerclientfield("world", "piece_staff_zm_ustaff_lightning", 14000, bits, "int", undefined, 0);
registerclientfield("world", "piece_staff_zm_mstaff_lightning", 14000, bits, "int", undefined, 0);
registerclientfield("world", "piece_staff_zm_lstaff_lightning", 14000, bits, "int", undefined, 0);
setupclientfieldcodecallbacks("world", 1, "piece_staff_zm_gem_lightning");
setupclientfieldcodecallbacks("world", 1, "piece_staff_zm_ustaff_lightning");
setupclientfieldcodecallbacks("world", 1, "piece_staff_zm_mstaff_lightning");
setupclientfieldcodecallbacks("world", 1, "piece_staff_zm_lstaff_lightning");
registerclientfield("world", "piece_staff_zm_gem_water", 14000, bits, "int", undefined, 0);
registerclientfield("world", "piece_staff_zm_ustaff_water", 14000, bits, "int", undefined, 0);
registerclientfield("world", "piece_staff_zm_mstaff_water", 14000, bits, "int", undefined, 0);
registerclientfield("world", "piece_staff_zm_lstaff_water", 14000, bits, "int", undefined, 0);
setupclientfieldcodecallbacks("world", 1, "piece_staff_zm_gem_water");
setupclientfieldcodecallbacks("world", 1, "piece_staff_zm_ustaff_water");
setupclientfieldcodecallbacks("world", 1, "piece_staff_zm_mstaff_water");
setupclientfieldcodecallbacks("world", 1, "piece_staff_zm_lstaff_water");
registerclientfield("world", "piece_record_zm_player", 14000, bits, "int", undefined, 0);
registerclientfield("world", "piece_record_zm_vinyl_master", 14000, 3, "int", undefined, 0);
registerclientfield("world", "piece_record_zm_vinyl_air", 14000, bits, "int", undefined, 0);
registerclientfield("world", "piece_record_zm_vinyl_water", 14000, bits, "int", undefined, 0);
registerclientfield("world", "piece_record_zm_vinyl_fire", 14000, bits, "int", undefined, 0);
registerclientfield("world", "piece_record_zm_vinyl_lightning", 14000, bits, "int", undefined, 0);
setupclientfieldcodecallbacks("world", 1, "piece_record_zm_player");
setupclientfieldcodecallbacks("world", 1, "piece_record_zm_vinyl_master");
setupclientfieldcodecallbacks("world", 1, "piece_record_zm_vinyl_air");
setupclientfieldcodecallbacks("world", 1, "piece_record_zm_vinyl_water");
setupclientfieldcodecallbacks("world", 1, "piece_record_zm_vinyl_fire");
setupclientfieldcodecallbacks("world", 1, "piece_record_zm_vinyl_lightning");
bits = getminbitcountfornum(5);
registerclientfield("world", "staff_player1", 14000, bits, "int", undefined, 0, 1);
registerclientfield("world", "staff_player2", 14000, bits, "int", undefined, 0, 1);
registerclientfield("world", "staff_player3", 14000, bits, "int", undefined, 0, 1);
registerclientfield("world", "staff_player4", 14000, bits, "int", undefined, 0, 1);
setupclientfieldcodecallbacks("world", 1, "staff_player1");
setupclientfieldcodecallbacks("world", 1, "staff_player2");
setupclientfieldcodecallbacks("world", 1, "staff_player3");
setupclientfieldcodecallbacks("world", 1, "staff_player4");
bits = getminbitcountfornum(5);
registerclientfield("world", "quest_state1", 14000, bits, "int", undefined, 0, 1);
registerclientfield("world", "quest_state2", 14000, bits, "int", undefined, 0, 1);
registerclientfield("world", "quest_state3", 14000, bits, "int", undefined, 0, 1);
registerclientfield("world", "quest_state4", 14000, bits, "int", undefined, 0, 1);
setupclientfieldcodecallbacks("world", 1, "quest_state1");
setupclientfieldcodecallbacks("world", 1, "quest_state2");
setupclientfieldcodecallbacks("world", 1, "quest_state3");
setupclientfieldcodecallbacks("world", 1, "quest_state4");
}

View File

@ -51,6 +51,53 @@ init_craftables()
level.n_staffs_crafted = 0;
}
register_clientfields()
{
bits = 1;
registerclientfield("world", "piece_quadrotor_zm_body", 14000, bits, "int", undefined, 0);
registerclientfield("world", "piece_quadrotor_zm_brain", 14000, bits, "int", undefined, 0);
registerclientfield("world", "piece_quadrotor_zm_engine", 14000, bits, "int", undefined, 0);
registerclientfield("world", "piece_riotshield_dolly", 14000, bits, "int", undefined, 0);
registerclientfield("world", "piece_riotshield_door", 14000, bits, "int", undefined, 0);
registerclientfield("world", "piece_riotshield_clamp", 14000, bits, "int", undefined, 0);
registerclientfield("world", "piece_staff_zm_gem_air", 14000, bits, "int", undefined, 0);
registerclientfield("world", "piece_staff_zm_ustaff_air", 14000, bits, "int", undefined, 0);
registerclientfield("world", "piece_staff_zm_mstaff_air", 14000, bits, "int", undefined, 0);
registerclientfield("world", "piece_staff_zm_lstaff_air", 14000, bits, "int", undefined, 0);
registerclientfield("world", "piece_staff_zm_gem_fire", 14000, bits, "int", undefined, 0);
registerclientfield("world", "piece_staff_zm_ustaff_fire", 14000, bits, "int", undefined, 0);
registerclientfield("world", "piece_staff_zm_mstaff_fire", 14000, bits, "int", undefined, 0);
registerclientfield("world", "piece_staff_zm_lstaff_fire", 14000, bits, "int", undefined, 0);
registerclientfield("world", "piece_staff_zm_gem_lightning", 14000, bits, "int", undefined, 0);
registerclientfield("world", "piece_staff_zm_ustaff_lightning", 14000, bits, "int", undefined, 0);
registerclientfield("world", "piece_staff_zm_mstaff_lightning", 14000, bits, "int", undefined, 0);
registerclientfield("world", "piece_staff_zm_lstaff_lightning", 14000, bits, "int", undefined, 0);
registerclientfield("world", "piece_staff_zm_gem_water", 14000, bits, "int", undefined, 0);
registerclientfield("world", "piece_staff_zm_ustaff_water", 14000, bits, "int", undefined, 0);
registerclientfield("world", "piece_staff_zm_mstaff_water", 14000, bits, "int", undefined, 0);
registerclientfield("world", "piece_staff_zm_lstaff_water", 14000, bits, "int", undefined, 0);
registerclientfield("world", "piece_record_zm_player", 14000, bits, "int", undefined, 0);
registerclientfield("world", "piece_record_zm_vinyl_master", 14000, 3, "int", undefined, 0);
registerclientfield("world", "piece_record_zm_vinyl_air", 14000, bits, "int", undefined, 0);
registerclientfield("world", "piece_record_zm_vinyl_water", 14000, bits, "int", undefined, 0);
registerclientfield("world", "piece_record_zm_vinyl_fire", 14000, bits, "int", undefined, 0);
registerclientfield("world", "piece_record_zm_vinyl_lightning", 14000, bits, "int", undefined, 0);
registerclientfield("scriptmover", "element_glow_fx", 14000, 4, "int", undefined, 0);
registerclientfield("scriptmover", "bryce_cake", 14000, 2, "int", undefined, 0);
registerclientfield("scriptmover", "switch_spark", 14000, 1, "int", undefined, 0);
bits = getminbitcountfornum(5);
registerclientfield("world", "staff_player1", 14000, bits, "int", undefined, 0);
registerclientfield("world", "staff_player2", 14000, bits, "int", undefined, 0);
registerclientfield("world", "staff_player3", 14000, bits, "int", undefined, 0);
registerclientfield("world", "staff_player4", 14000, bits, "int", undefined, 0);
bits = getminbitcountfornum(5);
registerclientfield("world", "quest_state1", 14000, bits, "int", undefined, 0);
registerclientfield("world", "quest_state2", 14000, bits, "int", undefined, 0);
registerclientfield("world", "quest_state3", 14000, bits, "int", undefined, 0);
registerclientfield("world", "quest_state4", 14000, bits, "int", undefined, 0);
registerclientfield("toplayer", "sndMudSlow", 14000, 1, "int");
}
include_craftables()
{
level thread run_craftables_devgui();

View File

@ -524,6 +524,7 @@ run_gramophone_teleporter(str_vinyl_record)
self.gramophone_model.angles = self.angles;
self.gramophone_model setmodel("p6_zm_tm_gramophone");
level setclientfield("piece_record_zm_player", 0);
level setclientfield("piece_record_zm_vinyl_master", self.script_int + 1);
flag_set("gramophone_placed");
foreach (trigger in level.gramophone_teleporter_triggers)
@ -560,6 +561,7 @@ run_gramophone_teleporter(str_vinyl_record)
player playsound("zmb_craftable_pickup");
flag_clear("gramophone_placed");
level setclientfield("piece_record_zm_player", 1);
level setclientfield("piece_record_zm_vinyl_master", 1);
break;
}
}

View File

@ -3,5 +3,6 @@
main()
{
replaceFunc(clientscripts\mp\zm_tomb_craftables::register_clientfields, scripts\zm\replaced\zm_tomb_craftables::register_clientfields);
replaceFunc(clientscripts\mp\zombies\_zm_ai_mechz::mechzfootstepcbfunc, scripts\zm\replaced\_zm_ai_mechz::mechzfootstepcbfunc);
}

View File

@ -0,0 +1,305 @@
require("T6.Zombie.CraftablesIcon")
CoD.PersistentItemTombDisplay = {}
CoD.PersistentItemTombDisplay.IconSize = 48
CoD.PersistentItemTombDisplay.FontName = CoD.CraftablesIcon.FontName
CoD.PersistentItemTombDisplay.ContainerSize = CoD.PersistentItemTombDisplay.IconSize + CoD.textSize[CoD.PersistentItemTombDisplay.FontName] + 5
CoD.PersistentItemTombDisplay.IconSpacing = 5
CoD.PersistentItemTombDisplay.NeedItemAlpha = 0.2
CoD.PersistentItemTombDisplay.CrossoutAlpha = 0.75
CoD.PersistentItemTombDisplay.glowBackColor = {}
CoD.PersistentItemTombDisplay.glowBackColor.r = 1
CoD.PersistentItemTombDisplay.glowBackColor.g = 1
CoD.PersistentItemTombDisplay.glowBackColor.b = 1
CoD.PersistentItemTombDisplay.glowFrontColor = {}
CoD.PersistentItemTombDisplay.glowFrontColor.r = 1
CoD.PersistentItemTombDisplay.glowFrontColor.g = 1
CoD.PersistentItemTombDisplay.glowFrontColor.b = 1
CoD.PersistentItemTombDisplay.MOVING_DURATION = 500
CoD.PersistentItemTombDisplay.ONSCREEN_DURATION = 5000
CoD.PersistentItemTombDisplay.FADE_OUT_DURATION = 500
CoD.PersistentItemTombDisplay.ClientFieldName = "craftable"
CoD.PersistentItemTombDisplay.PersistentClientFieldName = "persistent_gem"
CoD.PersistentItemTombDisplay.CRAFTABLE_ITEM_NONE = 0
CoD.PersistentItemTombDisplay.CRAFTABLE_ITEM_FIRE = 1
CoD.PersistentItemTombDisplay.CRAFTABLE_ITEM_AIR = 2
CoD.PersistentItemTombDisplay.CRAFTABLE_ITEM_LIGHTNING = 3
CoD.PersistentItemTombDisplay.CRAFTABLE_ITEM_WATER = 4
CoD.PersistentItemTombDisplay.STATE_NOT_HOLDING = 0
CoD.PersistentItemTombDisplay.STATE_HOLDING = 1
CoD.PersistentItemTombDisplay.ClientFieldNames = {}
CoD.PersistentItemTombDisplay.ClientFieldNames[1] = {
clientFieldName = "piece_record_zm_player",
materialName = "zom_hud_craftable_gramophone",
iconStartAlpha = CoD.PersistentItemTombDisplay.NeedItemAlpha,
}
CoD.PersistentItemTombDisplay.ClientFieldNames[2] = {
clientFieldName = "piece_record_zm_vinyl_master",
materialName = "zom_hud_craftable_record",
iconStartAlpha = CoD.PersistentItemTombDisplay.NeedItemAlpha,
}
CoD.PersistentItemTombDisplay.ClientFieldNames[3] = {
clientFieldName = CoD.PersistentItemTombDisplay.PersistentClientFieldName,
materialName = "white",
iconStartAlpha = 0,
}
CoD.PersistentItemTombDisplay.GemClientFieldNames = {}
CoD.PersistentItemTombDisplay.GemClientFieldNames[1] = {
clientFieldName = "piece_staff_zm_gem_fire",
materialName = "zom_hud_craftable_element_fire",
}
CoD.PersistentItemTombDisplay.GemClientFieldNames[2] = {
clientFieldName = "piece_staff_zm_gem_air",
materialName = "zom_hud_craftable_element_wind",
}
CoD.PersistentItemTombDisplay.GemClientFieldNames[3] = {
clientFieldName = "piece_staff_zm_gem_lightning",
materialName = "zom_hud_craftable_element_lightning",
}
CoD.PersistentItemTombDisplay.GemClientFieldNames[4] = {
clientFieldName = "piece_staff_zm_gem_water",
materialName = "zom_hud_craftable_element_water",
}
CoD.PersistentItemTombDisplay.QuestItemName = Engine.Localize("ZM_TOMB_EQUIPMENT")
CoD.PersistentItemTombDisplay.new = function(f1_arg0)
f1_arg0.id = f1_arg0.id .. ".PersistentItemTombDisplay"
for f1_local0 = 1, #CoD.PersistentItemTombDisplay.ClientFieldNames, 1 do
if not CoD.PersistentItemTombDisplay.ClientFieldNames[f1_local0].material then
CoD.PersistentItemTombDisplay.ClientFieldNames[f1_local0].material = RegisterMaterial(CoD.PersistentItemTombDisplay.ClientFieldNames[f1_local0].materialName)
end
end
CoD.PersistentItemTombDisplay.StatusStates = {
-1,
-1,
}
CoD.PersistentItemTombDisplay.GemStatusStates = {}
CoD.PersistentItemTombDisplay.GemStatusStates[1] = {
gemIndex = #CoD.PersistentItemTombDisplay.StatusStates + 1,
}
f1_arg0:registerEventHandler("persistent_status_group_fade_out", CoD.PersistentItemTombDisplay.FadeoutQuestStatusContainer)
CoD.PersistentItemTombDisplay.QuestClientFieldCount = #CoD.PersistentItemTombDisplay.ClientFieldNames
for f1_local0 = 1, CoD.PersistentItemTombDisplay.QuestClientFieldCount, 1 do
f1_arg0:registerEventHandler(CoD.PersistentItemTombDisplay.ClientFieldNames[f1_local0].clientFieldName, CoD.PersistentItemTombDisplay.UpdateQuest)
end
f1_arg0:registerEventHandler(CoD.PersistentItemTombDisplay.ClientFieldName, CoD.PersistentItemTombDisplay.PersistentIconUpdate)
for f1_local0 = 1, #CoD.PersistentItemTombDisplay.GemClientFieldNames, 1 do
if not CoD.PersistentItemTombDisplay.GemClientFieldNames[f1_local0].material then
CoD.PersistentItemTombDisplay.GemClientFieldNames[f1_local0].material = RegisterMaterial(CoD.PersistentItemTombDisplay.GemClientFieldNames[f1_local0].materialName)
end
end
f1_arg0.visible = true
return f1_arg0
end
CoD.PersistentItemTombDisplay.AddPersistentStatusDisplay = function(f2_arg0, f2_arg1, f2_arg2, f2_arg3, f2_arg4)
local f2_local0 = 0
local f2_local1 = 0
local f2_local2 = 0
local f2_local3 = 0
local f2_local4 = 0
if not f2_arg4 then
f2_arg4 = 0
end
local f2_local5 = CoD.PersistentItemTombDisplay.QuestClientFieldCount
f2_local4 = CoD.PersistentItemTombDisplay.IconSize * f2_local5 + CoD.PersistentItemTombDisplay.IconSpacing * (f2_local5 - 1)
local self = LUI.UIElement.new()
self:setLeftRight(true, false, f2_local1, f2_local1 + f2_local4)
self:setTopBottom(true, false, f2_local2, f2_local2 + CoD.PersistentItemTombDisplay.ContainerSize + f2_arg4)
if not f2_arg2 then
self:setAlpha(0)
end
f2_arg0.questStatusContainer = self
if f2_arg2 == true and f2_arg3 then
local f2_local7 = LUI.UIImage.new()
f2_local7:setLeftRight(true, true, -f2_arg3, f2_arg3)
f2_local7:setTopBottom(true, true, -f2_arg3, f2_arg3)
f2_local7:setRGB(0, 0, 0)
f2_local7:setAlpha(0.7)
self:addElement(f2_local7)
end
if not CoD.Zombie.LocalSplitscreenMultiplePlayers then
local f2_local7 = LUI.UIText.new()
f2_local7:setLeftRight(true, false, 0, 250)
f2_local7:setTopBottom(true, false, 0, CoD.textSize[CoD.PersistentItemTombDisplay.FontName])
f2_local7:setFont(CoD.fonts[CoD.PersistentItemTombDisplay.FontName])
f2_local7:setAlignment(LUI.Alignment.Left)
self:addElement(f2_local7)
f2_local7:setText(CoD.PersistentItemTombDisplay.QuestItemName)
end
local f2_local7 = 0
f2_arg0.statusIcons = {}
for f2_local8 = 1, CoD.PersistentItemTombDisplay.QuestClientFieldCount, 1 do
local f2_local11 = LUI.UIElement.new()
f2_local11:setLeftRight(true, false, f2_local7, f2_local7 + CoD.PersistentItemTombDisplay.IconSize)
f2_local11:setTopBottom(false, true, -CoD.PersistentItemTombDisplay.IconSize, 0)
if not f2_arg2 then
f2_local11:setAlpha(0)
end
self:addElement(f2_local11)
CoD.CraftablesIcon.new(f2_local11, CoD.PersistentItemTombDisplay.glowBackColor, CoD.PersistentItemTombDisplay.glowFrontColor)
local f2_local12 = LUI.UIImage.new()
f2_local12:setLeftRight(true, true, 0, 0)
f2_local12:setTopBottom(true, true, 0, 0)
f2_local12:setImage(CoD.PersistentItemTombDisplay.ClientFieldNames[f2_local8].material)
f2_local12:setAlpha(CoD.PersistentItemTombDisplay.ClientFieldNames[f2_local8].iconStartAlpha)
f2_local11.icon = f2_local12
f2_local11:addElement(f2_local12)
f2_arg0.statusIcons[f2_local8] = f2_local11
f2_arg0.statusIcons[f2_local8].clientFieldName = CoD.PersistentItemTombDisplay.ClientFieldNames[f2_local8].clientFieldName
f2_local7 = f2_local7 + CoD.PersistentItemTombDisplay.IconSize + CoD.PersistentItemTombDisplay.IconSpacing
end
CoD.PersistentItemTombDisplay.StatusIconsCount = #f2_arg0.statusIcons
f2_arg0:addElement(self)
return f2_local0 + f2_local4 + f2_arg1
end
CoD.PersistentItemTombDisplay.UpdateQuest = function(f3_arg0, f3_arg1)
CoD.PersistentItemTombDisplay.UpdateQuestStatus(f3_arg0, f3_arg1)
CoD.PersistentItemTombDisplay.UpdateQuestContainerAndTitle(f3_arg0, f3_arg1, 1)
end
CoD.PersistentItemTombDisplay.UpdateQuestContainerAndTitle = function(f4_arg0, f4_arg1, updateRecord)
if f4_arg1.oldValue ~= 0 or f4_arg1.newValue ~= 0 then
if updateRecord ~= nil then
if f4_arg1.newValue <= 1 then
f4_arg0.statusIcons[2].icon:setRGB(1, 1, 1)
else
local recordColor = CoD.QuestItemTombDisplay.ClientFieldNames[f4_arg1.newValue - 1].color
f4_arg0.statusIcons[2].icon:setRGB(recordColor.r, recordColor.g, recordColor.b)
end
end
if f4_arg0.questStatusContainer then
f4_arg0.questStatusContainer:beginAnimation("fade_in", CoD.PersistentItemTombDisplay.FADE_OUT_DURATION)
f4_arg0.questStatusContainer:setAlpha(1)
end
if f4_arg0.persQuestTitle then
f4_arg0.persQuestTitle:beginAnimation("fade_in", CoD.PersistentItemTombDisplay.FADE_OUT_DURATION)
f4_arg0.persQuestTitle:setAlpha(1)
end
end
if f4_arg0.shouldFadeOutQuestStatus then
CoD.PersistentItemTombDisplay.AddFadeOutTimer(f4_arg0)
end
end
CoD.PersistentItemTombDisplay.PersistentIconUpdate = function(f5_arg0, f5_arg1)
local f5_local0 = f5_arg1.newValue
local f5_local1 = f5_arg1.name
local f5_local2 = CoD.PersistentItemTombDisplay.GetCurrentStatusIndex(f5_arg0, CoD.PersistentItemTombDisplay.PersistentClientFieldName)
local f5_local3 = f5_arg0.statusIcons[f5_local2]
CoD.PersistentItemTombDisplay.GemStatusStates[CoD.PersistentItemTombDisplay.GetCurrentGemIndex(f5_local2)].currentState = f5_local0
if not f5_local3 then
return
else
CoD.PersistentItemTombDisplay.UpdateQuestContainerAndTitle(f5_arg0, f5_arg1)
CoD.PersistentItemTombDisplay.UpdatePersistentGemIconStates(f5_local3, f5_local0)
end
end
CoD.PersistentItemTombDisplay.ScoreboardUpdate = function(f6_arg0, f6_arg1)
if f6_arg0.questStatusContainer then
for f6_local0 = 1, #CoD.PersistentItemTombDisplay.StatusStates, 1 do
CoD.PersistentItemTombDisplay.UpdateQuestStates(f6_arg0.statusIcons[f6_local0], CoD.PersistentItemTombDisplay.StatusStates[f6_local0])
end
local f6_local0 = CoD.PersistentItemTombDisplay.GetCurrentStatusIndex(f6_arg0, CoD.PersistentItemTombDisplay.PersistentClientFieldName)
CoD.PersistentItemTombDisplay.UpdatePersistentGemIconStates(f6_arg0.statusIcons[f6_local0], CoD.PersistentItemTombDisplay.GemStatusStates[CoD.PersistentItemTombDisplay.GetCurrentGemIndex(f6_local0)].currentState)
end
end
CoD.PersistentItemTombDisplay.AddFadeOutTimer = function(f7_arg0)
if f7_arg0.questStatusContainer then
if f7_arg0.fadeOutTimer then
f7_arg0.fadeOutTimer:close()
f7_arg0.fadeOutTimer:reset()
end
f7_arg0.fadeOutTimer = LUI.UITimer.new(CoD.PersistentItemTombDisplay.ONSCREEN_DURATION, "persistent_status_group_fade_out", true, f7_arg0)
f7_arg0:addElement(f7_arg0.fadeOutTimer)
end
end
CoD.PersistentItemTombDisplay.FadeoutQuestStatusContainer = function(f8_arg0, f8_arg1)
if f8_arg0.questStatusContainer then
f8_arg0.questStatusContainer:beginAnimation("fade_out", CoD.PersistentItemTombDisplay.FADE_OUT_DURATION)
f8_arg0.questStatusContainer:setAlpha(0)
end
if f8_arg0.persQuestTitle then
f8_arg0.persQuestTitle:beginAnimation("fade_out", CoD.PersistentItemTombDisplay.FADE_OUT_DURATION)
f8_arg0.persQuestTitle:setAlpha(0)
end
end
CoD.PersistentItemTombDisplay.UpdateQuestStatus = function(f9_arg0, f9_arg1)
local f9_local0 = f9_arg1.newValue
local f9_local1 = f9_arg1.oldValue
local f9_local2 = CoD.PersistentItemTombDisplay.GetCurrentStatusIndex(f9_arg0, f9_arg1.name)
CoD.PersistentItemTombDisplay.StatusStates[f9_local2] = f9_local0
if not f9_arg0.statusIcons then
return
end
local f9_local3 = f9_arg0.statusIcons[f9_local2]
if not f9_local3 then
return
elseif f9_arg0.highlightRecentItem then
if f9_local3.highlight.alternatorTimer then
f9_local3.highlight:closeStateAlternator()
end
if f9_local1 < f9_local0 then
f9_local3.highlight:alternateStates(CoD.PersistentItemTombDisplay.ONSCREEN_DURATION, CoD.CraftablesIcon.PulseRedBright, CoD.CraftablesIcon.PulseRedLow, 500, 500, CoD.CraftablesIcon.PulseWhite)
end
end
CoD.PersistentItemTombDisplay.UpdateQuestStates(f9_local3, f9_local0)
end
CoD.PersistentItemTombDisplay.UpdateQuestStates = function(f10_arg0, f10_arg1)
if f10_arg1 == CoD.PersistentItemTombDisplay.STATE_NOT_HOLDING then
f10_arg0:setAlpha(1)
f10_arg0.icon:setAlpha(CoD.PersistentItemTombDisplay.NeedItemAlpha)
elseif f10_arg1 == CoD.PersistentItemTombDisplay.STATE_HOLDING then
f10_arg0:setAlpha(1)
f10_arg0.icon:setAlpha(1)
f10_arg0.icon:setRGB(1, 1, 1)
else
local recordColor = CoD.QuestItemTombDisplay.ClientFieldNames[f10_arg1 - 1].color
f10_arg0:setAlpha(1)
f10_arg0.icon:setAlpha(1)
f10_arg0.icon:setRGB(recordColor.r, recordColor.g, recordColor.b)
end
end
CoD.PersistentItemTombDisplay.UpdatePersistentGemIconStates = function(f11_arg0, f11_arg1)
if f11_arg1 == CoD.PersistentItemTombDisplay.CRAFTABLE_ITEM_FIRE or f11_arg1 == CoD.PersistentItemTombDisplay.CRAFTABLE_ITEM_AIR or f11_arg1 == CoD.PersistentItemTombDisplay.CRAFTABLE_ITEM_LIGHTNING or f11_arg1 == CoD.PersistentItemTombDisplay.CRAFTABLE_ITEM_WATER then
f11_arg0:setAlpha(1)
f11_arg0.icon:setAlpha(1)
f11_arg0.icon:setImage(CoD.PersistentItemTombDisplay.GemClientFieldNames[f11_arg1].material)
else
f11_arg0:setAlpha(0)
end
end
CoD.PersistentItemTombDisplay.UpdateHighlight = function(f12_arg0, f12_arg1, f12_arg2)
if f12_arg0.showPlayerHighlight and f12_arg0.statusIcons then
for f12_local0 = 1, #f12_arg0.statusIcons, 1 do
f12_arg0.statusIcons[f12_local0].highlight:setAlpha(0.1)
end
if f12_arg2 > 0 and f12_arg2 <= #f12_arg0.statusIcons then
f12_arg0.statusIcons[f12_arg2].highlight:setAlpha(1)
end
end
end
CoD.PersistentItemTombDisplay.GetCurrentStatusIndex = function(f13_arg0, f13_arg1)
for f13_local0 = 1, #CoD.PersistentItemTombDisplay.ClientFieldNames, 1 do
if CoD.PersistentItemTombDisplay.ClientFieldNames[f13_local0].clientFieldName == f13_arg1 then
return f13_local0
end
end
end
CoD.PersistentItemTombDisplay.GetCurrentGemIndex = function(f14_arg0)
for f14_local0 = 1, #CoD.PersistentItemTombDisplay.GemStatusStates, 1 do
if CoD.PersistentItemTombDisplay.GemStatusStates[f14_local0].gemIndex == f14_arg0 then
return f14_local0
end
end
end

View File

@ -10,4 +10,5 @@ script,scripts/zm/replaced/_zm_ai_mechz.csc
script,scripts/zm/replaced/_zm_weapons.csc
script,scripts/zm/replaced/zm_nuked.csc
script,scripts/zm/replaced/zm_buried.csc
script,scripts/zm/replaced/zm_tomb_craftables.csc
script,scripts/zm/replaced/zgrief.csc