VivoxPlayerPrefsMutedPlayerStore
A internal class in Root.Township, Alta.Voice. Reach it through att-stubs' publicized assemblies or Harmony's AccessTools.
Client store of muted player IDs, saved as JSON in Unity PlayerPrefs under MutedPlayersKey. Loads on first use.
Constructors
Fields
4 private and internal fields
| Member | What it is |
|---|
private bool hasLoaded | Whether Load has run. |
private static Logger logger | NLog logger for this class. |
private readonly HashSet<int> mutedList | Backing set for MutedList. |
private const string mutedPlayersKey | The PlayerPrefs key, "MutedPlayersKey". |
Properties
1 private and internal property
| Member | What it is |
|---|
private HashSet<int> MutedList { get; } | The muted set, loading it on first access. |
Methods
| Member | What it is |
|---|
bool Add(int userId) | Mutes a user ID and saves. Returns false if already muted. |
bool Contains(int userId) | Whether the user ID is muted. |
bool Remove(int userId) | Unmutes a user ID and saves. Returns false if it was not muted. |
2 private and internal methods
| Member | What it is |
|---|
private void Load() | Reads the muted list from PlayerPrefs; logs and keeps an empty list if parsing fails. |
private void Save() | Writes the muted list to PlayerPrefs as JSON. |