public string GetGameName(string gameId) { string gameName; if (GameNames.TryGetValue(gameId, out gameName)) { return gameName; } return "Unknown"; }
public bool UpdateNaming(GameHandlerMetadata info) { // TODO: better logic so repositories can agree on game name if (GameNames.ContainsKey(info.GameID)) { return false; } GameNames.Add(info.GameID, info.GameTitle); return true; }
void SelectGame(GameNames game) { _selectedGame = game; _diffPage.SetActive(true); var animRectTr = _diffPage.transform.Find("frame").gameObject.GetComponent <RectTransform>(); animRectTr.localScale = new Vector3(1.2f, 1.2f, 1); animRectTr.DOScale(1, .3f).SetEase(Ease.OutBounce); }
public async void GetAllGames() { AmostiService amostiService = new AmostiService(); GameNames.Clear(); var gameResults = await amostiService.GetGames(); foreach (var item in gameResults) { if (item.GameName != null && item.GameName != "null") { GameNames.Add(item); } } }
public SquadCompositionFilterPanel(ImageProvider imageProvider, LogFilters filters) { var filterSnapshot = filters.CompositionFilters.DeepClone(); BeginVertical(spacing: new Size(5, 5)); { BeginHorizontal(); { // Core professions BeginVertical(spacing: new Size(2, 2)); { foreach (var filter in filterSnapshot.CoreProfessionFilters) { BeginHorizontal(); { var image = new ImageView { Image = imageProvider.GetTinyProfessionIcon(filter.Profession), ToolTip = $"Core {GameNames.GetName(filter.Profession)}" }; Add(image); Add(ConstructDropDown(filter)); Add(ConstructStepper(filter)); Add(null); } EndHorizontal(); } } EndVertical(); // Elite specializations var specializationFilterGroups = new[] { filterSnapshot.HeartOfThornsSpecializationFilters, filterSnapshot.PathOfFireSpecializationFilters }; foreach (var specializationFilters in specializationFilterGroups) { BeginVertical(spacing: new Size(2, 2)); { foreach (var filter in specializationFilters) { BeginHorizontal(); { var image = new ImageView { Image = imageProvider.GetTinyProfessionIcon(filter.EliteSpecialization), ToolTip = GameNames.GetName(filter.EliteSpecialization) }; Add(image); Add(ConstructDropDown(filter)); Add(ConstructStepper(filter)); Add(null); } EndHorizontal(); } } EndVertical(); } } EndHorizontal(); } EndVertical(); BeginVertical(new Padding(5, 5), new Size(5, 5)); { AddRow(null, ConstructResetButton(filterSnapshot), ConstructApplyButton(filters, filterSnapshot)); } EndVertical(); }
/// <summary> /// Finds the game this zip belongs to /// </summary> private void GetGame() { if(GetIndex("materials\\models\\survivors\\coach\\coach_head.vmt") != -1) m_gameName = GameNames.Left4Dead2Z1; if (GetIndex("scripts\\game_sounds_mechanic.txt") != -1) m_gameName = GameNames.Left4Dead2Z0; if (GetIndex("resouce\\left4dead_dlc1_english.txt") != -1) m_gameName = GameNames.Left4DeadGOTYZ0; if (GetIndex("scripts\\soundscapes_airport.txt") != -1) m_gameName = GameNames.Left4DeadOrgZ0; if (GetIndex("materials\\decals\\logo_mercyhospital.360.vtf") != -1) m_gameName = GameNames.Left4DeadOrgZ1; if (GetIndex("scripts\\soundscapes_hydro.txt") != -1) m_gameName = GameNames.TeamFortress; if (GetIndex("scripts\\npc_sounds_barney.txt") != -1) m_gameName = GameNames.HalfLife2; if (GetIndex("scripts\\npc_sounds_rocket_turret.txt") != -1) m_gameName = GameNames.Portal; if (GetIndex("models\\ballbot_animations.360.ani") != -1) m_gameName = GameNames.Portal2Z0; if (GetIndex("maps\\sp_a1_intro1_commentary.txt") != -1) m_gameName = GameNames.Portal2Z1; if (GetIndex("bin\\gc\\gcfiles.txt") != -1) m_gameName = GameNames.CounterStrike; }
public SpecializationStatistics(ImageProvider imageProvider) { BeginVertical(); { BeginHorizontal(); { BeginGroup("Profession counts", new Padding(5), new Size(5, 5), xscale: true); { foreach (var profession in ProfessionData.Professions.Select(x => x.Profession)) { professionCountLabels[profession] = new Label { Text = "Unknown" }; BeginHorizontal(); { var imageView = new ImageView { Image = imageProvider.GetTinyProfessionIcon(profession), ToolTip = GameNames.GetName(profession) }; Add(imageView); Add(professionCountLabels[profession]); } EndHorizontal(); } Add(null); } EndGroup(); BeginGroup("Specialization counts", xscale: true); { BeginHorizontal(); { BeginVertical(new Padding(5), new Size(5, 5)); { foreach (var profession in ProfessionData.Professions) { BeginHorizontal(); { coreCountLabels[profession.Profession] = new Label { Text = "Unknown", Width = 60 }; var coreImage = new ImageView { Image = imageProvider.GetTinyProfessionIcon(profession.Profession), ToolTip = $"Core {GameNames.GetName(profession.Profession)}" }; Add(coreImage); Add(coreCountLabels[profession.Profession]); foreach (var specialization in new[] { profession.HoT, profession.PoF }) { eliteCountLabels[specialization] = new Label { Text = "Unknown", Width = 60 }; var image = new ImageView { Image = imageProvider.GetTinyProfessionIcon(specialization), ToolTip = GameNames.GetName(specialization) }; Add(image); Add(eliteCountLabels[specialization]); } } EndHorizontal(); } Add(null); } EndVertical(); } EndHorizontal(); } EndGroup(); Add(null); } EndHorizontal(); Add(null, yscale: true); } EndVertical(); AddSeparateRow(null); }