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

Origins: change order of staff parts HUD

This commit is contained in:
Jbleezy 2024-01-30 23:54:49 -08:00
parent 99284d6755
commit 15cdacd611
3 changed files with 49 additions and 25 deletions

View File

@ -1055,6 +1055,7 @@
* Gramophone initially spawns at Excavation Site gramophone table * 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 change record color to show which table the gramophone is currently placed at
* Musical parts on HUD fade out * Musical parts on HUD fade out
* Changed the order of staff parts on HUD to match the order of the staff holders
* Staff parts on HUD correctly show that a player has a staff and a gem * Staff parts on HUD correctly show that a player has a staff and a gem
* Staff parts on HUD no longer show that a player has a staff when it is crafted * Staff parts on HUD no longer show that a player has a staff when it is crafted
* Switched Zombie Shield and Maxis Drone recipe positions on HUD * Switched Zombie Shield and Maxis Drone recipe positions on HUD

View File

@ -164,7 +164,8 @@ CoD.PersistentItemTombDisplay.UpdateQuestContainerAndTitle = function(f4_arg0, f
if f4_arg1.newValue == 1 then if f4_arg1.newValue == 1 then
f4_arg0.statusIcons[2].icon:setRGB(1, 1, 1) f4_arg0.statusIcons[2].icon:setRGB(1, 1, 1)
elseif f4_arg1.newValue >= 2 and f4_arg1.newValue <= 5 then elseif f4_arg1.newValue >= 2 and f4_arg1.newValue <= 5 then
local recordColor = CoD.QuestItemTombDisplay.ClientFieldNames[f4_arg1.newValue - 1].color local num = CoD.QuestItemTombDisplay.GetIndexFromNum(f4_arg1.newValue - 1)
local recordColor = CoD.QuestItemTombDisplay.ClientFieldNames[num].color
f4_arg0.statusIcons[2].icon:setRGB(recordColor.r, recordColor.g, recordColor.b) f4_arg0.statusIcons[2].icon:setRGB(recordColor.r, recordColor.g, recordColor.b)
end end
end end
@ -260,7 +261,8 @@ CoD.PersistentItemTombDisplay.UpdateQuestStates = function(f10_arg0, f10_arg1)
f10_arg0.icon:setAlpha(1) f10_arg0.icon:setAlpha(1)
f10_arg0.icon:setRGB(1, 1, 1) f10_arg0.icon:setRGB(1, 1, 1)
elseif f10_arg1 >= 2 and f10_arg1 <= 5 then elseif f10_arg1 >= 2 and f10_arg1 <= 5 then
local recordColor = CoD.QuestItemTombDisplay.ClientFieldNames[f10_arg1 - 1].color local num = CoD.QuestItemTombDisplay.GetIndexFromNum(f10_arg1 - 1)
local recordColor = CoD.QuestItemTombDisplay.ClientFieldNames[num].color
f10_arg0:setAlpha(1) f10_arg0:setAlpha(1)
f10_arg0.icon:setAlpha(1) f10_arg0.icon:setAlpha(1)
f10_arg0.icon:setRGB(recordColor.r, recordColor.g, recordColor.b) f10_arg0.icon:setRGB(recordColor.r, recordColor.g, recordColor.b)

View File

@ -33,17 +33,6 @@ CoD.QuestItemTombDisplay.STATE_STAFF_PIECE_HAVE = 1
CoD.QuestItemTombDisplay.STATE_STAFF_PIECE_COMPLETED = 2 CoD.QuestItemTombDisplay.STATE_STAFF_PIECE_COMPLETED = 2
CoD.QuestItemTombDisplay.ClientFieldNames = {} CoD.QuestItemTombDisplay.ClientFieldNames = {}
CoD.QuestItemTombDisplay.ClientFieldNames[1] = { CoD.QuestItemTombDisplay.ClientFieldNames[1] = {
name = "fire",
color = CoD.CraftablesStaffIcon.RedFire,
clientFieldName = "quest_state2",
gemClientFieldName = "piece_staff_zm_gem_fire",
recordClientFieldName = "piece_record_zm_vinyl_fire",
uStaffClientFieldName = "piece_staff_zm_ustaff_fire",
mStaffClientFieldName = "piece_staff_zm_mstaff_fire",
lStaffClientFieldName = "piece_staff_zm_lstaff_fire",
materialName = "zom_hud_craftable_element_fire",
}
CoD.QuestItemTombDisplay.ClientFieldNames[2] = {
name = "air", name = "air",
color = CoD.CraftablesStaffIcon.YellowWind, color = CoD.CraftablesStaffIcon.YellowWind,
clientFieldName = "quest_state1", clientFieldName = "quest_state1",
@ -53,6 +42,19 @@ CoD.QuestItemTombDisplay.ClientFieldNames[2] = {
mStaffClientFieldName = "piece_staff_zm_mstaff_air", mStaffClientFieldName = "piece_staff_zm_mstaff_air",
lStaffClientFieldName = "piece_staff_zm_lstaff_air", lStaffClientFieldName = "piece_staff_zm_lstaff_air",
materialName = "zom_hud_craftable_element_wind", materialName = "zom_hud_craftable_element_wind",
num = 2,
}
CoD.QuestItemTombDisplay.ClientFieldNames[2] = {
name = "water",
color = CoD.CraftablesStaffIcon.BlueIce,
clientFieldName = "quest_state2",
gemClientFieldName = "piece_staff_zm_gem_water",
recordClientFieldName = "piece_record_zm_vinyl_water",
uStaffClientFieldName = "piece_staff_zm_ustaff_water",
mStaffClientFieldName = "piece_staff_zm_mstaff_water",
lStaffClientFieldName = "piece_staff_zm_lstaff_water",
materialName = "zom_hud_craftable_element_water",
num = 4,
} }
CoD.QuestItemTombDisplay.ClientFieldNames[3] = { CoD.QuestItemTombDisplay.ClientFieldNames[3] = {
name = "lightning", name = "lightning",
@ -64,17 +66,19 @@ CoD.QuestItemTombDisplay.ClientFieldNames[3] = {
mStaffClientFieldName = "piece_staff_zm_mstaff_lightning", mStaffClientFieldName = "piece_staff_zm_mstaff_lightning",
lStaffClientFieldName = "piece_staff_zm_lstaff_lightning", lStaffClientFieldName = "piece_staff_zm_lstaff_lightning",
materialName = "zom_hud_craftable_element_lightning", materialName = "zom_hud_craftable_element_lightning",
num = 3,
} }
CoD.QuestItemTombDisplay.ClientFieldNames[4] = { CoD.QuestItemTombDisplay.ClientFieldNames[4] = {
name = "water", name = "fire",
color = CoD.CraftablesStaffIcon.BlueIce, color = CoD.CraftablesStaffIcon.RedFire,
clientFieldName = "quest_state4", clientFieldName = "quest_state4",
gemClientFieldName = "piece_staff_zm_gem_water", gemClientFieldName = "piece_staff_zm_gem_fire",
recordClientFieldName = "piece_record_zm_vinyl_water", recordClientFieldName = "piece_record_zm_vinyl_fire",
uStaffClientFieldName = "piece_staff_zm_ustaff_water", uStaffClientFieldName = "piece_staff_zm_ustaff_fire",
mStaffClientFieldName = "piece_staff_zm_mstaff_water", mStaffClientFieldName = "piece_staff_zm_mstaff_fire",
lStaffClientFieldName = "piece_staff_zm_lstaff_water", lStaffClientFieldName = "piece_staff_zm_lstaff_fire",
materialName = "zom_hud_craftable_element_water", materialName = "zom_hud_craftable_element_fire",
num = 1,
} }
CoD.QuestItemTombDisplay.QuestItemName = Engine.Localize("ZM_TOMB_STAFF_PARTS") CoD.QuestItemTombDisplay.QuestItemName = Engine.Localize("ZM_TOMB_STAFF_PARTS")
CoD.QuestItemTombDisplay.new = function(f1_arg0) CoD.QuestItemTombDisplay.new = function(f1_arg0)
@ -245,6 +249,10 @@ CoD.QuestItemTombDisplay.PlayerGemOwner = function(f3_arg0, f3_arg1)
if 0 < f3_arg1.newValue then if 0 < f3_arg1.newValue then
f3_local1 = (f3_arg1.newValue - 1) % CoD.QuestItemTombDisplay.QuestClientFieldCount + 1 f3_local1 = (f3_arg1.newValue - 1) % CoD.QuestItemTombDisplay.QuestClientFieldCount + 1
end end
f3_local0 = CoD.QuestItemTombDisplay.GetIndexFromNum(f3_local0)
f3_local1 = CoD.QuestItemTombDisplay.GetIndexFromNum(f3_local1)
local f3_local2 = tonumber(string.sub(f3_arg1.name, string.len(CoD.QuestItemTombDisplay.PlayerGemClientFieldName) + 1)) local f3_local2 = tonumber(string.sub(f3_arg1.name, string.len(CoD.QuestItemTombDisplay.PlayerGemClientFieldName) + 1))
if f3_local2 < 1 or f3_local2 > 4 then if f3_local2 < 1 or f3_local2 > 4 then
return return
@ -270,6 +278,10 @@ CoD.QuestItemTombDisplay.PlayerStaffOwner = function(f3_arg0, f3_arg1)
if 0 < f3_arg1.newValue then if 0 < f3_arg1.newValue then
f3_local1 = (f3_arg1.newValue - 1) % CoD.QuestItemTombDisplay.QuestClientFieldCount + 1 f3_local1 = (f3_arg1.newValue - 1) % CoD.QuestItemTombDisplay.QuestClientFieldCount + 1
end end
f3_local0 = CoD.QuestItemTombDisplay.GetIndexFromNum(f3_local0)
f3_local1 = CoD.QuestItemTombDisplay.GetIndexFromNum(f3_local1)
local f3_local2 = tonumber(string.sub(f3_arg1.name, string.len(CoD.QuestItemTombDisplay.PlayerStaffClientFieldName) + 1)) local f3_local2 = tonumber(string.sub(f3_arg1.name, string.len(CoD.QuestItemTombDisplay.PlayerStaffClientFieldName) + 1))
if f3_local2 < 1 or f3_local2 > 4 then if f3_local2 < 1 or f3_local2 > 4 then
return return
@ -414,10 +426,9 @@ end
CoD.QuestItemTombDisplay.UpdateCompletedStaffDisplay = function(f10_arg0, f10_arg1) CoD.QuestItemTombDisplay.UpdateCompletedStaffDisplay = function(f10_arg0, f10_arg1)
local f10_local0 = string.len(f10_arg1.name) local f10_local0 = string.len(f10_arg1.name)
local f10_local1 = tonumber local num = tonumber(string.sub(f10_arg1.name, f10_local0))
local f10_local2 = string.sub local index = CoD.QuestItemTombDisplay.GetIndexFromNum(num)
local f10_local3 = f10_arg1.name CoD.QuestItemTombDisplay.UpdateQuestStatus(f10_arg0, f10_arg1, CoD.QuestItemTombDisplay.ClientFieldNames[index].name)
CoD.QuestItemTombDisplay.UpdateQuestStatus(f10_arg0, f10_arg1, CoD.QuestItemTombDisplay.ClientFieldNames[f10_local1(f10_local2(f10_arg1.name, f10_local0))].name)
CoD.QuestItemTombDisplay.UpdateQuest(f10_arg0, f10_arg1) CoD.QuestItemTombDisplay.UpdateQuest(f10_arg0, f10_arg1)
end end
@ -500,3 +511,13 @@ CoD.QuestItemTombDisplay.GetMaterial = function(f19_arg0)
end end
return f19_local0 return f19_local0
end end
CoD.QuestItemTombDisplay.GetIndexFromNum = function(num)
for index = 1, CoD.QuestItemTombDisplay.QuestClientFieldCount, 1 do
if CoD.QuestItemTombDisplay.ClientFieldNames[index].num == num then
return index
end
end
return num
end