Ability work and portal fixes....
This commit is contained in:
@@ -296,7 +296,7 @@ func _on_logout_pressed():
|
||||
|
||||
# Reset GameState
|
||||
if GameState:
|
||||
GameState.reset_state()
|
||||
GameState.set_state(0)
|
||||
|
||||
# Return to login screen
|
||||
get_tree().change_scene_to_file("res://scenes/ui/login.tscn")
|
||||
|
||||
+6
-2
@@ -39,9 +39,13 @@ func _on_state_changed(new_state: String):
|
||||
func _show_screen(state: String):
|
||||
print("[Main] _show_screen called with: ", state)
|
||||
|
||||
# Transitional states (portal exit, dungeon cleared) show the loading screen
|
||||
# while waiting for the server to send HUB_STATE.
|
||||
var is_transitioning = state == "PORTALUSED" or state == "DUNGEONCLEARED"
|
||||
|
||||
if loading_screen:
|
||||
_set_screen_visible(loading_screen, state == "LOADING")
|
||||
print("[Main] LoadingScreen visible: ", state == "LOADING")
|
||||
_set_screen_visible(loading_screen, state == "LOADING" or is_transitioning)
|
||||
print("[Main] LoadingScreen visible: ", state == "LOADING" or is_transitioning)
|
||||
if auth_screen:
|
||||
_set_screen_visible(auth_screen, state == "AUTH")
|
||||
print("[Main] AuthScreen visible: ", state == "AUTH")
|
||||
|
||||
Reference in New Issue
Block a user