Server: - RuleSuggestionService — in-memory pending suggestion store (one per lobby) - GameSuggestRulesHandler (game.custom.suggest_rules) — guest proposes rules - GameAcceptRuleSuggestionHandler (game.custom.suggest_rules.accept) — host applies suggestion - GameRejectRuleSuggestionHandler (game.custom.suggest_rules.reject) — host dismisses - New message types: SuggestRulesRequest/Response, AcceptRuleSuggestionRequest/Response, RejectRuleSuggestionRequest/Response, LobbyRuleSuggestionPush, LobbyRuleSuggestionRejectedPush - ServiceRegistration: register RuleSuggestionService + 3 new handlers Client: - CustomLobby.gd: rule_suggestion_received/rejected signals + suggest/accept/reject methods - LobbyRoomScreen.tscn: add SuggestionBanner (host accept/reject UI); EditRulesBtn always visible - lobby_room_screen.gd: replace OS.alert stub with full scrollable rules editor popup (SpinBoxes + CheckBoxes for all 17 rule fields, grouped by category); host sees "Apply", guest sees "Suggest"; SuggestionBanner shows proposed rules summary to host 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>
345 lines
11 KiB
Plaintext
345 lines
11 KiB
Plaintext
[gd_scene load_steps=2 format=3]
|
|
|
|
[ext_resource type="Script" path="res://scenes/free_play/lobby_room_screen.gd" id="1_lrs"]
|
|
|
|
[node name="LobbyRoomScreen" 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_lrs")
|
|
|
|
[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)
|
|
|
|
[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="LobbyTitleLabel" type="Label" parent="Layout/Header/HeaderMargin/HeaderInner"]
|
|
unique_name_in_owner = true
|
|
layout_mode = 2
|
|
size_flags_horizontal = 3
|
|
text = "LOBBY"
|
|
theme_override_font_sizes/font_size = 20
|
|
|
|
[node name="LeaveBtn" type="Button" parent="Layout/Header/HeaderMargin/HeaderInner"]
|
|
layout_mode = 2
|
|
text = "Leave"
|
|
theme_override_font_sizes/font_size = 14
|
|
|
|
[node name="Separator" type="HSeparator" parent="Layout"]
|
|
layout_mode = 2
|
|
|
|
[node name="VoteBanner" type="PanelContainer" parent="Layout"]
|
|
unique_name_in_owner = true
|
|
layout_mode = 2
|
|
visible = false
|
|
|
|
[node name="VoteInner" type="HBoxContainer" parent="Layout/VoteBanner"]
|
|
layout_mode = 2
|
|
theme_override_constants/separation = 12
|
|
|
|
[node name="VoteLabel" type="Label" parent="Layout/VoteBanner/VoteInner"]
|
|
unique_name_in_owner = true
|
|
layout_mode = 2
|
|
size_flags_horizontal = 3
|
|
text = "Accept preset?"
|
|
|
|
[node name="VoteYesBtn" type="Button" parent="Layout/VoteBanner/VoteInner"]
|
|
unique_name_in_owner = true
|
|
layout_mode = 2
|
|
text = "Yes"
|
|
|
|
[node name="VoteNoBtn" type="Button" parent="Layout/VoteBanner/VoteInner"]
|
|
unique_name_in_owner = true
|
|
layout_mode = 2
|
|
text = "No"
|
|
|
|
[node name="SuggestionBanner" type="PanelContainer" parent="Layout"]
|
|
unique_name_in_owner = true
|
|
layout_mode = 2
|
|
visible = false
|
|
|
|
[node name="SuggestionInner" type="VBoxContainer" parent="Layout/SuggestionBanner"]
|
|
layout_mode = 2
|
|
theme_override_constants/separation = 6
|
|
|
|
[node name="SuggestionLabel" type="Label" parent="Layout/SuggestionBanner/SuggestionInner"]
|
|
unique_name_in_owner = true
|
|
layout_mode = 2
|
|
size_flags_horizontal = 3
|
|
text = "Guest suggested rule changes:"
|
|
|
|
[node name="SuggestionRulesLabel" type="Label" parent="Layout/SuggestionBanner/SuggestionInner"]
|
|
unique_name_in_owner = true
|
|
layout_mode = 2
|
|
size_flags_horizontal = 3
|
|
autowrap_mode = 3
|
|
modulate = Color(0.85, 0.85, 0.85, 1.0)
|
|
text = ""
|
|
|
|
[node name="SuggestionBtns" type="HBoxContainer" parent="Layout/SuggestionBanner/SuggestionInner"]
|
|
layout_mode = 2
|
|
theme_override_constants/separation = 8
|
|
|
|
[node name="SuggestionAcceptBtn" type="Button" parent="Layout/SuggestionBanner/SuggestionInner/SuggestionBtns"]
|
|
unique_name_in_owner = true
|
|
layout_mode = 2
|
|
text = "Accept"
|
|
|
|
[node name="SuggestionRejectBtn" type="Button" parent="Layout/SuggestionBanner/SuggestionInner/SuggestionBtns"]
|
|
unique_name_in_owner = true
|
|
layout_mode = 2
|
|
text = "Reject"
|
|
|
|
[node name="MainSplit" type="HSplitContainer" parent="Layout"]
|
|
layout_mode = 2
|
|
size_flags_vertical = 3
|
|
split_offset = 400
|
|
|
|
[node name="LeftPanel" type="ScrollContainer" parent="Layout/MainSplit"]
|
|
layout_mode = 2
|
|
|
|
[node name="LeftContent" type="VBoxContainer" parent="Layout/MainSplit/LeftPanel"]
|
|
layout_mode = 2
|
|
size_flags_horizontal = 3
|
|
theme_override_constants/separation = 12
|
|
|
|
[node name="LeftMargin" type="MarginContainer" parent="Layout/MainSplit/LeftPanel/LeftContent"]
|
|
layout_mode = 2
|
|
theme_override_constants/margin_left = 16
|
|
theme_override_constants/margin_right = 16
|
|
theme_override_constants/margin_top = 16
|
|
theme_override_constants/margin_bottom = 16
|
|
|
|
[node name="LeftInner" type="VBoxContainer" parent="Layout/MainSplit/LeftPanel/LeftContent/LeftMargin"]
|
|
layout_mode = 2
|
|
theme_override_constants/separation = 14
|
|
|
|
[node name="HostSection" type="Label" parent="Layout/MainSplit/LeftPanel/LeftContent/LeftMargin/LeftInner"]
|
|
layout_mode = 2
|
|
text = "HOST"
|
|
modulate = Color(0.6, 0.6, 0.65, 1.0)
|
|
theme_override_font_sizes/font_size = 11
|
|
|
|
[node name="HostNameLabel" type="Label" parent="Layout/MainSplit/LeftPanel/LeftContent/LeftMargin/LeftInner"]
|
|
unique_name_in_owner = true
|
|
layout_mode = 2
|
|
text = "Host: …"
|
|
theme_override_font_sizes/font_size = 15
|
|
|
|
[node name="HostDeckLabel" type="Label" parent="Layout/MainSplit/LeftPanel/LeftContent/LeftMargin/LeftInner"]
|
|
unique_name_in_owner = true
|
|
layout_mode = 2
|
|
text = "Deck: (none)"
|
|
modulate = Color(0.75, 0.75, 0.75, 1.0)
|
|
|
|
[node name="HostReadyIndicator" type="Label" parent="Layout/MainSplit/LeftPanel/LeftContent/LeftMargin/LeftInner"]
|
|
unique_name_in_owner = true
|
|
layout_mode = 2
|
|
text = "Not ready"
|
|
modulate = Color(0.6, 0.6, 0.6, 1.0)
|
|
|
|
[node name="GuestSep" type="HSeparator" parent="Layout/MainSplit/LeftPanel/LeftContent/LeftMargin/LeftInner"]
|
|
layout_mode = 2
|
|
|
|
[node name="GuestSection" type="Label" parent="Layout/MainSplit/LeftPanel/LeftContent/LeftMargin/LeftInner"]
|
|
layout_mode = 2
|
|
text = "GUEST"
|
|
modulate = Color(0.6, 0.6, 0.65, 1.0)
|
|
theme_override_font_sizes/font_size = 11
|
|
|
|
[node name="GuestNameLabel" type="Label" parent="Layout/MainSplit/LeftPanel/LeftContent/LeftMargin/LeftInner"]
|
|
unique_name_in_owner = true
|
|
layout_mode = 2
|
|
text = "Waiting for guest…"
|
|
theme_override_font_sizes/font_size = 15
|
|
|
|
[node name="GuestDeckLabel" type="Label" parent="Layout/MainSplit/LeftPanel/LeftContent/LeftMargin/LeftInner"]
|
|
unique_name_in_owner = true
|
|
layout_mode = 2
|
|
text = ""
|
|
modulate = Color(0.75, 0.75, 0.75, 1.0)
|
|
|
|
[node name="GuestReadyIndicator" type="Label" parent="Layout/MainSplit/LeftPanel/LeftContent/LeftMargin/LeftInner"]
|
|
unique_name_in_owner = true
|
|
layout_mode = 2
|
|
text = "Not ready"
|
|
modulate = Color(0.6, 0.6, 0.6, 1.0)
|
|
|
|
[node name="ActionSep" type="HSeparator" parent="Layout/MainSplit/LeftPanel/LeftContent/LeftMargin/LeftInner"]
|
|
layout_mode = 2
|
|
|
|
[node name="ChangeDeckBtn" type="Button" parent="Layout/MainSplit/LeftPanel/LeftContent/LeftMargin/LeftInner"]
|
|
unique_name_in_owner = true
|
|
layout_mode = 2
|
|
text = "Change Deck"
|
|
|
|
[node name="FirstTurnSection" type="Label" parent="Layout/MainSplit/LeftPanel/LeftContent/LeftMargin/LeftInner"]
|
|
layout_mode = 2
|
|
text = "WHO GOES FIRST?"
|
|
modulate = Color(0.6, 0.6, 0.65, 1.0)
|
|
theme_override_font_sizes/font_size = 11
|
|
|
|
[node name="FirstTurnBtns" type="HBoxContainer" parent="Layout/MainSplit/LeftPanel/LeftContent/LeftMargin/LeftInner"]
|
|
layout_mode = 2
|
|
theme_override_constants/separation = 8
|
|
|
|
[node name="FirstMeBtn" type="Button" parent="Layout/MainSplit/LeftPanel/LeftContent/LeftMargin/LeftInner/FirstTurnBtns"]
|
|
unique_name_in_owner = true
|
|
layout_mode = 2
|
|
size_flags_horizontal = 3
|
|
text = "Me"
|
|
toggle_mode = true
|
|
|
|
[node name="FirstOppBtn" type="Button" parent="Layout/MainSplit/LeftPanel/LeftContent/LeftMargin/LeftInner/FirstTurnBtns"]
|
|
unique_name_in_owner = true
|
|
layout_mode = 2
|
|
size_flags_horizontal = 3
|
|
text = "Opponent"
|
|
toggle_mode = true
|
|
|
|
[node name="FirstRandomBtn" type="Button" parent="Layout/MainSplit/LeftPanel/LeftContent/LeftMargin/LeftInner/FirstTurnBtns"]
|
|
unique_name_in_owner = true
|
|
layout_mode = 2
|
|
size_flags_horizontal = 3
|
|
text = "Random"
|
|
toggle_mode = true
|
|
button_pressed = true
|
|
|
|
[node name="ReadyBtn" type="Button" parent="Layout/MainSplit/LeftPanel/LeftContent/LeftMargin/LeftInner"]
|
|
unique_name_in_owner = true
|
|
layout_mode = 2
|
|
custom_minimum_size = Vector2(0, 52)
|
|
text = "✓ Ready"
|
|
theme_override_font_sizes/font_size = 16
|
|
|
|
[node name="RightPanel" type="ScrollContainer" parent="Layout/MainSplit"]
|
|
layout_mode = 2
|
|
|
|
[node name="RightContent" type="VBoxContainer" parent="Layout/MainSplit/RightPanel"]
|
|
layout_mode = 2
|
|
size_flags_horizontal = 3
|
|
|
|
[node name="RightMargin" type="MarginContainer" parent="Layout/MainSplit/RightPanel/RightContent"]
|
|
layout_mode = 2
|
|
theme_override_constants/margin_left = 16
|
|
theme_override_constants/margin_right = 16
|
|
theme_override_constants/margin_top = 16
|
|
theme_override_constants/margin_bottom = 16
|
|
|
|
[node name="RightInner" type="VBoxContainer" parent="Layout/MainSplit/RightPanel/RightContent/RightMargin"]
|
|
layout_mode = 2
|
|
theme_override_constants/separation = 12
|
|
|
|
[node name="RulesTitle" type="Label" parent="Layout/MainSplit/RightPanel/RightContent/RightMargin/RightInner"]
|
|
layout_mode = 2
|
|
text = "RULES"
|
|
modulate = Color(0.6, 0.6, 0.65, 1.0)
|
|
theme_override_font_sizes/font_size = 11
|
|
|
|
[node name="RulesLabel" type="Label" parent="Layout/MainSplit/RightPanel/RightContent/RightMargin/RightInner"]
|
|
unique_name_in_owner = true
|
|
layout_mode = 2
|
|
text = "(default rules)"
|
|
modulate = Color(0.85, 0.85, 0.85, 1.0)
|
|
autowrap_mode = 3
|
|
|
|
[node name="EditRulesBtn" type="Button" parent="Layout/MainSplit/RightPanel/RightContent/RightMargin/RightInner"]
|
|
unique_name_in_owner = true
|
|
layout_mode = 2
|
|
text = "Edit / Suggest Rules"
|
|
|
|
[node name="PresetSep" type="HSeparator" parent="Layout/MainSplit/RightPanel/RightContent/RightMargin/RightInner"]
|
|
layout_mode = 2
|
|
|
|
[node name="PresetsTitle" type="Label" parent="Layout/MainSplit/RightPanel/RightContent/RightMargin/RightInner"]
|
|
layout_mode = 2
|
|
text = "PRESETS"
|
|
modulate = Color(0.6, 0.6, 0.65, 1.0)
|
|
theme_override_font_sizes/font_size = 11
|
|
|
|
[node name="PresetBtns" type="HBoxContainer" parent="Layout/MainSplit/RightPanel/RightContent/RightMargin/RightInner"]
|
|
layout_mode = 2
|
|
theme_override_constants/separation = 8
|
|
|
|
[node name="SavePresetBtn" type="Button" parent="Layout/MainSplit/RightPanel/RightContent/RightMargin/RightInner/PresetBtns"]
|
|
unique_name_in_owner = true
|
|
layout_mode = 2
|
|
text = "Save Preset"
|
|
|
|
[node name="LoadPresetBtn" type="Button" parent="Layout/MainSplit/RightPanel/RightContent/RightMargin/RightInner/PresetBtns"]
|
|
unique_name_in_owner = true
|
|
layout_mode = 2
|
|
text = "Load Preset"
|
|
|
|
[node name="DeckPickerDialog" type="AcceptDialog" parent="."]
|
|
unique_name_in_owner = true
|
|
visible = false
|
|
title = "Choose Deck"
|
|
initial_position = 4
|
|
min_size = Vector2(300, 280)
|
|
|
|
[node name="DeckPickerScroll" type="ScrollContainer" parent="DeckPickerDialog"]
|
|
layout_mode = 1
|
|
anchors_preset = 15
|
|
anchor_right = 1.0
|
|
anchor_bottom = 1.0
|
|
grow_horizontal = 2
|
|
grow_vertical = 2
|
|
|
|
[node name="DeckPickerContainer" type="VBoxContainer" parent="DeckPickerDialog/DeckPickerScroll"]
|
|
unique_name_in_owner = true
|
|
layout_mode = 2
|
|
size_flags_horizontal = 3
|
|
theme_override_constants/separation = 6
|
|
|
|
[node name="PresetListDialog" type="AcceptDialog" parent="."]
|
|
unique_name_in_owner = true
|
|
visible = false
|
|
title = "Load Preset"
|
|
initial_position = 4
|
|
min_size = Vector2(300, 280)
|
|
|
|
[node name="PresetListScroll" type="ScrollContainer" parent="PresetListDialog"]
|
|
layout_mode = 1
|
|
anchors_preset = 15
|
|
anchor_right = 1.0
|
|
anchor_bottom = 1.0
|
|
grow_horizontal = 2
|
|
grow_vertical = 2
|
|
|
|
[node name="PresetListContainer" type="VBoxContainer" parent="PresetListDialog/PresetListScroll"]
|
|
unique_name_in_owner = true
|
|
layout_mode = 2
|
|
size_flags_horizontal = 3
|
|
theme_override_constants/separation = 6
|