public List <string> GetMultiplayerOptionsList(MultiplayerOptions.OptionType optionType) { List <string> stringList1 = new List <string>(); switch (optionType) { case MultiplayerOptions.OptionType.ClanMatchType: stringList1 = Module.CurrentModule.GetMultiplayerGameTypes().Select <MultiplayerGameTypeInfo, string>((Func <MultiplayerGameTypeInfo, string>)(q => q.GameType)).ToList <string>(); stringList1.Remove("FreeForAll"); stringList1.Remove("TeamDeathmatch"); stringList1.Remove("Duel"); stringList1.Remove("Siege"); break; case MultiplayerOptions.OptionType.GameType: stringList1 = Module.CurrentModule.GetMultiplayerGameTypes().Select <MultiplayerGameTypeInfo, string>((Func <MultiplayerGameTypeInfo, string>)(q => q.GameType)).ToList <string>(); break; case MultiplayerOptions.OptionType.Map: if (this.CurrentOptionsCategory == MultiplayerOptions.OptionsCategory.Default) { stringList1 = MultiplayerGameTypes.GetGameTypeInfo(MultiplayerOptions.OptionType.GameType.GetStrValue()).Scenes.ToList <string>(); break; } if (this.CurrentOptionsCategory == MultiplayerOptions.OptionsCategory.ClanMatch) { MultiplayerOptions.OptionType.ClanMatchType.GetStrValue(); stringList1 = this.GetAvailableClanMatchScenes(); break; } break; case MultiplayerOptions.OptionType.CultureTeam1: case MultiplayerOptions.OptionType.CultureTeam2: stringList1 = MBObjectManager.Instance.GetObjectTypeList <BasicCultureObject>().Where <BasicCultureObject>((Func <BasicCultureObject, bool>)(c => c.IsMainCulture)).Select <BasicCultureObject, string>((Func <BasicCultureObject, string>)(x => x.StringId)).ToList <string>(); break; case MultiplayerOptions.OptionType.SpectatorCamera: List <string> stringList2 = new List <string>(); stringList2.Add(SpectatorCameraTypes.LockToAnyAgent.ToString()); SpectatorCameraTypes spectatorCameraTypes = SpectatorCameraTypes.LockToAnyPlayer; stringList2.Add(spectatorCameraTypes.ToString()); spectatorCameraTypes = SpectatorCameraTypes.LockToTeamMembers; stringList2.Add(spectatorCameraTypes.ToString()); spectatorCameraTypes = SpectatorCameraTypes.LockToTeamMembersView; stringList2.Add(spectatorCameraTypes.ToString()); stringList1 = stringList2; break; case MultiplayerOptions.OptionType.AutoTeamBalanceThreshold: List <string> stringList3 = new List <string>(); for (int index = 0; index < 6; ++index) { stringList3.Add(((AutoTeamBalanceLimits)index).ToString()); } stringList1 = stringList3; break; } return(stringList1); }
public List <string> GetMapList() { MultiplayerGameTypeInfo multiplayerGameTypeInfo = (MultiplayerGameTypeInfo)null; if (this.CurrentOptionsCategory == MultiplayerOptions.OptionsCategory.Default) { multiplayerGameTypeInfo = MultiplayerGameTypes.GetGameTypeInfo(MultiplayerOptions.OptionType.GameType.GetStrValue()); } else if (this.CurrentOptionsCategory == MultiplayerOptions.OptionsCategory.ClanMatch) { multiplayerGameTypeInfo = MultiplayerGameTypes.GetGameTypeInfo(MultiplayerOptions.OptionType.ClanMatchType.GetStrValue()); } List <string> stringList = new List <string>(); stringList.Clear(); if (multiplayerGameTypeInfo.Scenes.Count > 0) { stringList.Add(multiplayerGameTypeInfo.Scenes[0]); MultiplayerOptions.OptionType.Map.SetValue(stringList[0]); } return(stringList); }
public static void Initialize() { MultiplayerGameTypes.CreateGameTypeInformations(); MultiplayerGameTypes.LoadMultiplayerSceneInformations(); }
void IGameNetworkHandler.OnInitialize() => MultiplayerGameTypes.Initialize();