local f0_local0 = { "speech/iw6/grammars/global.cfg", "speech/iw6/grammars/frontend.cfg", "speech/iw6/grammars/shortcuts.cfg", "speech/iw6/grammars/lobby.cfg" } local f0_local1 = { "speech/iw6/grammars/global.cfg" } Kinect = { DISABLE_CERTAIN_LOBBY_MUTE_AND_COMPARE_OPERATIONS = true, Layout = { Height = 554, Width = 780, NumRows = 3, CellHeight = 150, CellWidth = 250 }, Swatch = { Background = Colors.generic_menu_frame_color, IndexColor = Colors.frontend_hilite, DescColor = Colors.white, DescColorInvert = Colors.black }, RightBits = { None = 0, CodPlayMode = { SP = 1, Core = 2, Aliens = 4, SquadVsSquad = 8 }, UnlockedAliens = 16, CampaignResume = 32, CanHostOrFindGame = 64 }, KinectShortcutMenuController = 0, ShortcutRights = 0, ShortcutArray = nil, IsWhatCanISayMenuUp = function () local f1_local0 = Engine.GetLuiRoot() if f1_local0 and LUI.FlowManager.IsInStack( f1_local0.flowManager, "what_can_i_say" ) then return true else return false end end, IsKinectGuideUp = function () local f2_local0 = Engine.GetLuiRoot() if f2_local0 and LUI.FlowManager.IsInStack( f2_local0.flowManager, "kinect_guide" ) then return true else return false end end, IsAnyKinectMenuUp = function () if Kinect.IsWhatCanISayMenuUp() then return true elseif Kinect.IsKinectGuideUp() then return true else return false end end, CanOpenWhatCanISayMenu = function () if Engine.HasSpeechFeature() == false then return false elseif Kinect.IsWhatCanISayMenuUp() == true then return false elseif not Engine.InFrontend() and Engine.IsVideoPlaying and Engine.IsVideoPlaying() == true then DebugPrint( "Speech: Ignoring What Can I Say menu request because we are in the game and a video is playing." ) return false elseif true == LUI.FlowManager.IsTopMenuModal() then return false elseif not Engine.InFrontend() and Engine.IsMultiplayer() then DebugPrint( "Speech: Ignoring What Can I Say menu request because we are in the game that does not support any speech commands." ) return false else return true end end, OpenWhatCanISayMenu = function ( f5_arg0 ) if Kinect.CanOpenWhatCanISayMenu() ~= true then return else local f5_local0 = Engine.GetLuiRoot() if not f5_local0 then return elseif not Engine.InFrontend() and not Engine.IsMultiplayer() and Engine.GetDvarInt( "cl_paused" ) == 0 then Engine.TogglePause() f5_local0.is_paused = true f5_local0:processEvent( { name = "hud_refresh" } ) f5_local0:dispatchEventToRoot( { name = "toggle_pause", open_kinect_what_can_i_say_menu_instead = true } ) return else Kinect.menu_under_what_can_i_say = LUI.FlowManager.GetTopOpenAndVisibleMenuName() Kinect.what_can_i_say_unpause_when_close = false LUI.FlowManager.RequestPopupMenu( self, "what_can_i_say", true, f5_arg0, false ) end end end, CloseWhatCanISayMenu = function ( f6_arg0, f6_arg1 ) if Kinect.IsWhatCanISayMenuUp() ~= true then return end LUI.FlowManager.RequestLeaveMenu( f6_arg0 ) if not Engine.InFrontend() and not Engine.IsMultiplayer() and Kinect.what_can_i_say_unpause_when_close == true then LUI.FlowManager.RequestCloseAllMenus( f6_arg0 ) Engine.TogglePause() f6_arg0:dispatchEventToRoot( { name = "toggle_pause_off" } ) end Kinect.what_can_i_say_unpause_when_close = false end, CanOpenKinectGuide = function () if Engine.HasSpeechFeature() == false then return false elseif Engine.InFrontend() == false then DebugPrint( "Speech: Warning, cannot open up Kinect Guide because we are not in the front end menus." ) return false elseif Kinect.IsAnyKinectMenuUp() == true then DebugPrint( "Speech: Warning, cannot open up Kinect Guide because we already have one or more kinect menus up." ) return false elseif LUI.FlowManager.IsTopMenuModal() then DebugPrint( "Speech: Warning, cannot open up Kinect Guide because we top menu is modal." ) return false elseif LUI.MenuAutoNav.IsRunning() then DebugPrint( "Speech: Warning, cannot open up Kinect Guide because we are currently processing a menu autonavigation." ) return false end local f7_local0 = LUI.FlowManager.GetTopOpenAndVisibleMenuName() if f7_local0 then if string.lower( f7_local0 ) == string.lower( "main_lockout" ) then DebugPrint( "Speech: Warning, cannot open up Kinect Guide because main_lockout is up." ) return false elseif string.lower( f7_local0 ) == string.lower( "boot_brightness" ) then DebugPrint( "Speech: Warning, cannot open up Kinect Guide because boot_brightness is up." ) return false elseif string.lower( f7_local0 ) == string.lower( "boot_screen_margins" ) then DebugPrint( "Speech: Warning, cannot open up Kinect Guide because boot_screen_margins is up." ) return false elseif string.lower( f7_local0 ) == string.lower( "no_profile_warning_popmenu" ) then DebugPrint( "Speech: Warning, cannot open up Kinect Guide because no_profile_warning_popmenu is up." ) return false elseif string.lower( f7_local0 ) == string.lower( "error_popmenu" ) then DebugPrint( "Speech: Warning, cannot open up Kinect Guide because error_popmenu is up." ) return false end end return true end, OpenKinectGuide = function ( f8_arg0 ) if Kinect.CanOpenKinectGuide() ~= true then return else Engine.ExecNow( "incnosplitscreencontrol kinect_guide_inc " .. tostring( f8_arg0 ) ) Kinect.KinectShortcutMenuController = f8_arg0 LUI.FlowManager.RequestPopupMenu( self, "kinect_guide", true, f8_arg0, false ) end end, EnableGlobalGrammars = function () if Engine.HasSpeechFeature() then if Engine.InFrontend() then LUI.Speech.EnableGrammars( f0_local0 ) else LUI.Speech.EnableGrammars( f0_local1 ) end end end, RestartGlobalGrammars = function () if Engine.HasSpeechFeature() then if Engine.InFrontend() then LUI.Speech.Restart( f0_local0 ) else LUI.Speech.Restart( f0_local1 ) end end end, CanHostOrFindGame = function () local f11_local0 = Lobby.IsInPrivateParty() local f11_local1 = Lobby.IsPrivatePartyHost() local f11_local2 = Lobby.IsPartyHostWaitingOnMembers() local f11_local3 if not f11_local0 or f11_local1 then f11_local3 = f11_local2 else f11_local3 = true end if f11_local3 ~= true then return true else return false end end, ActionSPResumeCampaign = function ( f12_arg0, f12_arg1 ) if Engine.IsMultiplayer() then return elseif LUI.MenuAutoNav.IsRunning() then return else LUI.FlowManager.RequestLeaveMenu( f12_arg0 ) LUI.MenuAutoNav.Goto( "resume_campaign", f12_arg1.controller ) LUI.Speech.PerformingSpeechAction() end end, ActionSPMissionSelect = function ( f13_arg0, f13_arg1 ) if Engine.IsMultiplayer() then return elseif LUI.MenuAutoNav.IsRunning() then return else LUI.FlowManager.RequestLeaveMenu( f13_arg0 ) LUI.MenuAutoNav.Goto( "mission_select", f13_arg1.controller ) LUI.Speech.PerformingSpeechAction() end end, ActionSPGoToMultiplayer = function ( f14_arg0, f14_arg1 ) if Engine.IsMultiplayer() then return elseif LUI.MenuAutoNav.IsRunning() then return else LUI.FlowManager.RequestLeaveMenu( f14_arg0 ) LUI.MenuAutoNav.Goto( "mp", f14_arg1.controller ) LUI.Speech.PerformingSpeechAction() end end, ActionSPGoToExtinction = function ( f15_arg0, f15_arg1 ) if Engine.IsMultiplayer() then return elseif LUI.MenuAutoNav.IsRunning() then return else LUI.FlowManager.RequestLeaveMenu( f15_arg0 ) LUI.MenuAutoNav.Goto( "aliens", f15_arg1.controller ) LUI.Speech.PerformingSpeechAction() end end, ActionSPGoToSquads = function ( f16_arg0, f16_arg1 ) if Engine.IsMultiplayer() then return elseif LUI.MenuAutoNav.IsRunning() then return else LUI.FlowManager.RequestLeaveMenu( f16_arg0 ) LUI.MenuAutoNav.Goto( "squads", f16_arg1.controller ) LUI.Speech.PerformingSpeechAction() end end, ActionMPGoToMainMenu = function ( f17_arg0, f17_arg1 ) if not Engine.IsMultiplayer() then return elseif LUI.MenuAutoNav.IsRunning() then return else LUI.FlowManager.RequestLeaveMenu( f17_arg0 ) LUI.MenuAutoNav.Goto( "sp", f17_arg1.controller ) LUI.Speech.PerformingSpeechAction() end end, ActionMPSwitchToMultiplayer = function ( f18_arg0, f18_arg1 ) if not Engine.IsMultiplayer() then return elseif LUI.MenuAutoNav.IsRunning() then return else LUI.FlowManager.RequestLeaveMenu( f18_arg0 ) LUI.MenuAutoNav.Goto( "mp", f18_arg1.controller ) LUI.Speech.PerformingSpeechAction() end end, ActionMPSwitchToExtinction = function ( f19_arg0, f19_arg1 ) if not Engine.IsMultiplayer() then return elseif LUI.MenuAutoNav.IsRunning() then return else LUI.FlowManager.RequestLeaveMenu( f19_arg0 ) LUI.MenuAutoNav.Goto( "aliens", f19_arg1.controller ) LUI.Speech.PerformingSpeechAction() end end, ActionMPSwitchToSquad = function ( f20_arg0, f20_arg1 ) if not Engine.IsMultiplayer() then return elseif LUI.MenuAutoNav.IsRunning() then return else LUI.FlowManager.RequestLeaveMenu( f20_arg0 ) LUI.MenuAutoNav.Goto( "squads", f20_arg1.controller ) LUI.Speech.PerformingSpeechAction() end end, ActionMPFindGame = function ( f21_arg0, f21_arg1 ) if not Engine.IsMultiplayer() then return elseif LUI.MenuAutoNav.IsRunning() then return else LUI.FlowManager.RequestLeaveMenu( f21_arg0 ) LUI.MenuAutoNav.Goto( "xboxlive_findmatch", f21_arg1.controller ) LUI.Speech.PerformingSpeechAction() end end, ActionMPSplitScreen = function ( f22_arg0, f22_arg1 ) if not Engine.IsMultiplayer() then return elseif LUI.MenuAutoNav.IsRunning() then return else LUI.FlowManager.RequestLeaveMenu( f22_arg0 ) LUI.MenuAutoNav.Goto( "splitscreen", f22_arg1.controller ) LUI.Speech.PerformingSpeechAction() end end, ActionMPPrivateMatchGameSetup = function ( f23_arg0, f23_arg1 ) if not Engine.IsMultiplayer() then return elseif LUI.MenuAutoNav.IsRunning() then return else LUI.FlowManager.RequestLeaveMenu( f23_arg0 ) LUI.MenuAutoNav.Goto( "xboxlive_privatematch_gamesetup", f23_arg1.controller ) LUI.Speech.PerformingSpeechAction() end end, ActionMPCreateASoldier = function ( f24_arg0, f24_arg1 ) if not Engine.IsMultiplayer() then return elseif LUI.MenuAutoNav.IsRunning() then return else LUI.FlowManager.RequestLeaveMenu( f24_arg0 ) LUI.MenuAutoNav.Goto( "xboxlive_create_squad", f24_arg1.controller ) LUI.Speech.PerformingSpeechAction() end end, ActionMPLeaderboards = function ( f25_arg0, f25_arg1 ) if not Engine.IsMultiplayer() then return elseif LUI.MenuAutoNav.IsRunning() then return else LUI.FlowManager.RequestLeaveMenu( f25_arg0 ) LUI.MenuAutoNav.Goto( "xboxlive_barracks_leaderboards", f25_arg1.controller ) LUI.Speech.PerformingSpeechAction() end end, ActionAliensLoadout = function ( f26_arg0, f26_arg1 ) if not Engine.IsMultiplayer() then return elseif LUI.MenuAutoNav.IsRunning() then return else LUI.FlowManager.RequestLeaveMenu( f26_arg0 ) LUI.MenuAutoNav.Goto( "xboxlive_aliens_loadout", f26_arg1.controller ) LUI.Speech.PerformingSpeechAction() end end, ActionAliensLeaderboards = function ( f27_arg0, f27_arg1 ) if not Engine.IsMultiplayer() then return elseif LUI.MenuAutoNav.IsRunning() then return else LUI.FlowManager.RequestLeaveMenu( f27_arg0 ) LUI.MenuAutoNav.Goto( "xboxlive_aliens_leaderboards", f27_arg1.controller ) LUI.Speech.PerformingSpeechAction() end end, ActionSvSSquadAssault = function ( f28_arg0, f28_arg1 ) if Engine.GetCurrentCoDPlayMode() ~= CoD.PlayMode.SquadVsSquad then return elseif LUI.MenuAutoNav.IsRunning() then return else LUI.FlowManager.RequestLeaveMenu( f28_arg0 ) LUI.MenuAutoNav.Goto( "squadvssquad_squad_assault", f28_arg1.controller ) LUI.Speech.PerformingSpeechAction() end end, ActionSvSSquadVsSquad = function ( f29_arg0, f29_arg1 ) if Engine.GetCurrentCoDPlayMode() ~= CoD.PlayMode.SquadVsSquad then return elseif LUI.MenuAutoNav.IsRunning() then return else LUI.FlowManager.RequestLeaveMenu( f29_arg0 ) LUI.MenuAutoNav.Goto( "squadvssquad_squad_vs_squad", f29_arg1.controller ) LUI.Speech.PerformingSpeechAction() end end, ActionSvSSafeguard = function ( f30_arg0, f30_arg1 ) if Engine.GetCurrentCoDPlayMode() ~= CoD.PlayMode.SquadVsSquad then return elseif LUI.MenuAutoNav.IsRunning() then return else LUI.FlowManager.RequestLeaveMenu( f30_arg0 ) LUI.MenuAutoNav.Goto( "squadvssquad_safeguard", f30_arg1.controller ) LUI.Speech.PerformingSpeechAction() end end, ActionSvSWargame = function ( f31_arg0, f31_arg1 ) if Engine.GetCurrentCoDPlayMode() ~= CoD.PlayMode.SquadVsSquad then return elseif LUI.MenuAutoNav.IsRunning() then return else LUI.FlowManager.RequestLeaveMenu( f31_arg0 ) LUI.MenuAutoNav.Goto( "squadvssquad_wargame", f31_arg1.controller ) LUI.Speech.PerformingSpeechAction() end end, ActionSvSSquadReports = function ( f32_arg0, f32_arg1 ) if Engine.GetCurrentCoDPlayMode() ~= CoD.PlayMode.SquadVsSquad then return elseif LUI.MenuAutoNav.IsRunning() then return else LUI.FlowManager.RequestLeaveMenu( f32_arg0 ) LUI.MenuAutoNav.Goto( "squadvssquad_squad_reports", f32_arg1.controller ) LUI.Speech.PerformingSpeechAction() end end, ActionSvSLocalPlay = function ( f33_arg0, f33_arg1 ) if Engine.GetCurrentCoDPlayMode() ~= CoD.PlayMode.SquadVsSquad then return elseif LUI.MenuAutoNav.IsRunning() then return else LUI.FlowManager.RequestLeaveMenu( f33_arg0 ) LUI.MenuAutoNav.Goto( "squadvssquad_local_play", f33_arg1.controller ) LUI.Speech.PerformingSpeechAction() end end, GetShortcutRightsBits = function () local f34_local0 = Kinect.RightBits.None local f34_local1 = Engine.GetCurrentCoDPlayMode() if f34_local1 == CoD.PlayMode.SP then f34_local0 = f34_local0 + Kinect.RightBits.CodPlayMode.SP elseif f34_local1 == CoD.PlayMode.Core then f34_local0 = f34_local0 + Kinect.RightBits.CodPlayMode.Core elseif f34_local1 == CoD.PlayMode.Aliens then f34_local0 = f34_local0 + Kinect.RightBits.CodPlayMode.Aliens elseif f34_local1 == CoD.PlayMode.SquadVsSquad then f34_local0 = f34_local0 + Kinect.RightBits.CodPlayMode.SquadVsSquad end if Engine.UnlockedAliens() then f34_local0 = f34_local0 + Kinect.RightBits.UnlockedAliens end if not Engine.IsMultiplayer() then if not LUI.sp_menus.MainCampaignMenu.isResumeDisabled() then f34_local0 = f34_local0 + Kinect.RightBits.CampaignResume end elseif Kinect.CanHostOrFindGame() then f34_local0 = f34_local0 + Kinect.RightBits.CanHostOrFindGame end return f34_local0 end, DoWeNeedToRebuildShortcutArray = function () local f35_local0 = false if Kinect.ShortcutRights ~= Kinect.GetShortcutRightsBits() then f35_local0 = true end return f35_local0 end, BuildShortcutArray = function () Kinect.ShortcutRights = Kinect.GetShortcutRightsBits() Kinect.ShortcutArray = {} local f36_local0 = Engine.GetCurrentCoDPlayMode() if f36_local0 == CoD.PlayMode.SP then if not LUI.sp_menus.MainCampaignMenu.isResumeDisabled() then Kinect.ShortcutArray[#Kinect.ShortcutArray + 1] = { TextLabel = "@SPEECH_OPTION_RESUME_CAMPAIGN", Action = Kinect.ActionSPResumeCampaign } end Kinect.ShortcutArray[#Kinect.ShortcutArray + 1] = { TextLabel = "@SPEECH_OPTION_MISSION_SELECT", Action = Kinect.ActionSPMissionSelect } Kinect.ShortcutArray[#Kinect.ShortcutArray + 1] = { TextLabel = "@SPEECH_OPTION_GO_TO_MULTIPLAYER", Action = Kinect.ActionSPGoToMultiplayer } if Engine.UnlockedAliens() then Kinect.ShortcutArray[#Kinect.ShortcutArray + 1] = { TextLabel = "@SPEECH_OPTION_GO_TO_EXTINCTION", Action = Kinect.ActionSPGoToExtinction } end Kinect.ShortcutArray[#Kinect.ShortcutArray + 1] = { TextLabel = "@SPEECH_OPTION_GO_TO_SQUADS", Action = Kinect.ActionSPGoToSquads } elseif f36_local0 == CoD.PlayMode.Core then Kinect.ShortcutArray[#Kinect.ShortcutArray + 1] = { TextLabel = "@SPEECH_OPTION_GO_TO_MAIN_MENU", Action = Kinect.ActionMPGoToMainMenu } if Engine.UnlockedAliens() then Kinect.ShortcutArray[#Kinect.ShortcutArray + 1] = { TextLabel = "@SPEECH_OPTION_SWITCH_TO_EXTINCTION", Action = Kinect.ActionMPSwitchToExtinction } end Kinect.ShortcutArray[#Kinect.ShortcutArray + 1] = { TextLabel = "@SPEECH_OPTION_SWITCH_TO_SQUADS", Action = Kinect.ActionMPSwitchToSquad } if Kinect.CanHostOrFindGame() then Kinect.ShortcutArray[#Kinect.ShortcutArray + 1] = { TextLabel = "@SPEECH_OPTION_FIND_GAME", Action = Kinect.ActionMPFindGame } end if Engine.IsConsoleGame() then Kinect.ShortcutArray[#Kinect.ShortcutArray + 1] = { TextLabel = "@SPEECH_OPTION_SPLIT_SCREEN", Action = Kinect.ActionMPSplitScreen } end if Kinect.CanHostOrFindGame() then Kinect.ShortcutArray[#Kinect.ShortcutArray + 1] = { TextLabel = "@SPEECH_OPTION_PRIVATE_MATCH_GAME_SETUP", Action = Kinect.ActionMPPrivateMatchGameSetup } end Kinect.ShortcutArray[#Kinect.ShortcutArray + 1] = { TextLabel = "@SPEECH_OPTION_CUSTOMIZE_SQUAD", Action = Kinect.ActionMPCreateASoldier } Kinect.ShortcutArray[#Kinect.ShortcutArray + 1] = { TextLabel = "@SPEECH_OPTION_LEADERBOARDS", Action = Kinect.ActionMPLeaderboards } elseif f36_local0 == CoD.PlayMode.Aliens then Kinect.ShortcutArray[#Kinect.ShortcutArray + 1] = { TextLabel = "@SPEECH_OPTION_GO_TO_MAIN_MENU", Action = Kinect.ActionMPGoToMainMenu } Kinect.ShortcutArray[#Kinect.ShortcutArray + 1] = { TextLabel = "@SPEECH_OPTION_SWITCH_TO_MULTIPLAYER", Action = Kinect.ActionMPSwitchToMultiplayer } Kinect.ShortcutArray[#Kinect.ShortcutArray + 1] = { TextLabel = "@SPEECH_OPTION_SWITCH_TO_SQUADS", Action = Kinect.ActionMPSwitchToSquad } if Kinect.CanHostOrFindGame() then Kinect.ShortcutArray[#Kinect.ShortcutArray + 1] = { TextLabel = "@SPEECH_OPTION_FIND_GAME", Action = Kinect.ActionMPFindGame } end if Engine.IsConsoleGame() then Kinect.ShortcutArray[#Kinect.ShortcutArray + 1] = { TextLabel = "@SPEECH_OPTION_LOCAL_PLAY", Action = Kinect.ActionMPSplitScreen } end if Kinect.CanHostOrFindGame() then Kinect.ShortcutArray[#Kinect.ShortcutArray + 1] = { TextLabel = "@SPEECH_OPTION_CUSTOM_MATCH_GAME_SETUP", Action = Kinect.ActionMPPrivateMatchGameSetup } end Kinect.ShortcutArray[#Kinect.ShortcutArray + 1] = { TextLabel = "@SPEECH_OPTION_LOADOUT", Action = Kinect.ActionAliensLoadout } Kinect.ShortcutArray[#Kinect.ShortcutArray + 1] = { TextLabel = "@SPEECH_OPTION_LEADERBOARDS", Action = Kinect.ActionAliensLeaderboards } elseif f36_local0 == CoD.PlayMode.SquadVsSquad then Kinect.ShortcutArray[#Kinect.ShortcutArray + 1] = { TextLabel = "@SPEECH_OPTION_GO_TO_MAIN_MENU", Action = Kinect.ActionMPGoToMainMenu } if Engine.UnlockedAliens() then Kinect.ShortcutArray[#Kinect.ShortcutArray + 1] = { TextLabel = "@SPEECH_OPTION_SWITCH_TO_EXTINCTION", Action = Kinect.ActionMPSwitchToExtinction } end Kinect.ShortcutArray[#Kinect.ShortcutArray + 1] = { TextLabel = "@SPEECH_OPTION_SWITCH_TO_MULTIPLAYER", Action = Kinect.ActionMPSwitchToMultiplayer } Kinect.ShortcutArray[#Kinect.ShortcutArray + 1] = { TextLabel = "@SPEECH_OPTION_SQUAD_ASSAULT", Action = Kinect.ActionSvSSquadAssault } Kinect.ShortcutArray[#Kinect.ShortcutArray + 1] = { TextLabel = "@SPEECH_OPTION_SQUAD_VS_SQUAD", Action = Kinect.ActionSvSSquadVsSquad } Kinect.ShortcutArray[#Kinect.ShortcutArray + 1] = { TextLabel = "@SPEECH_OPTION_SAFEGUARD", Action = Kinect.ActionSvSSafeguard } Kinect.ShortcutArray[#Kinect.ShortcutArray + 1] = { TextLabel = "@SPEECH_OPTION_WARGAME", Action = Kinect.ActionSvSWargame } Kinect.ShortcutArray[#Kinect.ShortcutArray + 1] = { TextLabel = "@SPEECH_OPTION_SQUAD_REPORTS", Action = Kinect.ActionSvSSquadReports } Kinect.ShortcutArray[#Kinect.ShortcutArray + 1] = { TextLabel = "@SPEECH_OPTION_LOCAL_PLAY", Action = Kinect.ActionSvSLocalPlay } end end, FindShortcut = function ( f37_arg0 ) if Kinect.ShortcutArray ~= nil and f37_arg0 >= 1 and f37_arg0 <= #Kinect.ShortcutArray then return Kinect.ShortcutArray[f37_arg0] else return nil end end, ExecShortcut = function ( f38_arg0, f38_arg1, f38_arg2 ) local f38_local0 = false local f38_local1 = Kinect.FindShortcut( f38_arg2 ) if f38_local1 then if f38_local1.Action then f38_local1.Action( f38_arg0, f38_arg1 ) f38_local0 = true else DebugPrint( "Kinect: WARNING: Shortcut for \"" .. f38_local1.TextLabel .. "\" has a NIL Action!" ) end else DebugPrint( "Kinect: WARNING: Unknown shortcut! " .. f38_arg2 ) end return f38_local0 end, PressMenuButton = function ( f39_arg0, f39_arg1 ) assert( f39_arg0 ) local f39_local0 = Engine.GetLuiRoot() if f39_local0 == nil then return false else local f39_local1 = f39_local0:getFirstDescendentById( f39_arg0 ) if not f39_local1 then return false elseif f39_local1.disabled and not f39_local1.locked then return false else f39_local1:processEvent( { name = "button_action", controller = f39_arg1 } ) f39_local1:processEvent( { name = "button_down", controller = f39_arg1 } ) return true end end end } KinectLobbyMember = { Next = function ( f40_arg0 ) local f40_local0 = f40_arg0 if not f40_local0 then return nil end f40_local0.index = f40_local0.index + 1 if f40_local0.maxSlots < f40_local0.index then return nil elseif Lobby.IsActiveMemberSlot( f40_local0.index - 1 ) then f40_local0.isActiveMemberSlot = true f40_local0.slot = LUI.mp_menus.MPMemberList.LobbyMemberGetSlot( f40_local0.memberListState, f40_local0.index ) f40_local0.team = LUI.mp_menus.MPMemberList.LobbyMemberGetTeam( f40_local0.memberListState, f40_local0.index ) f40_local0.gamerTag = Lobby.GetMemberName( f40_local0.memberListState, f40_local0.slot, f40_local0.team ) f40_local0.muted = Lobby.IsMemberMuted( f40_local0.memberListState, f40_local0.slot, f40_local0.team ) else f40_local0.isActiveMemberSlot = false f40_local0.slot = -1 f40_local0.team = -1 f40_local0.gamerTag = "" f40_local0.muted = false end return f40_local0 end, Iter = function () local f41_local0 = Engine.GetLuiRoot() if not f41_local0 then return nil end local f41_local1 = LUI.FlowManager.IsInStack( f41_local0.flowManager, "menu_xboxlive_lobby" ) local f41_local2 = LUI.FlowManager.IsInStack( f41_local0.flowManager, "menu_xboxlive_privatelobby" ) local f41_local3 = LUI.FlowManager.IsInStack( f41_local0.flowManager, "menu_gamesetup_systemlink" ) local f41_local4 = LUI.FlowManager.IsInStack( f41_local0.flowManager, "menu_gamesetup_splitscreen" ) local f41_local5 = f41_local1 local f41_local6 = f41_local2 local f41_local7 if not f41_local3 then f41_local7 = not f41_local4 else f41_local7 = false end if not f41_local7 then return nil end local f41_local8 = {} if f41_local1 or f41_local2 then f41_local8.memberListState = Lobby.MemberListStates.Lobby else f41_local8.memberListState = Lobby.MemberListStates.Prelobby end f41_local8.memberListState = LobbyMemberListGetState( f41_local8.memberListState ) f41_local8.count = Lobby.GetMemberCount( f41_local8.memberListState ) if f41_local8.count <= 0 then return nil end f41_local8.maxSlots = Engine.IsAliensMode() and 4 or Lobby.MaxMemberListSlots f41_local8.index = 0 f41_local8.Next = KinectLobbyMember.Next return f41_local8.Next() end, FindCurrentSelected = function ( f42_arg0 ) local f42_local0 = Engine.GetLuiRoot() if not f42_local0 then return nil, nil end local f42_local1 = Engine.IsAliensMode() and 4 or Lobby.MaxMemberListSlots for f42_local2 = 1, f42_local1, 1 do local f42_local5 = f42_local0:getFirstDescendentById( "member_" .. f42_local2 ) if f42_local5 and f42_local5:isInFocus() and (not f42_local5.disabled or f42_local5.disabled == false) and Lobby.GetMemberControllerIndex( f42_local5.properties.memberListState, f42_local5.properties.memberSlot, f42_local5.properties.team ) == f42_arg0 then local f42_local6 = f42_local5.properties.isActiveMemberSlot local f42_local7 = { memberListState = f42_local5.properties.memberListState, count = Lobby.GetMemberCount( f42_local7.memberListState ), maxSlots = f42_local1, index = f42_local5.properties.memberIndex, Next = KinectLobbyMember.Next } if f42_local6 then f42_local7.isActiveMemberSlot = true f42_local7.slot = f42_local5.properties.memberSlot f42_local7.team = f42_local5.properties.team f42_local7.gamerTag = f42_local5.properties.gamerTag f42_local7.muted = Lobby.IsMemberMuted( f42_local7.memberListState, f42_local7.slot, f42_local7.team ) else f42_local7.isActiveMemberSlot = false f42_local7.slot = -1 f42_local7.team = -1 f42_local7.gamerTag = "" f42_local7.muted = false end return f42_local7, f42_local5 end end return nil, nil end } Kinect.DebugDumpPartyPlayers = function () DebugPrint( "Current party members:" ) local f43_local0 = KinectLobbyMember.Iter() while f43_local0 ~= nil do if f43_local0.isActiveMemberSlot == true then DebugPrint( " #" .. f43_local0.index .. " : gamerTag = \"" .. tostring( f43_local0.gamerTag ) .. "\", muted = " .. tostring( f43_local0.muted ) ) else DebugPrint( " #" .. f43_local0.index .. " : ---" ) end f43_local0 = f43_local0.Next() end DebugPrint( " " ) end Kinect.LobbyHandleSpeechCompare = function ( f44_arg0, f44_arg1, f44_arg2 ) if Kinect.DISABLE_CERTAIN_LOBBY_MUTE_AND_COMPARE_OPERATIONS == true then DebugPrint( "Speech: This operation is disabled via the DISABLE_CERTAIN_LOBBY_MUTE_AND_COMPARE_OPERATIONS flag." ) LUI.Speech.SquelchSpeechAction() return else local f44_local0, f44_local1 = nil f44_local0, f44_local1 = KinectLobbyMember.FindCurrentSelected( f44_arg1.controller ) if not f44_local0 then return elseif not f44_local1 then return elseif f44_local0.isActiveMemberSlot ~= true then return else local f44_local2 = LUI.FlowManager.GetMenuScopedDataFromElement( f44_local1 ) if f44_local2.animating == true then return elseif f44_local2.focusedPage ~= 2 then return else f44_local2.force_press_lobby_navigation_arrow_right_btn = true Kinect.PressMenuButton( "lobby_navigation_arrow_right_btn" ) LUI.Speech.PerformingSpeechAction() end end end end Kinect.LobbyHandleSpeechMute = function ( f45_arg0, f45_arg1, f45_arg2 ) assert( f45_arg2 ~= nil, "Kinect.LobbyHandleSpeechMute: Missing extradata param!" ) assert( f45_arg2.mute ~= nil, "Kinect.LobbyHandleSpeechMute: Missing extradata.mute param!" ) if Kinect.DISABLE_CERTAIN_LOBBY_MUTE_AND_COMPARE_OPERATIONS == true then DebugPrint( "Speech: This operation is disabled via the DISABLE_CERTAIN_LOBBY_MUTE_AND_COMPARE_OPERATIONS flag." ) LUI.Speech.SquelchSpeechAction() return end local f45_local0, f45_local1 = nil f45_local0, f45_local1 = KinectLobbyMember.FindCurrentSelected( f45_arg1.controller ) if not f45_local0 then return elseif f45_local0.isActiveMemberSlot ~= true then return elseif Lobby.IsMemberALocalPlayer( f45_local0.memberListState, f45_local0.slot, f45_local0.team ) == false then if Lobby.MemberToggleMute then if f45_arg2.mute == true then if Lobby.IsMemberMuted( f45_local0.memberListState, f45_local0.slot, f45_local0.team ) == false then DebugPrint( "Kinect: Muting player \"" .. f45_local0.gamerTag .. "\"" ) Lobby.MemberToggleMute( f45_local0.memberListState, f45_local0.slot, f45_local0.team ) end elseif Lobby.IsMemberMuted( f45_local0.memberListState, f45_local0.slot, f45_local0.team ) == true then DebugPrint( "Kinect: Unmuting player \"" .. f45_local0.gamerTag .. "\"" ) Lobby.MemberToggleMute( f45_local0.memberListState, f45_local0.slot, f45_local0.team ) end LUI.Speech.PerformingSpeechAction() end else DebugPrint( "Kinect: Warning, cannot mute or unmute local player \"" .. tostring( f45_local0.gamerTag ) .. "\"" ) end end Kinect.LobbyHandleSpeechMuteAll = function ( f46_arg0, f46_arg1, f46_arg2 ) assert( f46_arg2 ~= nil, "Kinect.LobbyHandleSpeechMuteAll: Missing extradata param!" ) assert( f46_arg2.mute ~= nil, "Kinect.LobbyHandleSpeechMuteAll: Missing extradata.mute param!" ) if f46_arg2.mute == true then if Lobby.MuteAllPlayers then DebugPrint( "Kinect: Muting all players." ) Lobby.MuteAllPlayers() LUI.Speech.PerformingSpeechAction() end elseif Lobby.UnmuteAllPlayers then DebugPrint( "Kinect: Unmuting all players." ) Lobby.UnmuteAllPlayers() LUI.Speech.PerformingSpeechAction() end end Kinect.LobbyHandleSpeechMuteFriends = function ( f47_arg0, f47_arg1, f47_arg2 ) assert( f47_arg2 ~= nil, "Kinect.LobbyHandleSpeechMuteFriends: Missing extradata param!" ) assert( f47_arg2.mute ~= nil, "Kinect.LobbyHandleSpeechMuteFriends: Missing extradata.mute param!" ) if Kinect.DISABLE_CERTAIN_LOBBY_MUTE_AND_COMPARE_OPERATIONS == true then DebugPrint( "Speech: This operation is disabled via the DISABLE_CERTAIN_LOBBY_MUTE_AND_COMPARE_OPERATIONS flag." ) LUI.Speech.SquelchSpeechAction() return else DebugPrint( "Kinect: Error, MUTE/UNMUTE FRIENDS not implemented!" ) end end Kinect.LobbyHandleSpeechMuteNonFriends = function ( f48_arg0, f48_arg1, f48_arg2 ) assert( f48_arg2 ~= nil, "Kinect.LobbyHandleSpeechMuteNonFriends: Missing extradata param!" ) assert( f48_arg2.mute ~= nil, "Kinect.LobbyHandleSpeechMuteNonFriends: Missing extradata.mute param!" ) if Kinect.DISABLE_CERTAIN_LOBBY_MUTE_AND_COMPARE_OPERATIONS == true then DebugPrint( "Speech: This operation is disabled via the DISABLE_CERTAIN_LOBBY_MUTE_AND_COMPARE_OPERATIONS flag." ) LUI.Speech.SquelchSpeechAction() return elseif f48_arg2.mute == true then if Lobby.MuteAllPlayersButFriends then Lobby.MuteAllPlayersButFriends() LUI.Speech.PerformingSpeechAction() end else DebugPrint( "Kinect: Error, UNMUTE NON FRIENDS not implemented!" ) end end Kinect.LobbyHandleSpeechMuteParty = function ( f49_arg0, f49_arg1, f49_arg2 ) assert( f49_arg2 ~= nil, "Kinect.LobbyHandleSpeechMuteParty: Missing extradata param!" ) assert( f49_arg2.mute ~= nil, "Kinect.LobbyHandleSpeechMuteParty: Missing extradata.mute param!" ) if Kinect.DISABLE_CERTAIN_LOBBY_MUTE_AND_COMPARE_OPERATIONS == true then DebugPrint( "Speech: This operation is disabled via the DISABLE_CERTAIN_LOBBY_MUTE_AND_COMPARE_OPERATIONS flag." ) LUI.Speech.SquelchSpeechAction() return else DebugPrint( "Kinect: Error, MUTE/UNMUTE PARTY not implemented!" ) end end Kinect.LobbyHandleSpeechMuteNonParty = function ( f50_arg0, f50_arg1, f50_arg2 ) assert( f50_arg2 ~= nil, "Kinect.LobbyHandleSpeechMuteNonParty: Missing extradata param!" ) assert( f50_arg2.mute ~= nil, "Kinect.LobbyHandleSpeechMuteNonParty: Missing extradata.mute param!" ) if Kinect.DISABLE_CERTAIN_LOBBY_MUTE_AND_COMPARE_OPERATIONS == true then DebugPrint( "Speech: This operation is disabled via the DISABLE_CERTAIN_LOBBY_MUTE_AND_COMPARE_OPERATIONS flag." ) LUI.Speech.SquelchSpeechAction() return elseif f50_arg2.mute == true then if Lobby.MuteAllPlayersButParty then Lobby.MuteAllPlayersButParty() LUI.Speech.PerformingSpeechAction() end else DebugPrint( "Kinect: Error, UNMUTE NON PARTY not implemented!" ) end end if Engine.HasSpeechFeature() then Kinect.LobbySpeechGrammarHandlersArray = { { action = "compare", confidence = LUI.Speech.compareConfidence, handler = Kinect.LobbyHandleSpeechCompare, extradata = nil }, { action = "mute", confidence = LUI.Speech.muteConfidence, handler = Kinect.LobbyHandleSpeechMute, extradata = { mute = true } }, { action = "unmute", confidence = LUI.Speech.muteConfidence, handler = Kinect.LobbyHandleSpeechMute, extradata = { mute = false } }, { action = "mute all", confidence = LUI.Speech.muteConfidence, handler = Kinect.LobbyHandleSpeechMuteAll, extradata = { mute = true } }, { action = "unmute all", confidence = LUI.Speech.muteConfidence, handler = Kinect.LobbyHandleSpeechMuteAll, extradata = { mute = false } }, { action = "mute friends", confidence = LUI.Speech.muteConfidence, handler = Kinect.LobbyHandleSpeechMuteFriends, extradata = { mute = true } }, { action = "unmute friends", confidence = LUI.Speech.muteConfidence, handler = Kinect.LobbyHandleSpeechMuteFriends, extradata = { mute = false } }, { action = "mute non friends", confidence = LUI.Speech.muteConfidence, handler = Kinect.LobbyHandleSpeechMuteNonFriends, extradata = { mute = true } }, { action = "unmute non friends", confidence = LUI.Speech.muteConfidence, handler = Kinect.LobbyHandleSpeechMuteNonFriends, extradata = { mute = false } }, { action = "mute party", confidence = LUI.Speech.muteConfidence, handler = Kinect.LobbyHandleSpeechMuteParty, extradata = { mute = true } }, { action = "unmute party", confidence = LUI.Speech.muteConfidence, handler = Kinect.LobbyHandleSpeechMuteParty, extradata = { mute = false } }, { action = "mute non party", confidence = LUI.Speech.muteConfidence, handler = Kinect.LobbyHandleSpeechMuteNonParty, extradata = { mute = true } }, { action = "unmute non party", confidence = LUI.Speech.muteConfidence, handler = Kinect.LobbyHandleSpeechMuteNonParty, extradata = { mute = false } } } else Kinect.LobbySpeechGrammarHandlersArray = {} end