RedesignedAltaAccountLinker
A internal class in Root.Township, the global namespace. Reach it through att-stubs' publicized assemblies or Harmony's AccessTools.
Client login screen that signs in to an Alta account and links it to the player's platform account. Built on LoginAndRegisterHelper.
- Listed in Global namespace: Q to R
- Inherits or implements
LoginAndRegisterHelper
Constructors
| Member | What it is |
|---|---|
RedesignedAltaAccountLinker() | Unity makes components itself; use AddComponent or spawn a prefab instead of new. |
Fields
10 private and internal fields
| Member | What it is |
|---|---|
private IHighLevelApiClient apiClient | Injected high-level API client. |
private GameObject errorText | Object shown when login fails. |
private static readonly Logger logger | NLog logger. |
private ILoginPreferences loginPreferences | Injected login preferences, where the username is saved. |
private UnityEvent onFailedToLink | Event fired when linking fails. |
private UnityEvent onValidLink | Event fired when linking succeeds or isn't supported. |
private UnityEvent onValidLogin | Event fired when username and password login succeeds. |
private ScalingFadeAnimator scalingFadeAnimator | Animator used by LogoutAndFade. |
private const string ScreenName | Analytics screen name, Account Linking. |
private IUserService userService | Injected platform user service that does the linking. |
Methods
| Member | What it is |
|---|---|
async void AttemptLogin() | Logs in with the username and password fields and fires onValidLogin on success. |
void Logout() | Logs out of the API unless the UI is locked. |
void LogoutAndFade(GameObject fadeToOnLogout) | Logs out and fades to the given screen, unless the UI is locked. |
protected void Inject(IUserService userService, IHighLevelApiClient api, ILoginPreferences loginPrefs) | VContainer injection of the user service, API client and login preferences. |
protected override async Task InternalSubmit() | Saves the username, then links the platform account, or skips linking if the platform doesn't support it. |