Tell the user why they can't send requests on self-built instance
This commit is contained in:
@@ -61,6 +61,9 @@ public class AccountChangePassword : MonoBehaviour
|
||||
case "-997":
|
||||
AccountHandler.UpdateStatusText(changePasswordStatusText, "Encryption/decryption issues", Color.red);
|
||||
break;
|
||||
case "-996":
|
||||
AccountHandler.UpdateStatusText(changePasswordStatusText, "Can't send requests on self-built instance", Color.red);
|
||||
break;
|
||||
case "-1":
|
||||
AccountHandler.UpdateStatusText(changePasswordStatusText, "New Password is too short or too long", Color.red);
|
||||
break;
|
||||
@@ -88,4 +91,4 @@ public class AccountChangePassword : MonoBehaviour
|
||||
AccountHandler.UpdateStatusText(changePasswordStatusText, "Unknown server response " + response, Color.red);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -53,6 +53,9 @@ public class AccountChangeUsername : MonoBehaviour
|
||||
case "-997":
|
||||
AccountHandler.UpdateStatusText(changeUsernameStatusText, "Encryption/decryption issues", Color.red);
|
||||
break;
|
||||
case "-996":
|
||||
AccountHandler.UpdateStatusText(changeUsernameStatusText, "Can't send requests on self-built instance", Color.red);
|
||||
break;
|
||||
case "1":
|
||||
PlayerPrefs.SetString("userName", changeUsernameNewUsernameInput.text);
|
||||
AccountHandler.instance.SwitchPanel(0);
|
||||
@@ -73,4 +76,4 @@ public class AccountChangeUsername : MonoBehaviour
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -23,7 +23,8 @@ public class AccountLoggedIn : MonoBehaviour
|
||||
loggedInSaveButton.onClick.AddListener(() => SaveAccount());
|
||||
loggedInLoadButton.onClick.AddListener(() => LoadAccount());
|
||||
loggedInRefreshLoginButton.onClick.AddListener(() => AccountHandler.instance.SwitchPanel(6));
|
||||
loggedInLogoutButton.onClick.AddListener(() => {
|
||||
loggedInLogoutButton.onClick.AddListener(() =>
|
||||
{
|
||||
accountLoggedOut.clearValues = true;
|
||||
AccountHandler.instance.SwitchPanel(1);
|
||||
});
|
||||
@@ -81,6 +82,9 @@ public class AccountLoggedIn : MonoBehaviour
|
||||
case "-997":
|
||||
AccountHandler.UpdateStatusText(loggedInText, "Encryption/decryption issues", Color.red);
|
||||
break;
|
||||
case "-996":
|
||||
AccountHandler.UpdateStatusText(loggedInText, "Can't send requests on self-built instance", Color.red);
|
||||
break;
|
||||
case "1":
|
||||
AccountHandler.UpdateStatusText(loggedInText, "Synced account", Color.green);
|
||||
break;
|
||||
@@ -124,6 +128,9 @@ public class AccountLoggedIn : MonoBehaviour
|
||||
case "-997":
|
||||
AccountHandler.UpdateStatusText(loggedInText, "Encryption/decryption issues", Color.red);
|
||||
break;
|
||||
case "-996":
|
||||
AccountHandler.UpdateStatusText(loggedInText, "Can't send requests on self-built instance", Color.red);
|
||||
break;
|
||||
case "-1":
|
||||
AccountHandler.UpdateStatusText(loggedInText, "Failed to find info about your user (refresh login?)", Color.red);
|
||||
break;
|
||||
@@ -153,4 +160,4 @@ public class AccountLoggedIn : MonoBehaviour
|
||||
loggedInLoadButton.interactable = true;
|
||||
loggedInSaveButton.interactable = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -37,4 +37,4 @@ public class AccountLoggedOut : MonoBehaviour
|
||||
clearValues = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -58,6 +58,11 @@ public class AccountLogin : MonoBehaviour
|
||||
AccountHandler.UpdateStatusText(loginPanelStatusText, "Encryption/decryption issues", Color.red);
|
||||
return;
|
||||
}
|
||||
else if (response == "-996")
|
||||
{
|
||||
AccountHandler.UpdateStatusText(loginPanelStatusText, "Can't send requests on self-built instance", Color.red);
|
||||
return;
|
||||
}
|
||||
else if (response == "-1")
|
||||
{
|
||||
AccountHandler.UpdateStatusText(loginPanelStatusText, "Incorrect username or password", Color.red);
|
||||
@@ -93,4 +98,4 @@ public class AccountLogin : MonoBehaviour
|
||||
AccountHandler.UpdateStatusText(loginPanelStatusText, "Unknown server response", Color.red);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -55,6 +55,11 @@ public class AccountRefreshLogin : MonoBehaviour
|
||||
AccountHandler.UpdateStatusText(refreshLoginStatusText, "Encryption/decryption issues", Color.red);
|
||||
return;
|
||||
}
|
||||
else if (response == "-996")
|
||||
{
|
||||
AccountHandler.UpdateStatusText(refreshLoginStatusText, "Can't send requests on self-built instance", Color.red);
|
||||
return;
|
||||
}
|
||||
else if (response == "-1")
|
||||
{
|
||||
AccountHandler.UpdateStatusText(refreshLoginStatusText, "Incorrect username or password", Color.red);
|
||||
@@ -76,4 +81,4 @@ public class AccountRefreshLogin : MonoBehaviour
|
||||
AccountHandler.UpdateStatusText(refreshLoginStatusText, "Unknown server response", Color.red);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -75,6 +75,9 @@ public class AccountRegister : MonoBehaviour
|
||||
case "-997":
|
||||
AccountHandler.UpdateStatusText(registerPanelStatusText, "Encryption/decryption issues", Color.red);
|
||||
break;
|
||||
case "-996":
|
||||
AccountHandler.UpdateStatusText(registerPanelStatusText, "Can't send requests on self-built instance", Color.red);
|
||||
break;
|
||||
case "1":
|
||||
AccountHandler.instance.SwitchPanel(2);
|
||||
break;
|
||||
@@ -95,4 +98,4 @@ public class AccountRegister : MonoBehaviour
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user