diff --git a/scripts/zm/replaced/zm_alcatraz_craftables.gsc b/scripts/zm/replaced/zm_alcatraz_craftables.gsc index 5c759170..55f6c3d8 100644 --- a/scripts/zm/replaced/zm_alcatraz_craftables.gsc +++ b/scripts/zm/replaced/zm_alcatraz_craftables.gsc @@ -116,44 +116,4 @@ include_craftables() refuelable_plane.triggerthink = ::planefuelable; plane.custom_craftablestub_update_prompt = ::prison_plane_update_prompt; include_craftable(refuelable_plane); -} - -include_key_craftable(craftable_name, model_name) -{ - part_key = generate_zombie_craftable_piece(craftable_name, undefined, model_name, 32, 15, 0, undefined, ::onpickup_key, undefined, undefined, undefined, undefined, undefined, undefined, 1); - part = spawnstruct(); - part.name = craftable_name; - part add_craftable_piece(part_key); - part.triggerthink = maps\mp\zombies\_zm_craftables::setup_craftable_pieces; - include_craftable(part); -} - -onpickup_key(player) -{ - flag_set("key_found"); - - if (level.is_master_key_west) - level clientnotify("fxanim_west_pulley_up_start"); - else - level clientnotify("fxanim_east_pulley_up_start"); - - a_m_checklist = getentarray("plane_checklist", "targetname"); - - foreach (m_checklist in a_m_checklist) - { - m_checklist showpart("j_check_key"); - m_checklist showpart("j_strike_key"); - } - - a_door_structs = getstructarray("quest_trigger", "script_noteworthy"); - - foreach (struct in a_door_structs) - { - if (isdefined(struct.unitrigger_stub)) - struct.unitrigger_stub maps\mp\zombies\_zm_unitrigger::run_visibility_function_for_all_triggers(); - } - - player playsound("evt_key_pickup"); - player thread do_player_general_vox("quest", "sidequest_key_response", undefined, 100); - //level setclientfield( "piece_key_warden", 1 ); } \ No newline at end of file diff --git a/scripts/zm/replaced/zm_tomb_craftables.gsc b/scripts/zm/replaced/zm_tomb_craftables.gsc index 715e6aac..00baeb07 100644 --- a/scripts/zm/replaced/zm_tomb_craftables.gsc +++ b/scripts/zm/replaced/zm_tomb_craftables.gsc @@ -80,7 +80,7 @@ include_craftables() include_craftable(riotshield); level thread add_craftable_cheat(riotshield); craftable_name = "elemental_staff_air"; - staff_air_gem = generate_zombie_craftable_piece(craftable_name, "gem", "t6_wpn_zmb_staff_crystal_air_part", 48, 64, 0, undefined, ::onpickup_aircrystal, ::ondrop_aircrystal, undefined, undefined, undefined, undefined, undefined, 0, "crystal", 1); + staff_air_gem = generate_zombie_craftable_piece(craftable_name, "gem", "t6_wpn_zmb_staff_crystal_air_part", 48, 64, 0, undefined, ::onpickup_aircrystal, ::ondrop_aircrystal, undefined, undefined, undefined, undefined, 2, 0, "crystal", 1); staff_air_upper_staff = generate_zombie_craftable_piece(craftable_name, "upper_staff", "t6_wpn_zmb_staff_tip_air_world", 32, 64, 0, undefined, ::onpickup_staffpiece, ::ondrop_common, undefined, undefined, undefined, undefined, "piece_staff_zm_ustaff_air", 1, "staff_part"); staff_air_middle_staff = generate_zombie_craftable_piece(craftable_name, "middle_staff", "t6_wpn_zmb_staff_stem_air_part", 32, 64, 0, undefined, ::onpickup_staffpiece, ::ondrop_common, undefined, undefined, undefined, undefined, "piece_staff_zm_mstaff_air", 1, "staff_part"); staff_air_lower_staff = generate_zombie_craftable_piece(craftable_name, "lower_staff", "t6_wpn_zmb_staff_revive_part", 32, 64, 0, undefined, ::onpickup_staffpiece, ::ondrop_common, undefined, undefined, undefined, undefined, "piece_staff_zm_lstaff_air", 1, "staff_part"); @@ -96,7 +96,7 @@ include_craftables() level thread add_craftable_cheat(staff); count_staff_piece_pickup(array(staff_air_upper_staff, staff_air_middle_staff, staff_air_lower_staff)); craftable_name = "elemental_staff_fire"; - staff_fire_gem = generate_zombie_craftable_piece(craftable_name, "gem", "t6_wpn_zmb_staff_crystal_fire_part", 48, 64, 0, undefined, ::onpickup_firecrystal, ::ondrop_firecrystal, undefined, undefined, undefined, undefined, undefined, 0, "crystal", 1); + staff_fire_gem = generate_zombie_craftable_piece(craftable_name, "gem", "t6_wpn_zmb_staff_crystal_fire_part", 48, 64, 0, undefined, ::onpickup_firecrystal, ::ondrop_firecrystal, undefined, undefined, undefined, undefined, 1, 0, "crystal", 1); staff_fire_upper_staff = generate_zombie_craftable_piece(craftable_name, "upper_staff", "t6_wpn_zmb_staff_tip_fire_world", 32, 64, 0, undefined, ::onpickup_staffpiece, ::ondrop_common, undefined, undefined, undefined, undefined, "piece_staff_zm_ustaff_fire", 1, "staff_part"); staff_fire_middle_staff = generate_zombie_craftable_piece(craftable_name, "middle_staff", "t6_wpn_zmb_staff_stem_fire_part", 32, 64, 0, undefined, ::onpickup_staffpiece, ::ondrop_common, undefined, undefined, undefined, undefined, "piece_staff_zm_mstaff_fire", 1, "staff_part"); staff_fire_lower_staff = generate_zombie_craftable_piece(craftable_name, "lower_staff", "t6_wpn_zmb_staff_revive_part", 64, 128, 0, undefined, ::onpickup_staffpiece, ::ondrop_common, undefined, undefined, undefined, undefined, "piece_staff_zm_lstaff_fire", 1, "staff_part"); @@ -115,7 +115,7 @@ include_craftables() level thread add_craftable_cheat(staff); count_staff_piece_pickup(array(staff_fire_upper_staff, staff_fire_middle_staff, staff_fire_lower_staff)); craftable_name = "elemental_staff_lightning"; - staff_lightning_gem = generate_zombie_craftable_piece(craftable_name, "gem", "t6_wpn_zmb_staff_crystal_bolt_part", 48, 64, 0, undefined, ::onpickup_lightningcrystal, ::ondrop_lightningcrystal, undefined, undefined, undefined, undefined, undefined, 0, "crystal", 1); + staff_lightning_gem = generate_zombie_craftable_piece(craftable_name, "gem", "t6_wpn_zmb_staff_crystal_bolt_part", 48, 64, 0, undefined, ::onpickup_lightningcrystal, ::ondrop_lightningcrystal, undefined, undefined, undefined, undefined, 3, 0, "crystal", 1); staff_lightning_upper_staff = generate_zombie_craftable_piece(craftable_name, "upper_staff", "t6_wpn_zmb_staff_tip_lightning_world", 32, 64, 0, undefined, ::onpickup_staffpiece, ::ondrop_common, undefined, undefined, undefined, undefined, "piece_staff_zm_ustaff_lightning", 1, "staff_part"); staff_lightning_middle_staff = generate_zombie_craftable_piece(craftable_name, "middle_staff", "t6_wpn_zmb_staff_stem_bolt_part", 32, 64, 0, undefined, ::onpickup_staffpiece, ::ondrop_common, undefined, undefined, undefined, undefined, "piece_staff_zm_mstaff_lightning", 1, "staff_part"); staff_lightning_lower_staff = generate_zombie_craftable_piece(craftable_name, "lower_staff", "t6_wpn_zmb_staff_revive_part", 32, 64, 0, undefined, ::onpickup_staffpiece, ::ondrop_common, undefined, undefined, undefined, undefined, "piece_staff_zm_lstaff_lightning", 1, "staff_part"); @@ -131,7 +131,7 @@ include_craftables() level thread add_craftable_cheat(staff); count_staff_piece_pickup(array(staff_lightning_upper_staff, staff_lightning_middle_staff, staff_lightning_lower_staff)); craftable_name = "elemental_staff_water"; - staff_water_gem = generate_zombie_craftable_piece(craftable_name, "gem", "t6_wpn_zmb_staff_crystal_water_part", 48, 64, 0, undefined, ::onpickup_watercrystal, ::ondrop_watercrystal, undefined, undefined, undefined, undefined, undefined, 0, "crystal", 1); + staff_water_gem = generate_zombie_craftable_piece(craftable_name, "gem", "t6_wpn_zmb_staff_crystal_water_part", 48, 64, 0, undefined, ::onpickup_watercrystal, ::ondrop_watercrystal, undefined, undefined, undefined, undefined, 4, 0, "crystal", 1); staff_water_upper_staff = generate_zombie_craftable_piece(craftable_name, "upper_staff", "t6_wpn_zmb_staff_tip_water_world", 32, 64, 0, undefined, ::onpickup_staffpiece, ::ondrop_common, undefined, undefined, undefined, undefined, "piece_staff_zm_ustaff_water", 1, "staff_part"); staff_water_middle_staff = generate_zombie_craftable_piece(craftable_name, "middle_staff", "t6_wpn_zmb_staff_stem_water_part", 32, 64, 0, undefined, ::onpickup_staffpiece, ::ondrop_common, undefined, undefined, undefined, undefined, "piece_staff_zm_mstaff_water", 1, "staff_part"); staff_water_lower_staff = generate_zombie_craftable_piece(craftable_name, "lower_staff", "t6_wpn_zmb_staff_revive_part", 32, 64, 0, undefined, ::onpickup_staffpiece, ::ondrop_common, undefined, undefined, undefined, undefined, "piece_staff_zm_lstaff_water", 1, "staff_part"); @@ -149,8 +149,8 @@ include_craftables() level thread add_craftable_cheat(staff); count_staff_piece_pickup(array(staff_water_upper_staff, staff_water_middle_staff, staff_water_lower_staff)); craftable_name = "gramophone"; - vinyl_pickup_player = vinyl_add_pickup(craftable_name, "vinyl_player", "p6_zm_tm_gramophone", undefined, undefined, "gramophone"); - vinyl_pickup_master = vinyl_add_pickup(craftable_name, "vinyl_master", "p6_zm_tm_record_master", undefined, undefined, "record"); + vinyl_pickup_player = vinyl_add_pickup(craftable_name, "vinyl_player", "p6_zm_tm_gramophone", "piece_record_zm_player", undefined, "gramophone"); + vinyl_pickup_master = vinyl_add_pickup(craftable_name, "vinyl_master", "p6_zm_tm_record_master", "piece_record_zm_vinyl_master", undefined, "record"); vinyl_pickup_air = vinyl_add_pickup(craftable_name, "vinyl_air", "p6_zm_tm_record_wind", "piece_record_zm_vinyl_air", "quest_state2", "record"); vinyl_pickup_ice = vinyl_add_pickup(craftable_name, "vinyl_ice", "p6_zm_tm_record_ice", "piece_record_zm_vinyl_water", "quest_state4", "record"); vinyl_pickup_fire = vinyl_add_pickup(craftable_name, "vinyl_fire", "p6_zm_tm_record_fire", "piece_record_zm_vinyl_fire", "quest_state1", "record"); diff --git a/scripts/zm/replaced/zm_tomb_main_quest.gsc b/scripts/zm/replaced/zm_tomb_main_quest.gsc index 1a4f5f8c..69397253 100644 --- a/scripts/zm/replaced/zm_tomb_main_quest.gsc +++ b/scripts/zm/replaced/zm_tomb_main_quest.gsc @@ -523,7 +523,7 @@ run_gramophone_teleporter(str_vinyl_record) self.gramophone_model = spawn("script_model", self.origin); 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_player", 0); flag_set("gramophone_placed"); foreach (trigger in level.gramophone_teleporter_triggers) @@ -559,7 +559,7 @@ run_gramophone_teleporter(str_vinyl_record) self.gramophone_model ghost(); player playsound("zmb_craftable_pickup"); flag_clear("gramophone_placed"); - //level setclientfield( "piece_record_zm_player", 1 ); + level setclientfield("piece_record_zm_player", 1); break; } } @@ -604,7 +604,7 @@ run_gramophone_door(str_vinyl_record) trig_position.gramophone_model.angles = trig_position.angles; trig_position.gramophone_model setmodel("p6_zm_tm_gramophone"); flag_set("gramophone_placed"); - //level setclientfield( "piece_record_zm_player", 0 ); + level setclientfield("piece_record_zm_player", 0); foreach (trigger in level.gramophone_teleporter_triggers) { @@ -647,7 +647,7 @@ run_gramophone_door(str_vinyl_record) trig_position.gramophone_model ghost(); flag_clear("gramophone_placed"); player playsound("zmb_craftable_pickup"); - //level setclientfield( "piece_record_zm_player", 1 ); + level setclientfield("piece_record_zm_player", 1); break; } } diff --git a/ui_mp/t6/zombie/hudcraftablestombzombie.lua b/ui_mp/t6/zombie/hudcraftablestombzombie.lua index 04a7a10f..57e49144 100644 --- a/ui_mp/t6/zombie/hudcraftablestombzombie.lua +++ b/ui_mp/t6/zombie/hudcraftablestombzombie.lua @@ -25,8 +25,8 @@ 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) - f1_local0.topLeftScaleContainer:setLeftRight(true, false, 0, 0) - f1_local0.topLeftScaleContainer:setTopBottom(true, false, 0, 0) + f1_local0.topLeftScaleContainer:setLeftRight(true, false, 8, 8) + f1_local0.topLeftScaleContainer:setTopBottom(true, false, 30, 30) f1_local0:addElement(f1_local0.topLeftScaleContainer) local f1_local1 = CoD.QuestItemTombDisplay.IconSize local f1_local2 = CoD.QuestItemTombDisplay.ContainerSize / 4 @@ -63,8 +63,8 @@ LUI.createMenu.CraftablesTombArea = function(f1_arg0) f1_local0.topRightScaleContainer:setLeftRight(false, true, 0, 0) f1_local0.topRightScaleContainer:setTopBottom(true, false, 0, 0) f1_local0:addElement(f1_local0.topRightScaleContainer) - local f1_local12 = 10 - local f1_local13 = 10 + local f1_local12 = 0 + local f1_local13 = 60 local f1_local14 = 120 local Widget = LUI.UIElement.new() Widget:setLeftRight(false, true, -f1_local14 - f1_local12, -f1_local12) diff --git a/ui_mp/t6/zombie/hudcraftableszombie.lua b/ui_mp/t6/zombie/hudcraftableszombie.lua new file mode 100644 index 00000000..bb10156a --- /dev/null +++ b/ui_mp/t6/zombie/hudcraftableszombie.lua @@ -0,0 +1,74 @@ +require("T6.Zombie.CraftableItemDisplay") +require("T6.Zombie.QuestItemDisplay") +CoD.Craftables = {} +LUI.createMenu.CraftablesArea = function(f1_arg0) + local f1_local0 = CoD.Menu.NewSafeAreaFromState("CraftablesArea", f1_arg0) + f1_local0:setOwner(f1_arg0) + f1_local0.scaleContainer = CoD.SplitscreenScaler.new(nil, CoD.Zombie.SplitscreenMultiplier) + f1_local0.scaleContainer:setLeftRight(true, false, 8, 8) + f1_local0.scaleContainer:setTopBottom(true, false, 30, 30) + f1_local0:addElement(f1_local0.scaleContainer) + local f1_local1 = LUI.UIHorizontalList.new() + f1_local1:setLeftRight(true, true, 0, 0) + f1_local1:setTopBottom(true, true, 0, 0) + local f1_local2 = CoD.QuestItemDisplay.new(f1_local1) + f1_local0.scaleContainer:addElement(f1_local2) + local f1_local3 = CoD.QuestItemDisplay.ContainerSize / 4 + if CoD.Zombie.SoloQuestMode == false then + CoD.QuestItemDisplay.AddPersistentIcon(f1_local2) + f1_local2:addSpacer(f1_local3 * 2) + end + local f1_local4 = false + local f1_local5 = true + if CoD.Zombie.IsDLCMap(CoD.Zombie.DLC2Maps) then + f1_local5 = false + end + if not CoD.Zombie.LocalSplitscreenMultiplePlayers then + CoD.QuestItemDisplay.AddQuestStatusDisplay(f1_local2, f1_local3, f1_local5, f1_local4) + f1_local2.shouldFadeOutQuestStatus = true + f1_local2.highlightRecentItem = true + end + local f1_local6 = LUI.UIVerticalList.new() + f1_local6:setLeftRight(true, true, 0, 0) + f1_local6:setTopBottom(true, true, 100, 0) + local f1_local7 = CoD.CraftableItemDisplay.new(f1_local6) + f1_local0.scaleContainer:addElement(f1_local7) + if not CoD.Zombie.LocalSplitscreenMultiplePlayers then + CoD.CraftableItemDisplay.AddDisplayContainer(f1_local7, CoD.CraftableItemDisplay.ContainerSize / 4) + f1_local7.shouldFadeOutQuestStatus = true + f1_local7.highlightRecentItem = true + end + f1_local0:registerEventHandler("hud_update_refresh", CoD.Craftables.UpdateVisibility) + f1_local0:registerEventHandler("hud_update_bit_" .. CoD.BIT_HUD_VISIBLE, CoD.Craftables.UpdateVisibility) + f1_local0:registerEventHandler("hud_update_bit_" .. CoD.BIT_EMP_ACTIVE, CoD.Craftables.UpdateVisibility) + f1_local0:registerEventHandler("hud_update_bit_" .. CoD.BIT_DEMO_CAMERA_MODE_MOVIECAM, CoD.Craftables.UpdateVisibility) + f1_local0:registerEventHandler("hud_update_bit_" .. CoD.BIT_DEMO_ALL_GAME_HUD_HIDDEN, CoD.Craftables.UpdateVisibility) + f1_local0:registerEventHandler("hud_update_bit_" .. CoD.BIT_IN_VEHICLE, CoD.Craftables.UpdateVisibility) + f1_local0:registerEventHandler("hud_update_bit_" .. CoD.BIT_IN_GUIDED_MISSILE, CoD.Craftables.UpdateVisibility) + f1_local0:registerEventHandler("hud_update_bit_" .. CoD.BIT_IN_REMOTE_KILLSTREAK_STATIC, CoD.Craftables.UpdateVisibility) + f1_local0:registerEventHandler("hud_update_bit_" .. CoD.BIT_AMMO_COUNTER_HIDE, CoD.Craftables.UpdateVisibility) + f1_local0:registerEventHandler("hud_update_bit_" .. CoD.BIT_IS_FLASH_BANGED, CoD.Craftables.UpdateVisibility) + f1_local0:registerEventHandler("hud_update_bit_" .. CoD.BIT_UI_ACTIVE, CoD.Craftables.UpdateVisibility) + f1_local0:registerEventHandler("hud_update_bit_" .. CoD.BIT_SPECTATING_CLIENT, CoD.Craftables.UpdateVisibility) + f1_local0:registerEventHandler("hud_update_bit_" .. CoD.BIT_SCOREBOARD_OPEN, CoD.Craftables.UpdateVisibility) + f1_local0:registerEventHandler("hud_update_bit_" .. CoD.BIT_PLAYER_DEAD, CoD.Craftables.UpdateVisibility) + f1_local0:registerEventHandler("hud_update_bit_" .. CoD.BIT_IS_SCOPED, CoD.Craftables.UpdateVisibility) + f1_local0.visible = true + return f1_local0 +end + +CoD.Craftables.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 + f2_arg0:setAlpha(1) + f2_arg0.m_inputDisabled = nil + f2_arg0.visible = true + end + elseif f2_arg0.visible == true then + f2_arg0:setAlpha(0) + f2_arg0.m_inputDisabled = true + f2_arg0.visible = nil + end + f2_arg0:dispatchEventToChildren(f2_arg1) +end