Server (Phase A): - CustomLobby: +HostReady/GuestReady/HostFirstTurnPref/GuestFirstTurnPref/MaxPlayers - Migration: AddReadyUpSystem — applied to prod DB - GameJoinCustomLobbyHandler: no longer auto-creates session; sets Full status, resets readiness, pushes CustomLobbyGuestJoinedPush to host - GameLobbyReadyHandler (NEW): game.custom.lobby.ready — marks caller ready, resolves first-turn, creates session + pushes game.custom.started when all ready - GameUnreadyHandler (NEW): game.custom.lobby.unready - GameChangeLobbyDeckHandler (NEW): game.custom.lobby.change_deck - GameUpdateLobbyRulesHandler (NEW): game.custom.update_rules (host only) - GameListActiveLobbiesHandler (NEW): game.custom.list_active (Status==Started) - GameListCustomLobbiesHandler: now batch-loads host/guest display names - GameMessages: +LobbyReadyRequest/Response, UnreadyInLobbyRequest/Response, ChangeLobbyDeckRequest/Response, UpdateLobbyRulesRequest/Response, ListActiveLobbiesRequest/Response, LobbyReadyStatusPush, LobbyDeckChangedPush, ActiveLobbyDto; CustomLobbyDto +HostDisplayName/GuestDisplayName - ServiceRegistration: register 5 new handlers Client (Phase B): - CustomLobby.gd: new autoload for Free Play lobby state + all server calls - project.godot: register CustomLobby autoload - MainScreen: +Free Play button → FreePlayScreen.tscn - FreePlayScreen (NEW): Open Lobbies tab + Active Games tab + Create dialog - LobbyRoomScreen (NEW): ready-up UI, first-turn selector, preset voting - Game.gd: +is_spectating, +start_spectating(), +stop_spectating() - game_screen.gd: spectator mode — SPECTATING label, hidden action buttons, neutral HUD labels, stop_spectating() on exit Generated with [Claude Code](https://claude.ai/code) via [Happy](https://happy.engineering) Co-Authored-By: Claude <noreply@anthropic.com> Co-Authored-By: Happy <yesreply@happy.engineering>
238 lines
7.0 KiB
Plaintext
238 lines
7.0 KiB
Plaintext
[gd_scene load_steps=2 format=3]
|
|
|
|
[ext_resource type="Script" path="res://scenes/free_play/free_play_screen.gd" id="1_fps"]
|
|
|
|
[node name="FreePlayScreen" type="Control"]
|
|
layout_mode = 3
|
|
anchors_preset = 15
|
|
anchor_right = 1.0
|
|
anchor_bottom = 1.0
|
|
grow_horizontal = 2
|
|
grow_vertical = 2
|
|
script = ExtResource("1_fps")
|
|
|
|
[node name="Background" type="ColorRect" parent="."]
|
|
layout_mode = 1
|
|
anchors_preset = 15
|
|
anchor_right = 1.0
|
|
anchor_bottom = 1.0
|
|
grow_horizontal = 2
|
|
grow_vertical = 2
|
|
color = Color(0.094, 0.094, 0.137, 1.0)
|
|
|
|
[node name="Layout" type="VBoxContainer" parent="."]
|
|
layout_mode = 1
|
|
anchors_preset = 15
|
|
anchor_right = 1.0
|
|
anchor_bottom = 1.0
|
|
grow_horizontal = 2
|
|
grow_vertical = 2
|
|
theme_override_constants/separation = 0
|
|
|
|
[node name="Header" type="HBoxContainer" parent="Layout"]
|
|
layout_mode = 2
|
|
custom_minimum_size = Vector2(0, 56)
|
|
theme_override_constants/separation = 12
|
|
|
|
[node name="HeaderMargin" type="MarginContainer" parent="Layout/Header"]
|
|
layout_mode = 2
|
|
size_flags_horizontal = 3
|
|
theme_override_constants/margin_left = 16
|
|
theme_override_constants/margin_right = 16
|
|
|
|
[node name="HeaderInner" type="HBoxContainer" parent="Layout/Header/HeaderMargin"]
|
|
layout_mode = 2
|
|
size_flags_horizontal = 3
|
|
|
|
[node name="BackBtn" type="Button" parent="Layout/Header/HeaderMargin/HeaderInner"]
|
|
layout_mode = 2
|
|
text = "← Back"
|
|
theme_override_font_sizes/font_size = 14
|
|
|
|
[node name="TitleLabel" type="Label" parent="Layout/Header/HeaderMargin/HeaderInner"]
|
|
layout_mode = 2
|
|
size_flags_horizontal = 3
|
|
text = "FREE PLAY"
|
|
horizontal_alignment = 1
|
|
theme_override_font_sizes/font_size = 20
|
|
|
|
[node name="HeaderSpacer" type="Control" parent="Layout/Header/HeaderMargin/HeaderInner"]
|
|
layout_mode = 2
|
|
custom_minimum_size = Vector2(70, 0)
|
|
|
|
[node name="Separator" type="HSeparator" parent="Layout"]
|
|
layout_mode = 2
|
|
|
|
[node name="TabBar" type="HBoxContainer" parent="Layout"]
|
|
layout_mode = 2
|
|
custom_minimum_size = Vector2(0, 44)
|
|
theme_override_constants/separation = 0
|
|
|
|
[node name="TabMargin" type="MarginContainer" parent="Layout/TabBar"]
|
|
layout_mode = 2
|
|
size_flags_horizontal = 3
|
|
theme_override_constants/margin_left = 12
|
|
theme_override_constants/margin_right = 12
|
|
|
|
[node name="TabInner" type="HBoxContainer" parent="Layout/TabBar/TabMargin"]
|
|
layout_mode = 2
|
|
size_flags_horizontal = 3
|
|
|
|
[node name="OpenTabBtn" type="Button" parent="Layout/TabBar/TabMargin/TabInner"]
|
|
unique_name_in_owner = true
|
|
layout_mode = 2
|
|
size_flags_horizontal = 3
|
|
text = "Open Lobbies"
|
|
theme_override_font_sizes/font_size = 14
|
|
|
|
[node name="ActiveTabBtn" type="Button" parent="Layout/TabBar/TabMargin/TabInner"]
|
|
unique_name_in_owner = true
|
|
layout_mode = 2
|
|
size_flags_horizontal = 3
|
|
text = "Active Games"
|
|
theme_override_font_sizes/font_size = 14
|
|
|
|
[node name="TabRightSpacer" type="Control" parent="Layout/TabBar/TabMargin/TabInner"]
|
|
layout_mode = 2
|
|
size_flags_horizontal = 3
|
|
|
|
[node name="CreateBtn" type="Button" parent="Layout/TabBar/TabMargin/TabInner"]
|
|
unique_name_in_owner = true
|
|
layout_mode = 2
|
|
custom_minimum_size = Vector2(100, 0)
|
|
text = "+ Create"
|
|
theme_override_font_sizes/font_size = 14
|
|
|
|
[node name="FilterBar" type="HBoxContainer" parent="Layout"]
|
|
layout_mode = 2
|
|
custom_minimum_size = Vector2(0, 40)
|
|
theme_override_constants/separation = 8
|
|
|
|
[node name="FilterMargin" type="MarginContainer" parent="Layout/FilterBar"]
|
|
layout_mode = 2
|
|
size_flags_horizontal = 3
|
|
theme_override_constants/margin_left = 12
|
|
theme_override_constants/margin_right = 12
|
|
|
|
[node name="FilterInner" type="HBoxContainer" parent="Layout/FilterBar/FilterMargin"]
|
|
layout_mode = 2
|
|
size_flags_horizontal = 3
|
|
theme_override_constants/separation = 8
|
|
|
|
[node name="SearchField" type="LineEdit" parent="Layout/FilterBar/FilterMargin/FilterInner"]
|
|
unique_name_in_owner = true
|
|
layout_mode = 2
|
|
size_flags_horizontal = 3
|
|
placeholder_text = "Search by name…"
|
|
|
|
[node name="PasswordToggle" type="CheckBox" parent="Layout/FilterBar/FilterMargin/FilterInner"]
|
|
unique_name_in_owner = true
|
|
layout_mode = 2
|
|
text = "Show password-protected"
|
|
button_pressed = true
|
|
|
|
[node name="RefreshBtn" type="Button" parent="Layout/FilterBar/FilterMargin/FilterInner"]
|
|
unique_name_in_owner = true
|
|
layout_mode = 2
|
|
text = "Refresh"
|
|
|
|
[node name="Scroll" type="ScrollContainer" parent="Layout"]
|
|
layout_mode = 2
|
|
size_flags_vertical = 3
|
|
|
|
[node name="ScrollContent" type="VBoxContainer" parent="Layout/Scroll"]
|
|
layout_mode = 2
|
|
size_flags_horizontal = 3
|
|
|
|
[node name="ScrollMargin" type="MarginContainer" parent="Layout/Scroll/ScrollContent"]
|
|
layout_mode = 2
|
|
theme_override_constants/margin_left = 12
|
|
theme_override_constants/margin_right = 12
|
|
theme_override_constants/margin_top = 8
|
|
theme_override_constants/margin_bottom = 8
|
|
|
|
[node name="LobbyListContainer" type="VBoxContainer" parent="Layout/Scroll/ScrollContent/ScrollMargin"]
|
|
unique_name_in_owner = true
|
|
layout_mode = 2
|
|
theme_override_constants/separation = 4
|
|
|
|
[node name="ActiveListContainer" type="VBoxContainer" parent="Layout/Scroll/ScrollContent/ScrollMargin"]
|
|
unique_name_in_owner = true
|
|
layout_mode = 2
|
|
theme_override_constants/separation = 4
|
|
visible = false
|
|
|
|
[node name="CreateDialog" type="AcceptDialog" parent="."]
|
|
unique_name_in_owner = true
|
|
visible = false
|
|
title = "Create Lobby"
|
|
initial_position = 4
|
|
min_size = Vector2(400, 340)
|
|
|
|
[node name="CreateContent" type="VBoxContainer" parent="CreateDialog"]
|
|
layout_mode = 1
|
|
anchors_preset = 15
|
|
anchor_right = 1.0
|
|
anchor_bottom = 1.0
|
|
grow_horizontal = 2
|
|
grow_vertical = 2
|
|
theme_override_constants/separation = 10
|
|
|
|
[node name="NameLabel" type="Label" parent="CreateDialog/CreateContent"]
|
|
layout_mode = 2
|
|
text = "Lobby Name:"
|
|
|
|
[node name="LobbyNameField" type="LineEdit" parent="CreateDialog/CreateContent"]
|
|
unique_name_in_owner = true
|
|
layout_mode = 2
|
|
placeholder_text = "My Awesome Lobby"
|
|
|
|
[node name="PwLabel" type="Label" parent="CreateDialog/CreateContent"]
|
|
layout_mode = 2
|
|
text = "Password (optional):"
|
|
|
|
[node name="LobbyPasswordField" type="LineEdit" parent="CreateDialog/CreateContent"]
|
|
unique_name_in_owner = true
|
|
layout_mode = 2
|
|
placeholder_text = "Leave blank for public"
|
|
secret = true
|
|
|
|
[node name="DeckLabel" type="Label" parent="CreateDialog/CreateContent"]
|
|
layout_mode = 2
|
|
text = "Select Deck:"
|
|
|
|
[node name="DeckScroll" type="ScrollContainer" parent="CreateDialog/CreateContent"]
|
|
layout_mode = 2
|
|
custom_minimum_size = Vector2(0, 100)
|
|
|
|
[node name="DeckSelectContainer" type="VBoxContainer" parent="CreateDialog/CreateContent/DeckScroll"]
|
|
unique_name_in_owner = true
|
|
layout_mode = 2
|
|
size_flags_horizontal = 3
|
|
theme_override_constants/separation = 4
|
|
|
|
[node name="JoinPasswordDialog" type="AcceptDialog" parent="."]
|
|
unique_name_in_owner = true
|
|
visible = false
|
|
title = "Password Required"
|
|
initial_position = 4
|
|
min_size = Vector2(300, 120)
|
|
|
|
[node name="JoinPwContent" type="VBoxContainer" parent="JoinPasswordDialog"]
|
|
layout_mode = 1
|
|
anchors_preset = 15
|
|
anchor_right = 1.0
|
|
anchor_bottom = 1.0
|
|
grow_horizontal = 2
|
|
grow_vertical = 2
|
|
theme_override_constants/separation = 8
|
|
|
|
[node name="JoinPwLabel" type="Label" parent="JoinPasswordDialog/JoinPwContent"]
|
|
layout_mode = 2
|
|
text = "Enter lobby password:"
|
|
|
|
[node name="JoinPasswordField" type="LineEdit" parent="JoinPasswordDialog/JoinPwContent"]
|
|
unique_name_in_owner = true
|
|
layout_mode = 2
|
|
secret = true
|