diff --git a/scripts/zm/_zm_reimagined.gsc b/scripts/zm/_zm_reimagined.gsc index 1329f1e6..2a1da15f 100644 --- a/scripts/zm/_zm_reimagined.gsc +++ b/scripts/zm/_zm_reimagined.gsc @@ -1682,8 +1682,7 @@ temp_disable_offhand_weapons() buildbuildables() { - // need a wait or else some buildables dont build - wait 1; + wait 1; // need a wait or else some buildables dont build if (is_classic()) { @@ -1926,8 +1925,12 @@ unregister_tower_unitriggers() // MOTD\Origins style buildables buildcraftables() { - // need a wait or else some buildables dont build - wait 1; + flag_wait("initial_blackscreen_passed"); + + if (is_true(level.zombiemode_using_afterlife)) + { + flag_wait("afterlife_start_over"); + } if (is_classic()) { diff --git a/scripts/zm/replaced/zm_alcatraz_craftables.gsc b/scripts/zm/replaced/zm_alcatraz_craftables.gsc index 55f6c3d8..2988cfe2 100644 --- a/scripts/zm/replaced/zm_alcatraz_craftables.gsc +++ b/scripts/zm/replaced/zm_alcatraz_craftables.gsc @@ -116,4 +116,25 @@ include_craftables() refuelable_plane.triggerthink = ::planefuelable; plane.custom_craftablestub_update_prompt = ::prison_plane_update_prompt; include_craftable(refuelable_plane); +} + +planecraftable() +{ + level thread alcatraz_craftable_trigger_think("plane_craftable_trigger", "plane", "plane", "", 1, 0); + level setclientfield("quest_plane_craft_complete", 0); + + level thread setclientfield_quest_states_init(); +} + +setclientfield_quest_states_init() +{ + flag_wait("initial_blackscreen_passed"); + + if (is_true(level.zombiemode_using_afterlife)) + { + flag_wait("afterlife_start_over"); + } + + for (i = 1; i <= 5; i++) + level setclientfield("quest_state" + i, 2); } \ No newline at end of file diff --git a/scripts/zm/replaced/zm_tomb_main_quest.gsc b/scripts/zm/replaced/zm_tomb_main_quest.gsc index 7ee4c4d1..edee0832 100644 --- a/scripts/zm/replaced/zm_tomb_main_quest.gsc +++ b/scripts/zm/replaced/zm_tomb_main_quest.gsc @@ -604,6 +604,8 @@ run_gramophone_door(str_vinyl_record) while (!trig_position.has_vinyl) wait 0.05; + wait 0.05; + t_door.initial_placed = 1; trig_position.gramophone_model = spawn("script_model", trig_position.origin); trig_position.gramophone_model.angles = trig_position.angles; diff --git a/ui_mp/t6/zombie/hudcraftablestombzombie.lua b/ui_mp/t6/zombie/hudcraftablestombzombie.lua index f41ab3f8..cab3e348 100644 --- a/ui_mp/t6/zombie/hudcraftablestombzombie.lua +++ b/ui_mp/t6/zombie/hudcraftablestombzombie.lua @@ -50,7 +50,7 @@ LUI.createMenu.CraftablesTombArea = function(f1_arg0) f1_local8.shouldFadeOutQuestStatus = true f1_local8.highlightRecentItem = true end - local f1_local9 = f1_local6 + 100 + local f1_local9 = f1_local6 + 90 local f1_local10 = LUI.UIVerticalList.new() f1_local10:setLeftRight(true, true, 0, 0) f1_local10:setTopBottom(true, false, f1_local9, f1_local9 + CoD.CraftablesTomb.ContainerHeight) diff --git a/ui_mp/t6/zombie/hudcraftableszombie.lua b/ui_mp/t6/zombie/hudcraftableszombie.lua index 70cd11ac..68921a87 100644 --- a/ui_mp/t6/zombie/hudcraftableszombie.lua +++ b/ui_mp/t6/zombie/hudcraftableszombie.lua @@ -16,7 +16,7 @@ LUI.createMenu.CraftablesArea = function(f1_arg0) local f1_local3 = CoD.QuestItemDisplay.ContainerSize / 4 if CoD.Zombie.SoloQuestMode == false then CoD.QuestItemDisplay.AddPersistentIcon(f1_local2) - f1_local2:addSpacer(f1_local3 * 2) + f1_local2:addSpacer(90 - CoD.QuestItemDisplay.ContainerSize) end local f1_local4 = false local f1_local5 = true @@ -30,7 +30,7 @@ LUI.createMenu.CraftablesArea = function(f1_arg0) end local f1_local6 = LUI.UIVerticalList.new() f1_local6:setLeftRight(true, true, 0, 0) - f1_local6:setTopBottom(true, true, 200, 0) + f1_local6:setTopBottom(true, true, 180, 0) local f1_local7 = CoD.CraftableItemDisplay.new(f1_local6) f1_local0.scaleContainer:addElement(f1_local7) if not CoD.Zombie.LocalSplitscreenMultiplePlayers then diff --git a/ui_mp/t6/zombie/persistentitemtombdisplay.lua b/ui_mp/t6/zombie/persistentitemtombdisplay.lua index 073f4fc3..cb00ef8c 100644 --- a/ui_mp/t6/zombie/persistentitemtombdisplay.lua +++ b/ui_mp/t6/zombie/persistentitemtombdisplay.lua @@ -161,9 +161,9 @@ 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 + if f4_arg1.newValue == 1 then f4_arg0.statusIcons[2].icon:setRGB(1, 1, 1) - else + elseif f4_arg1.newValue >= 2 and f4_arg1.newValue <= 5 then local recordColor = CoD.QuestItemTombDisplay.ClientFieldNames[f4_arg1.newValue - 1].color f4_arg0.statusIcons[2].icon:setRGB(recordColor.r, recordColor.g, recordColor.b) end @@ -259,7 +259,7 @@ CoD.PersistentItemTombDisplay.UpdateQuestStates = function(f10_arg0, f10_arg1) f10_arg0:setAlpha(1) f10_arg0.icon:setAlpha(1) f10_arg0.icon:setRGB(1, 1, 1) - else + elseif f10_arg1 >= 2 and f10_arg1 <= 5 then local recordColor = CoD.QuestItemTombDisplay.ClientFieldNames[f10_arg1 - 1].color f10_arg0:setAlpha(1) f10_arg0.icon:setAlpha(1) diff --git a/ui_mp/t6/zombie/questitemdisplay.lua b/ui_mp/t6/zombie/questitemdisplay.lua index 2b97b3f2..d6d637db 100644 --- a/ui_mp/t6/zombie/questitemdisplay.lua +++ b/ui_mp/t6/zombie/questitemdisplay.lua @@ -121,6 +121,7 @@ CoD.QuestItemDisplay.new = function(f1_arg0) f1_arg0:registerEventHandler(CoD.QuestItemDisplay.KeyClientFieldName, CoD.QuestItemDisplay.UpdateKeyStatus) f1_arg0:registerEventHandler(CoD.QuestItemDisplay.PlaneCraftedClientFieldName, CoD.QuestItemDisplay.UpdatedPlaneCompletedStatus) f1_arg0.visible = true + CoD.QuestItemDisplay.QuestItemDisplayHUD = f1_arg0 return f1_arg0 end @@ -164,7 +165,7 @@ CoD.QuestItemDisplay.AddPersistentIcon = function(f2_arg0) f2_local4.highlight:setTopBottom(true, true, 0, 0) f2_local4.highlight:registerEventHandler("button_over", CoD.CraftablesIcon.HighlightButtonOver) f2_local4.highlight:registerEventHandler("button_up", CoD.CraftablesIcon.HighlightButtonUp) - f2_local4:addElement(f2_local4.highlight) + f2_local3:addElement(f2_local4.highlight) f2_arg0:addElement(self) end @@ -309,6 +310,17 @@ CoD.QuestItemDisplay.PlayerPieceOwner = function(f4_arg0, f4_arg1) end CoD.QuestItemDisplay.UpdateQuest = function(f5_arg0, f5_arg1) + if f5_arg1.newValue == 0 then + CoD.QuestItemDisplay.initKeyStatusUpdated = false + end + + if f5_arg1.oldValue == 0 and f5_arg1.newValue == 2 then + if not CoD.QuestItemDisplay.initKeyStatusUpdated then + CoD.QuestItemDisplay.initKeyStatusUpdated = true + CoD.QuestItemDisplay.UpdateKeyStatus(CoD.QuestItemDisplay.QuestItemDisplayHUD, f5_arg1, 1) + end + end + CoD.QuestItemDisplay.UpdateQuestStatus(f5_arg0, f5_arg1) if f5_arg1.oldValue ~= 0 or f5_arg1.newValue ~= 0 then if f5_arg0.questStatusContainer then @@ -493,17 +505,31 @@ CoD.QuestItemDisplay.UpdatePersistentIconState = function(f13_arg0, f13_arg1, f1 end end -CoD.QuestItemDisplay.UpdateKeyStatus = function(f14_arg0, f14_arg1) - CoD.QuestItemDisplay.HaveKeyInScoreboard = true - CoD.QuestItemDisplay.UpdateKeyIconState(f14_arg0, f14_arg1.oldValue, f14_arg1.newValue) +CoD.QuestItemDisplay.UpdateKeyStatus = function(f14_arg0, f14_arg1, initKeyState) + if not initKeyState then + CoD.QuestItemDisplay.HaveKeyInScoreboard = true + end + + CoD.QuestItemDisplay.UpdateKeyIconState(f14_arg0, f14_arg1.oldValue, f14_arg1.newValue, initKeyState) end -CoD.QuestItemDisplay.UpdateKeyIconState = function(f15_arg0, f15_arg1, f15_arg2) +CoD.QuestItemDisplay.UpdateKeyIconState = function(f15_arg0, f15_arg1, f15_arg2, initKeyState) + if initKeyState then + f15_arg2 = 1 + end + if not CoD.QuestItemDisplay.CurrentMapName or f15_arg2 < 0 then return elseif f15_arg0.craftableIcon and f15_arg1 == 0 and f15_arg2 == 1 then f15_arg0.craftableIcon:setAlpha(1) f15_arg0.craftableIcon:setImage(CoD.QuestItemDisplay.KeyMaterial) + + if initKeyState then + f15_arg0.craftableIcon:setAlpha(CoD.QuestItemDisplay.NeedItemAlpha) + else + f15_arg0.craftableIcon:setAlpha(1) + end + f15_arg0.craftableIcon.highlight:alternateStates(CoD.QuestItemDisplay.ONSCREEN_DURATION, CoD.CraftablesIcon.PulseRedBright, CoD.CraftablesIcon.PulseRedLow, 500, 500, CoD.CraftablesIcon.PulseWhite) f15_arg0.craftableIcon.inUse = true f15_arg0.persQuestContainer:setAlpha(1)