public void RemovePlayer(string playerToRemove) { if (PlayerStatusList.ContainsKey(playerToRemove)) { PlayerStatusList.TryRemove(playerToRemove, out _); } }
public void RemovePlayer(string playerToRemove) { if (PlayerStatusList.ContainsKey(playerToRemove)) { PlayerStatusList.TryRemove(playerToRemove, out _); LunaLog.Log($"[LMP]: Removed {playerToRemove} from Status list"); } }
public PlayerStatus GetPlayerStatus(string playerName) { if (playerName == SettingsSystem.CurrentSettings.PlayerName) { return(MyPlayerStatus); } return(PlayerStatusList.ContainsKey(playerName) ? PlayerStatusList[playerName] : null); }
private void InitializePlayerStatusList() { var playerNamesToMonitor = ConfigurationManager.AppSettings["PlayerNamesToMonitor"].Split(';'); foreach (var playerName in playerNamesToMonitor) { PlayerStatusList.Add(new PlayerStatusViewModel(playerName)); } }
public void RemovePlayer(string playerToRemove) { if (PlayerStatusList.ContainsKey(playerToRemove)) { PlayerStatusList.Remove(playerToRemove); Debug.Log($"[LMP]: Removed {playerToRemove} from Status list"); } else { Debug.LogError("[LMP]: Cannot remove non-existant player " + playerToRemove); } }
private void MonitorServicePlayerStatusChanged(PlayerStatusModel playerStatusModel) { if (PlayerStatusChanged != null) { PlayerStatusChanged(playerStatusModel); } var updatedPlayer = PlayerStatusList.First(x => x.Name == playerStatusModel.Name); updatedPlayer.Status = playerStatusModel.Status; updatedPlayer.PlayerProfileUrl = playerStatusModel.PlayerProfileUrl; }
public void RemovePlayer(string playerToRemove) { if (PlayerStatusList.ContainsKey(playerToRemove)) { PlayerStatusList.TryRemove(playerToRemove, out _); LunaLog.Log($"[LMP]: Removed {playerToRemove} from Status list"); } else { LunaLog.LogError($"[LMP]: Cannot remove non-existant player {playerToRemove}"); } }
protected override void OnDisabled() { base.OnDisabled(); PlayerStatusList.Clear(); MyPlayerStatus.StatusText = "Syncing"; }
public PlayerStatus GetPlayerStatus(string playerName) { return(PlayerStatusList.ContainsKey(playerName) ? PlayerStatusList[playerName] : null); }
public void Start() { _monitorService.Start(PlayerStatusList.Select(x => x.Name)); }
protected override void OnDisabled() { base.OnDisabled(); PlayerStatusList.Clear(); }
public override void OnDisabled() { base.OnDisabled(); PlayerStatusList.Clear(); }