Skip to main content

ServerClientLandmarkManager

A class in Root.Township, Alta.Map.

Server: one player's landmark knowledge. Loads their save file, sends their markers when they join and sends changes as they discover more.

Constructors​

MemberWhat it is
ServerClientLandmarkManager(ServerLandmarkManager landmarkManager, Player player, ControlledWriteSync initialSync, ControlledWriteSync changeSync)Creates a ServerClientLandmarkManager from landmarkManager, player, initialSync and changeSync.

Fields​

7 private and internal fields
MemberWhat it is
private MarkerInfo changeThe marker being sent by ChangeSync.
private ControlledWriteSync changeSyncSync used for single marker changes.
private ControlledWriteSync initialSyncSync used for the join-time marker list.
private ServerLandmarkManager landmarkManagerThe server landmark manager with all markers and default states.
private static Logger loggerLogger for sync warnings.
private LandmarkSaveFormat saveThe player's loaded landmark save, null until loaded.
private IAltaFile serverFileThe player's landmark file.

Properties​

MemberWhat it is
Player Player { get; }The player this belongs to.

Methods​

MemberWhat it is
void Aware(MarkerInfo info, bool isSaving = true)Server: marks a landmark as known but not discovered, saves it, and syncs it if it has an aware icon.
void ChangeSync(IPlayer player, Stream stream)Server: writes one marker with the icon for its state. Rejects the message if a client sends it.
void Discover(MarkerInfo info, bool isSaving = true)Server: marks a landmark as discovered, saves it, and syncs it.
void InitialSync(IPlayer player, Stream stream)Server: writes the default markers and every marker the player knows. Rejects the message if a client sends it.
bool IsAwareOrDiscovered(MarkerInfo info)True if the player's save has the landmark at all.
void Remove(MarkerInfo info)Server: forgets a landmark for the player, saves, and syncs the change.
void Sync(MarkerInfo info)Server: sends one marker to the player, skipped if their file is still loading.
void Unload()Queues the player's landmark file to unload.
1 private and internal method
MemberWhat it is
private async void BeginRead()Loads the player's landmark file, drops entries for markers that no longer exist, then sends the initial sync.

Used in​

Members of other types that take, return or hold a ServerClientLandmarkManager: