client can now only play allowed cards

This commit is contained in:
2025-07-18 14:10:39 +02:00
parent 2e83eea619
commit aef7778a4b
5 changed files with 152 additions and 2 deletions
+22 -1
View File
@@ -260,6 +260,23 @@ 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", "card_stack", "own_player_hand", "hand_markers_3", "hand_markers_4", "hand_markers_5", "hand_markers_6")]
script = ExtResource("4_7jktm")
web_client = NodePath("../WebClientTCP")
@@ -282,9 +299,10 @@ transform = Transform3D(0.970511, 0, 0.241058, -0.137972, 0.820002, 0.555482, -0
[node name="WorldEnvironment" type="WorldEnvironment" parent="EnvironmentManager"]
environment = SubResource("Environment_fc0e3")
[node name="PlayerHand0" parent="EnvironmentManager" instance=ExtResource("4_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)
@@ -330,13 +348,16 @@ playing_card_scene = ExtResource("6_eow3j")
[connection signal="received_connection_message" from="WebClientTCP" to="HBoxContainer/ClientInterface" method="_on_web_client_tcp_received_connection_message"]
[connection signal="received_end_game_request" from="WebClientTCP" to="EnvironmentManager" method="_on_web_client_tcp_received_end_game_request"]
[connection signal="received_expected_bet" from="WebClientTCP" to="EnvironmentManager" method="_on_web_client_tcp_received_expected_bet"]
[connection signal="received_first_card" from="WebClientTCP" to="EnvironmentManager/PlayerHand0" method="_on_web_client_tcp_received_first_card"]
[connection signal="received_play_winner_request" from="WebClientTCP" to="EnvironmentManager" method="_on_web_client_tcp_received_play_winner_request"]
[connection signal="received_played_card" from="WebClientTCP" to="EnvironmentManager" method="_on_web_client_tcp_received_played_card"]
[connection signal="received_win" from="WebClientTCP" to="HBoxContainer/GameUI" method="_on_web_client_tcp_received_win"]
[connection signal="received_winning_client" from="WebClientTCP" to="EnvironmentManager" method="_on_web_client_tcp_received_winning_client"]
[connection signal="request_next_play" from="WebClientTCP" to="HBoxContainer/GameUI" method="_on_web_client_tcp_request_next_play"]
[connection signal="request_next_round" from="WebClientTCP" to="HBoxContainer/GameUI" method="_on_web_client_tcp_request_next_round"]
[connection signal="reset_first_card" from="WebClientTCP" to="EnvironmentManager/PlayerHand0" method="_on_web_client_tcp_reset_first_card"]
[connection signal="trump_received" from="WebClientTCP" to="EnvironmentManager" method="_on_web_client_tcp_trump_received"]
[connection signal="trump_received" from="WebClientTCP" to="EnvironmentManager/PlayerHand0" method="_on_web_client_tcp_trump_received"]
[connection signal="pressed" from="HBoxContainer/ClientInterface/MarginContainer/VBoxContainer/ServerInputs/ConnectButton" to="HBoxContainer/ClientInterface" method="_on_connect_button_pressed"]
[connection signal="pressed" from="HBoxContainer/ClientInterface/MarginContainer/VBoxContainer/ServerInputs/CreateLobbyButton" to="HBoxContainer/ClientInterface" method="_on_create_lobby_button_pressed"]
[connection signal="pressed" from="HBoxContainer/ClientInterface/MarginContainer/VBoxContainer/ServerInputs/CreateLobbyButton" to="HBoxContainer/GameUI" method="_on_create_lobby_button_pressed"]