Refactor item grabbing logic and remove TileGrabber

Moved item grabbing and auto-arrange logic from the separate TileGrabber node into the player.gd script, consolidating server/client authority checks and RPC handling for multiplayer. Removed obsolete tile_grabber.gd and its UID file. Updated main.tscn to clean up unused UI nodes and adjust visibility settings for player boards.
This commit is contained in:
2025-11-04 10:43:34 +08:00
parent 3c3ba0cd63
commit cd22925449
4 changed files with 159 additions and 231 deletions
+2 -39
View File
@@ -74,6 +74,7 @@ grow_vertical = 2
theme_override_styles/panel = ExtResource("5_dvx6y")
[node name="NetworkInfo" type="VBoxContainer" parent="NetworkPanel"]
layout_mode = 0
offset_left = 8.0
offset_right = 124.0
offset_bottom = 50.0
@@ -90,7 +91,6 @@ horizontal_alignment = 1
vertical_alignment = 1
[node name="PlayerboardUI" type="GridContainer" parent="."]
visible = false
clip_contents = true
anchors_preset = 2
anchor_top = 1.0
@@ -1056,44 +1056,6 @@ environment = ExtResource("4_ky38j")
[node name="CanvasLayer" type="CanvasLayer" parent="."]
[node name="MarginContainer" type="Control" parent="."]
visible = false
clip_contents = true
layout_direction = 2
layout_mode = 3
anchors_preset = 5
anchor_left = 0.5
anchor_right = 0.5
offset_left = -248.0
offset_top = 24.0
offset_right = 275.0
offset_bottom = 129.0
grow_horizontal = 2
[node name="Panel4" type="Panel" parent="MarginContainer"]
custom_minimum_size = Vector2(105, 105)
layout_mode = 2
offset_left = 137.0
offset_right = 242.0
offset_bottom = 105.0
theme_override_styles/panel = SubResource("StyleBoxTexture_5oeq4")
[node name="Panel5" type="Panel" parent="MarginContainer"]
custom_minimum_size = Vector2(105, 105)
layout_mode = 2
offset_left = 275.0
offset_right = 380.0
offset_bottom = 105.0
theme_override_styles/panel = SubResource("StyleBoxTexture_5oeq4")
[node name="Panel6" type="Panel" parent="MarginContainer"]
custom_minimum_size = Vector2(105, 105)
layout_mode = 2
offset_left = 413.0
offset_right = 518.0
offset_bottom = 105.0
theme_override_styles/panel = SubResource("StyleBoxTexture_5oeq4")
[node name="AllPlayerGoals" type="HBoxContainer" parent="."]
y_sort_enabled = true
clip_contents = true
@@ -6052,6 +6014,7 @@ grow_vertical = 2
texture = ExtResource("10_my1qp")
[node name="AllPlayerBoards" type="TabContainer" parent="."]
visible = false
clip_contents = true
anchors_preset = 4
anchor_top = 0.5