Update To new godot system, Migrate the login system to auth.mistox.com

This commit is contained in:
2025-12-01 19:16:49 -08:00
parent 3fc7c69a96
commit 063b70a4d5
168 changed files with 3652 additions and 1226 deletions
+16 -15
View File
@@ -1,5 +1,7 @@
using Godot;
using System;
using System.Diagnostics;
using System.Threading.Tasks;
public partial class MainMenu : Control {
Options _Options;
@@ -18,25 +20,24 @@ public partial class MainMenu : Control {
public async void _on_join_game_pressed() {
SettingsFile sf = _Options._SettingsFile;
GameSettings gs = sf.Game;
string userN = gs.UserName;
string passW = gs.SessionToken;
(bool, Account) User = await _Reference.MistoxNet.TrySession( userN, passW );
if( User.Item1 ) {
_Reference.Lighting.Environment.SsrEnabled = sf.Display.ScreenSpaceReflections;
_Reference.Lighting.Environment.SsaoEnabled = sf.Display.ScreenSpaceAmbiantOcclusion;
_Reference.Lighting.Environment.SdfgiEnabled = sf.Display.GlobalIllumination;
_Reference.GameHandler.Visible = true;
_Reference.GameUI.Visible = true;
Visible = false;
_Options.Host = GetNode<TextEdit>("Host").Text;
_Reference.GameHandler.StartClient();
this.Visible = false;
_Reference.PreGame.Visible = true;
} else {
(bool, Account) tAccount = await _Reference.MistoxNet.TryValidateSessionToken( gs.SessionToken );
if( !tAccount.Item1 ) {
_Reference.Alert.PerformAlert( "Login failed" );
_Reference.SessionHandler.GetParent<Control>().Visible = true;
return;
}
_Reference.Lighting.Environment.SsrEnabled = sf.Display.ScreenSpaceReflections;
_Reference.Lighting.Environment.SsaoEnabled = sf.Display.ScreenSpaceAmbiantOcclusion;
_Reference.Lighting.Environment.SdfgiEnabled = sf.Display.GlobalIllumination;
_Reference.GameHandler.Visible = true;
_Reference.GameUI.Visible = true;
Visible = false;
_Options.Host = GetNode<TextEdit>("Host").Text;
_Reference.GameHandler.StartClient();
this.Visible = false;
_Reference.PreGame.Visible = true;
}
public void _on_start_server_pressed(){