This repository has been archived on 2026-05-26. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files

432 lines
21 KiB
Plaintext

[gd_scene load_steps=15 format=3 uid="uid://gqrdpjslr4np"]
[ext_resource type="Script" uid="uid://p5gvnyhjqe6o" path="res://components/web_client.gd" id="1_feb5d"]
[ext_resource type="Script" uid="uid://c0cqkatyo4uj1" path="res://components/client_interface.gd" id="2_e2o6t"]
[ext_resource type="Theme" uid="uid://7bv5whocnq53" path="res://theme.tres" id="2_hve3p"]
[ext_resource type="Script" uid="uid://utt8atbh7b2a" path="res://game_client.gd" id="3_feb5d"]
[ext_resource type="Script" uid="uid://bipfa366flrfa" path="res://environment_manager.gd" id="4_7jktm"]
[ext_resource type="PackedScene" uid="uid://jlovgr2iojrg" path="res://elements/player_hand.tscn" id="4_fc0e3"]
[ext_resource type="Script" uid="uid://bfhknl0awlj22" path="res://chat_panel.gd" id="4_iotsf"]
[ext_resource type="Script" uid="uid://bokp83oigikj2" path="res://number_input.gd" id="4_vef74"]
[ext_resource type="Script" uid="uid://b6m5e50j1syr7" path="res://connection_overlay.gd" id="5_iotsf"]
[ext_resource type="PackedScene" uid="uid://b55xpcxk7g5ph" path="res://cards/playing_card.tscn" id="6_eow3j"]
[ext_resource type="PackedScene" uid="uid://dj1wye7o27vil" path="res://assets/table.glb" id="7_eow3j"]
[ext_resource type="Script" uid="uid://c5bk4gjeyh7vy" path="res://card_stack.gd" id="8_j5wjh"]
[sub_resource type="Environment" id="Environment_fc0e3"]
ambient_light_source = 2
ambient_light_color = Color(1, 1, 1, 1)
ambient_light_energy = 0.15
[sub_resource type="BoxShape3D" id="BoxShape3D_iotsf"]
size = Vector3(0.627106, 0.998047, 0.204102)
[node name="Game" type="Node"]
[node name="WebClient" type="Node" parent="." node_paths=PackedStringArray("chat_panel")]
script = ExtResource("1_feb5d")
chat_panel = NodePath("../Interface/ChatPanel")
[node name="Interface" type="Control" parent="."]
layout_mode = 3
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
theme = ExtResource("2_hve3p")
metadata/_edit_use_anchors_ = true
[node name="ClientInterface" type="ColorRect" parent="Interface" node_paths=PackedStringArray("client", "create_lobby_button", "join_lobby_button", "leave_lobby_button", "connected_players_label", "name_input", "lobby_code_input")]
custom_minimum_size = Vector2(316, 0)
layout_mode = 2
offset_right = 316.0
offset_bottom = 429.0
color = Color(0.26, 0.2236, 0.230273, 1)
script = ExtResource("2_e2o6t")
client = NodePath("../../WebClient")
create_lobby_button = NodePath("MarginContainer/VBoxContainer/ServerInputs/CreateLobbyButton")
join_lobby_button = NodePath("MarginContainer/VBoxContainer/ServerInputs/JoinLobbyButton")
leave_lobby_button = NodePath("MarginContainer/VBoxContainer/ServerInputs/LeaveLobbyButton")
connected_players_label = NodePath("MarginContainer/VBoxContainer/ConnectedPlayersLabel")
name_input = NodePath("MarginContainer/VBoxContainer/ServerInputs/NameInput")
lobby_code_input = NodePath("MarginContainer/VBoxContainer/ServerInputs/LobbyCodeInput")
[node name="MarginContainer" type="MarginContainer" parent="Interface/ClientInterface"]
layout_mode = 1
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
theme_override_constants/margin_left = 8
theme_override_constants/margin_top = 8
theme_override_constants/margin_right = 8
theme_override_constants/margin_bottom = 8
[node name="VBoxContainer" type="VBoxContainer" parent="Interface/ClientInterface/MarginContainer"]
layout_mode = 2
[node name="ServerInputs" type="VBoxContainer" parent="Interface/ClientInterface/MarginContainer/VBoxContainer"]
custom_minimum_size = Vector2(300, 0)
layout_mode = 2
[node name="NameInput" type="LineEdit" parent="Interface/ClientInterface/MarginContainer/VBoxContainer/ServerInputs"]
layout_mode = 2
placeholder_text = "Your Name"
editable = false
[node name="CreateLobbyButton" type="Button" parent="Interface/ClientInterface/MarginContainer/VBoxContainer/ServerInputs"]
layout_mode = 2
disabled = true
text = "Create Lobby"
[node name="LobbyCodeInput" type="LineEdit" parent="Interface/ClientInterface/MarginContainer/VBoxContainer/ServerInputs"]
layout_mode = 2
placeholder_text = "Lobby Code"
editable = false
[node name="JoinLobbyButton" type="Button" parent="Interface/ClientInterface/MarginContainer/VBoxContainer/ServerInputs"]
layout_mode = 2
disabled = true
text = "Join Lobby"
[node name="LeaveLobbyButton" type="Button" parent="Interface/ClientInterface/MarginContainer/VBoxContainer/ServerInputs"]
layout_mode = 2
disabled = true
text = "Disconnect"
[node name="ConnectedPlayersLabel" type="Label" parent="Interface/ClientInterface/MarginContainer/VBoxContainer"]
layout_mode = 2
[node name="ChatPanel" type="VBoxContainer" parent="Interface" node_paths=PackedStringArray("message_container", "scroll_container", "message_input", "send_message_button")]
layout_mode = 1
anchors_preset = -1
anchor_top = 0.478704
anchor_right = 0.234375
anchor_bottom = 1.0
offset_right = -130.0
offset_bottom = 0.000244141
grow_vertical = 0
script = ExtResource("4_iotsf")
auto_scroll_duration = 0.4
message_container = NodePath("ScrollContainer/MessageContainer")
scroll_container = NodePath("ScrollContainer")
message_input = NodePath("InputContainer/MessageInput")
send_message_button = NodePath("InputContainer/SendMessageButton")
metadata/_edit_use_anchors_ = true
[node name="ScrollContainer" type="ScrollContainer" parent="Interface/ChatPanel"]
layout_mode = 2
size_flags_vertical = 3
horizontal_scroll_mode = 0
vertical_scroll_mode = 4
[node name="MessageContainer" type="VBoxContainer" parent="Interface/ChatPanel/ScrollContainer"]
layout_mode = 2
size_flags_horizontal = 3
size_flags_vertical = 3
alignment = 2
[node name="InputContainer" type="HBoxContainer" parent="Interface/ChatPanel"]
layout_mode = 2
[node name="MessageInput" type="LineEdit" parent="Interface/ChatPanel/InputContainer"]
layout_mode = 2
size_flags_horizontal = 3
placeholder_text = "Type chat message here"
[node name="SendMessageButton" type="Button" parent="Interface/ChatPanel/InputContainer"]
layout_mode = 2
text = "Send"
[node name="LobbyPanel" type="Control" parent="Interface"]
layout_mode = 3
anchors_preset = 0
offset_right = 40.0
offset_bottom = 40.0
[node name="ConnectionOverlay" type="Control" parent="Interface" node_paths=PackedStringArray("status_label")]
visible = false
layout_mode = 1
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
script = ExtResource("5_iotsf")
status_label = NodePath("StatusLabel")
[node name="ColorRect" type="ColorRect" parent="Interface/ConnectionOverlay"]
layout_mode = 1
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
color = Color(0.47451, 0.180392, 0.603922, 1)
[node name="StatusLabel" type="Label" parent="Interface/ConnectionOverlay"]
layout_mode = 1
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
theme_override_font_sizes/font_size = 28
text = "Connecting to server"
horizontal_alignment = 1
vertical_alignment = 1
[node name="HBoxContainer" type="HBoxContainer" parent="."]
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
offset_left = 485.0
grow_horizontal = 2
grow_vertical = 2
theme = ExtResource("2_hve3p")
[node name="GameUI" type="Control" parent="HBoxContainer" node_paths=PackedStringArray("web_client", "start_game_button", "play_card_button", "bet_container", "bet_input", "round_label", "player_hand")]
layout_mode = 2
size_flags_horizontal = 3
mouse_filter = 2
script = ExtResource("3_feb5d")
web_client = NodePath("../../WebClient")
start_game_button = NodePath("StartGameButton")
play_card_button = NodePath("PlayCardButton")
bet_container = NodePath("BetContainer")
bet_input = NodePath("BetContainer/BetInput")
round_label = NodePath("RoundLabel")
player_hand = NodePath("../../EnvironmentManager/PlayerHand0")
[node name="StartGameButton" type="Button" parent="HBoxContainer/GameUI"]
visible = false
layout_mode = 1
anchors_preset = 8
anchor_left = 0.5
anchor_top = 0.5
anchor_right = 0.5
anchor_bottom = 0.5
offset_left = -50.0
offset_top = -15.5
offset_right = 50.0
offset_bottom = 15.5
grow_horizontal = 2
grow_vertical = 2
text = "Start Game!"
[node name="PlayCardButton" type="Button" parent="HBoxContainer/GameUI"]
layout_mode = 1
anchors_preset = 7
anchor_left = 0.5
anchor_top = 1.0
anchor_right = 0.5
anchor_bottom = 1.0
offset_left = -4.0
offset_top = -8.0
offset_right = 4.0
grow_horizontal = 2
grow_vertical = 0
disabled = true
text = "Play Card"
[node name="BetContainer" type="VBoxContainer" parent="HBoxContainer/GameUI"]
visible = false
layout_mode = 1
anchors_preset = 2
anchor_top = 1.0
anchor_bottom = 1.0
offset_left = 100.0
offset_top = -180.0
offset_right = 327.0
offset_bottom = -114.0
grow_vertical = 0
[node name="DisallowedBetLabel" type="Label" parent="HBoxContainer/GameUI/BetContainer"]
layout_mode = 2
[node name="BetInput" type="LineEdit" parent="HBoxContainer/GameUI/BetContainer" node_paths=PackedStringArray("error_label", "disallowed_bet_label", "submit_button")]
layout_mode = 2
max_length = 2
context_menu_enabled = false
emoji_menu_enabled = false
virtual_keyboard_type = 2
shortcut_keys_enabled = false
middle_mouse_paste_enabled = false
drag_and_drop_selection_enabled = false
script = ExtResource("4_vef74")
error_label = NodePath("../ErrorLabel")
disallowed_bet_label = NodePath("../DisallowedBetLabel")
submit_button = NodePath("../SubmitBetButton")
[node name="SubmitBetButton" type="Button" parent="HBoxContainer/GameUI/BetContainer"]
layout_mode = 2
text = "submit bet"
[node name="ErrorLabel" type="Label" parent="HBoxContainer/GameUI/BetContainer"]
layout_mode = 2
theme_override_colors/font_color = Color(1, 0.21, 0.21, 1)
[node name="Label" type="Label" parent="HBoxContainer/GameUI"]
visible = false
layout_mode = 1
anchors_preset = 5
anchor_left = 0.5
anchor_right = 0.5
offset_left = -88.0
offset_top = 300.0
offset_right = 88.0
offset_bottom = 323.0
grow_horizontal = 2
text = "it's your turn DUMMY!!"
[node name="WinLabel" type="Label" parent="HBoxContainer/GameUI"]
visible = false
layout_mode = 1
anchors_preset = 5
anchor_left = 0.5
anchor_right = 0.5
offset_left = -20.0
offset_top = 350.0
offset_right = 20.0
offset_bottom = 373.0
grow_horizontal = 2
text = "YOU WON!!!!!!"
[node name="RoundLabel" type="Label" parent="HBoxContainer/GameUI"]
layout_mode = 1
anchors_preset = 1
anchor_left = 1.0
anchor_right = 1.0
offset_left = -100.0
offset_top = 60.0
offset_right = -60.0
offset_bottom = 83.0
grow_horizontal = 0
[node name="CardDisallowedLabel" type="Label" parent="HBoxContainer/GameUI"]
visible = false
layout_mode = 1
anchors_preset = 8
anchor_left = 0.5
anchor_top = 0.5
anchor_right = 0.5
anchor_bottom = 0.5
offset_left = -20.0
offset_top = -11.5
offset_right = 20.0
offset_bottom = 11.5
grow_horizontal = 2
grow_vertical = 2
theme_override_colors/font_color = Color(1, 0.28, 0.28, 1)
text = "NOT ALLOWED!"
[node name="EnvironmentManager" type="Node3D" parent="." node_paths=PackedStringArray("web_client", "trump_stack", "card_stack", "own_player_hand", "hand_markers_3", "hand_markers_4", "hand_markers_5", "hand_markers_6")]
script = ExtResource("4_7jktm")
web_client = NodePath("../WebClient")
trump_stack = NodePath("TrumpStack")
card_stack = NodePath("CardStack")
own_player_hand = NodePath("PlayerHand0")
hand_markers_3 = [NodePath("HandMarker1"), NodePath("HandMarker2")]
hand_markers_4 = [NodePath("HandMarker1"), NodePath("HandMarker3"), NodePath("HandMarker2")]
hand_markers_5 = [NodePath("HandMarker4"), NodePath("HandMarker1"), NodePath("HandMarker3"), NodePath("HandMarker2")]
hand_markers_6 = [NodePath("HandMarker4"), NodePath("HandMarker1"), NodePath("HandMarker3"), NodePath("HandMarker2"), NodePath("HandMarker5")]
player_hand_scene = ExtResource("4_fc0e3")
card_scene = ExtResource("6_eow3j")
[node name="Camera3D" type="Camera3D" parent="EnvironmentManager"]
transform = Transform3D(1, 0, 0, 0, 0.415964, 0.909381, 0, -0.909381, 0.415964, 0, 2.96865, 2.32901)
fov = 62.0
[node name="DirectionalLight3D" type="DirectionalLight3D" parent="EnvironmentManager"]
transform = Transform3D(0.970511, 0, 0.241058, -0.137972, 0.820002, 0.555482, -0.197668, -0.572361, 0.795821, 2.41581, 2.80426, 0)
[node name="WorldEnvironment" type="WorldEnvironment" parent="EnvironmentManager"]
environment = SubResource("Environment_fc0e3")
[node name="PlayerHand0" parent="EnvironmentManager" node_paths=PackedStringArray("card_disallowed_label") instance=ExtResource("4_fc0e3")]
transform = Transform3D(1, 0, 0, 0, 0.403769, 0.914861, 0, -0.914861, 0.403769, 0, 0.490593, 2.17793)
hide_client_name = true
card_disallowed_label = NodePath("../../HBoxContainer/GameUI/CardDisallowedLabel")
[node name="HandMarker1" type="Marker3D" parent="EnvironmentManager"]
transform = Transform3D(-0.906308, -0.408218, -0.109382, 0, 0.258819, -0.965926, 0.422618, -0.875426, -0.23457, -1.25, 0.4, -0.387)
[node name="HandMarker2" type="Marker3D" parent="EnvironmentManager"]
transform = Transform3D(-0.906308, 0.408218, 0.109382, 0, 0.258819, -0.965926, -0.422618, -0.875426, -0.23457, 1.25, 0.4, -0.387)
[node name="HandMarker3" type="Marker3D" parent="EnvironmentManager"]
transform = Transform3D(-1, 8.44439e-08, 2.26267e-08, 0, 0.258819, -0.965926, -8.74228e-08, -0.965926, -0.258819, 0, 0.4, -0.810801)
[node name="HandMarker4" type="Marker3D" parent="EnvironmentManager"]
transform = Transform3D(-0.5, -0.836516, -0.224144, 0, 0.258819, -0.965925, 0.866025, -0.482963, -0.129409, -2.4, 0.4, 0.507)
[node name="HandMarker5" type="Marker3D" parent="EnvironmentManager"]
transform = Transform3D(-0.5, 0.836516, 0.224144, 0, 0.258819, -0.965925, -0.866025, -0.482963, -0.129409, 2.4, 0.4, 0.507)
[node name="Table" parent="EnvironmentManager" instance=ExtResource("7_eow3j")]
transform = Transform3D(0.7, 0, 0, 0, 0.7, 0, 0, 0, 0.7, 0, 0, 0.704226)
[node name="PeekSurface" type="Area3D" parent="EnvironmentManager"]
transform = Transform3D(1, 0, 0, 0, -4.37114e-08, 1, 0, -0.999999, -4.37114e-08, 0.18, 0.279306, 0.973)
[node name="CollisionShape3D" type="CollisionShape3D" parent="EnvironmentManager/PeekSurface"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 1.54543e-12, 1, 0.14949, 0, -0.0610352)
shape = SubResource("BoxShape3D_iotsf")
[node name="CardStack" type="Marker3D" parent="EnvironmentManager" node_paths=PackedStringArray("peek_surface")]
transform = Transform3D(1, 0, 0, 0, -4.37114e-08, 1, 0, -0.999999, -4.37114e-08, 0.18, 0.115, 0.973)
script = ExtResource("8_j5wjh")
playing_card_scene = ExtResource("6_eow3j")
peek_surface = NodePath("../PeekSurface")
[node name="TrumpStack" type="Marker3D" parent="EnvironmentManager"]
transform = Transform3D(1, 0, 0, 0, -4.37114e-08, 1, 0, -0.999999, -4.37114e-08, -0.18, 0.115, 0.973)
script = ExtResource("8_j5wjh")
playing_card_scene = ExtResource("6_eow3j")
[connection signal="cards_received" from="WebClient" to="EnvironmentManager" method="_on_web_client_tcp_cards_received"]
[connection signal="client_order_received" from="WebClient" to="EnvironmentManager" method="_on_web_client_tcp_client_order_received"]
[connection signal="connected_clients_changed" from="WebClient" to="Interface/ClientInterface" method="_on_web_client_connected_clients_changed"]
[connection signal="connected_clients_changed" from="WebClient" to="HBoxContainer/GameUI" method="_on_web_client_connected_clients_changed"]
[connection signal="connected_to_lobby" from="WebClient" to="Interface/ClientInterface" method="_on_web_client_connected_to_lobby"]
[connection signal="connected_to_lobby" from="WebClient" to="EnvironmentManager" method="_on_web_client_connected_to_lobby"]
[connection signal="connection_status_changed" from="WebClient" to="Interface/ClientInterface" method="_on_web_client_tcp_connection_status_changed"]
[connection signal="connection_status_changed" from="WebClient" to="Interface/ChatPanel" method="_on_web_client_connection_status_changed"]
[connection signal="connection_status_changed" from="WebClient" to="Interface/ConnectionOverlay" method="_on_web_client_connection_status_changed"]
[connection signal="new_round_started" from="WebClient" to="EnvironmentManager" method="_on_web_client_tcp_new_round_started"]
[connection signal="notify_play_card_request" from="WebClient" to="HBoxContainer/GameUI" method="_on_web_client_tcp_notify_play_card_request"]
[connection signal="notify_player_turn" from="WebClient" to="EnvironmentManager" method="_on_web_client_notify_player_turn"]
[connection signal="received_bet_request" from="WebClient" to="HBoxContainer/GameUI" method="_on_web_client_tcp_received_bet_request"]
[connection signal="received_bet_request" from="WebClient" to="HBoxContainer/GameUI/BetContainer/BetInput" method="_on_web_client_tcp_received_bet_request"]
[connection signal="received_chat_message" from="WebClient" to="Interface/ClientInterface" method="_on_web_client_tcp_received_chat_message"]
[connection signal="received_end_game_request" from="WebClient" to="EnvironmentManager" method="_on_web_client_tcp_received_end_game_request"]
[connection signal="received_expected_bet" from="WebClient" to="EnvironmentManager" method="_on_web_client_tcp_received_expected_bet"]
[connection signal="received_first_card" from="WebClient" to="EnvironmentManager/PlayerHand0" method="_on_web_client_tcp_received_first_card"]
[connection signal="received_play_winner_request" from="WebClient" to="EnvironmentManager" method="_on_web_client_tcp_received_play_winner_request"]
[connection signal="received_played_card" from="WebClient" to="EnvironmentManager" method="_on_web_client_tcp_received_played_card"]
[connection signal="received_win" from="WebClient" to="HBoxContainer/GameUI" method="_on_web_client_tcp_received_win"]
[connection signal="received_winning_client" from="WebClient" to="EnvironmentManager" method="_on_web_client_tcp_received_winning_client"]
[connection signal="request_next_play" from="WebClient" to="HBoxContainer/GameUI" method="_on_web_client_tcp_request_next_play"]
[connection signal="request_next_round" from="WebClient" to="HBoxContainer/GameUI" method="_on_web_client_tcp_request_next_round"]
[connection signal="reset_first_card" from="WebClient" to="EnvironmentManager" method="_on_web_client_reset_first_card"]
[connection signal="reset_first_card" from="WebClient" to="EnvironmentManager/PlayerHand0" method="_on_web_client_tcp_reset_first_card"]
[connection signal="trump_received" from="WebClient" to="EnvironmentManager" method="_on_web_client_tcp_trump_received"]
[connection signal="trump_received" from="WebClient" to="EnvironmentManager/PlayerHand0" method="_on_web_client_tcp_trump_received"]
[connection signal="pressed" from="Interface/ClientInterface/MarginContainer/VBoxContainer/ServerInputs/CreateLobbyButton" to="Interface/ClientInterface" method="_on_create_lobby_button_pressed"]
[connection signal="pressed" from="Interface/ClientInterface/MarginContainer/VBoxContainer/ServerInputs/CreateLobbyButton" to="HBoxContainer/GameUI" method="_on_create_lobby_button_pressed"]
[connection signal="pressed" from="Interface/ClientInterface/MarginContainer/VBoxContainer/ServerInputs/JoinLobbyButton" to="Interface/ClientInterface" method="_on_join_lobby_button_pressed"]
[connection signal="pressed" from="Interface/ClientInterface/MarginContainer/VBoxContainer/ServerInputs/JoinLobbyButton" to="HBoxContainer/GameUI" method="_on_join_lobby_button_pressed"]
[connection signal="pressed" from="Interface/ClientInterface/MarginContainer/VBoxContainer/ServerInputs/LeaveLobbyButton" to="Interface/ClientInterface" method="_on_disconnect_lobby_button_pressed"]
[connection signal="message_sent" from="Interface/ChatPanel" to="WebClient" method="_on_chat_panel_message_sent"]
[connection signal="gui_input" from="Interface/ChatPanel/InputContainer/MessageInput" to="Interface/ChatPanel" method="_on_message_input_gui_input"]
[connection signal="text_changed" from="Interface/ChatPanel/InputContainer/MessageInput" to="Interface/ChatPanel" method="_on_message_input_text_changed"]
[connection signal="pressed" from="Interface/ChatPanel/InputContainer/SendMessageButton" to="Interface/ChatPanel" method="_on_send_message_button_pressed"]
[connection signal="pressed" from="HBoxContainer/GameUI/StartGameButton" to="HBoxContainer/GameUI" method="_on_start_game_button_pressed"]
[connection signal="pressed" from="HBoxContainer/GameUI/PlayCardButton" to="EnvironmentManager/PlayerHand0" method="_on_play_card_button_pressed"]
[connection signal="text_changed" from="HBoxContainer/GameUI/BetContainer/BetInput" to="HBoxContainer/GameUI/BetContainer/BetInput" method="_on_text_changed"]
[connection signal="pressed" from="HBoxContainer/GameUI/BetContainer/SubmitBetButton" to="HBoxContainer/GameUI" method="_on_submit_bet_button_pressed"]
[connection signal="card_played" from="EnvironmentManager/PlayerHand0" to="HBoxContainer/GameUI" method="_on_player_hand_0_card_played"]
[connection signal="card_selected" from="EnvironmentManager/PlayerHand0" to="HBoxContainer/GameUI" method="_on_player_hand_card_selected"]