A class in Root.Township, Alta.Map.
Server: reads per-player save files of one format from a save subfolder named after T (for example landmark data). One singleton per format through Instance.
Constructors
1 private and internal constructor
Fields
1 private and internal field
Properties
| Member | What it is |
|---|
IAltaFolder DataFolder { get; } | The save subfolder for this format, named after the type T. |
static PlayerDataFileHelper<T> Instance { get; } | The helper for format T, created on first access. |
Methods
| Member | What it is |
|---|
Task<IAltaFile> GetFileAsync(IPlayer player) | Gets the file for a player, <user id>.bytes, from an IPlayer or a user ID. |
Task<IAltaFile> GetFileAsync(int playerIdentifier) | Gets the file for a player, <user id>.bytes, from an IPlayer or a user ID. |
Task<IAltaFile> GetSharedAsync() | Gets the shared file, Shared.bytes, for data not tied to one player. |
1 private and internal method
| Member | What it is |
|---|
private async Task<IAltaFile> GetAsync(string name) | Reads the named file in DataFolder, giving it new empty content if it did not exist. |