Skip to main content

ServerFeatureSetProvider

A static class in Root.Township, ATT.TownshipServer.

Works out this build's feature set (PC or mobile) and checks whether a server's target feature set matches it.

Fields​

2 private and internal fields
MemberWhat it is
private const int OldServerValueThe value old servers send, treated as PC.
private static FeatureSetFlags? serverTypeBacking field for FeatureSet.

Properties​

MemberWhat it is
static FeatureSetFlags FeatureSet { get; }This build's feature set flags, worked out once and cached.

Methods​

MemberWhat it is
static FeatureSetFlags GetEditorServerType()Throws in this build.
static bool IsServerValid(int targetAsInt)True if the server's feature set overlaps this build's. A value of 0 (old servers) counts as PC.
1 private and internal method
MemberWhat it is
private static FeatureSetFlags GetServerType()Mobile on Android, PC on Windows and Linux players. Throws on other platforms and in the editor.