UserInfoAccess
A class in Root.Township, the global namespace.
A user given by id or username, looked up through Alta's web API on first use and cached. Console commands use it for user arguments. The API is gone, so lookups wait for the timeout unless a mod answers them.
- Listed in Global namespace: T to X
- Derived types
UserList - Attributes
TypeConverter - Documented in Arguments and results
Constructors
| Member | What it is |
|---|---|
UserInfoAccess(int userIdentifier) | Creates an UserInfoAccess from userInfo. |
UserInfoAccess(string username) | Creates an UserInfoAccess from userInfo. |
UserInfoAccess(UserInfo userInfo) | Creates an UserInfoAccess from userInfo. |
Fields
7 private and internal fields
| Member | What it is |
|---|---|
private bool hasSearched | True once a lookup has run, so later calls use the result. |
private static Dictionary<int, UserInfo> idCache | Static cache of looked-up users by ID, shared by all instances. |
private bool isByUsername | True when made from a username rather than an ID. |
private static Dictionary<string, UserInfo> nameCache | Static cache of looked-up users by lower-case username. |
private int userIdentifier | The user ID this access was made with, or the found user's ID. |
private UserInfo userInfo | Backing field for UserInfo. Null until a lookup finds the user. |
private string username | Lower-cased username this access was made with. |
Properties
| Member | What it is |
|---|---|
UserInfo UserInfo { get; } | The user info, or null before the lookup or if not found. |
1 private and internal property
Methods
2 private and internal methods
Used in
Members of other types that take, return or hold a UserInfoAccess:
GameCommandModule.ConnectToPlayer, SavingCommandModule.WipePlayer, SocialCommandModule.AddFriend, SocialCommandModule.ListFriends, SocialCommandModule.RemoveFriend, TradeCommandModule.GetContent, TradeCommandModule.PostBox, TradeCommandModule.PostBoxString, TradeCommandModule.ATMCommandModule.AddATM, TradeCommandModule.ATMCommandModule.GetATM, TradeCommandModule.ATMCommandModule.SetATM, UsersCommandModule.LoginAsync, WackyCommandModule.CleanPlayerBody, WackyCommandModule.CleanPlayerState, LeaderboardManager.RankedPlayer.UserInfo, TradeCommandModule.GetContent, TradeCommandModule.PostBox, TradeCommandModule.PostBoxString, TradeCommandModule.ATMCommandModule.AddATM, TradeCommandModule.ATMCommandModule.GetATM, TradeCommandModule.ATMCommandModule.SetATM, UserList.GetEnumerator, UserList.LastList, UserList.players, UserList.UserList.