feat: Implement the main game scene with core logic, manager initialization, multiplayer setup, and UI integration.
This commit is contained in:
+3
-1
@@ -1754,7 +1754,9 @@ func randomize_game_grid():
|
|||||||
# This ensures StaticTektonManager calculation (which checks Floor 0) succeeds.
|
# This ensures StaticTektonManager calculation (which checks Floor 0) succeeds.
|
||||||
for x in range(enhanced_gridmap.columns):
|
for x in range(enhanced_gridmap.columns):
|
||||||
for z in range(enhanced_gridmap.rows):
|
for z in range(enhanced_gridmap.rows):
|
||||||
if enhanced_gridmap.get_cell_item(Vector3i(x, 0, z)) == -1:
|
var f0_item = enhanced_gridmap.get_cell_item(Vector3i(x, 0, z))
|
||||||
|
# If empty OR it's a tile/powerup (7-20) accidentally stuck on the ground layer, replace with Base Floor (0)
|
||||||
|
if f0_item == -1 or (f0_item >= 7 and f0_item <= 20):
|
||||||
enhanced_gridmap.set_cell_item(Vector3i(x, 0, z), 0)
|
enhanced_gridmap.set_cell_item(Vector3i(x, 0, z), 0)
|
||||||
|
|
||||||
# Custom spawn ratio for Free Mode: 80% common tiles, 20% empty tiles (start of game)
|
# Custom spawn ratio for Free Mode: 80% common tiles, 20% empty tiles (start of game)
|
||||||
|
|||||||
@@ -60,7 +60,7 @@ func _attempt_throw():
|
|||||||
if enhanced_gridmap and "cell_size" in enhanced_gridmap:
|
if enhanced_gridmap and "cell_size" in enhanced_gridmap:
|
||||||
target_world_pos = Vector3(
|
target_world_pos = Vector3(
|
||||||
target.x * enhanced_gridmap.cell_size.x + enhanced_gridmap.cell_size.x / 2,
|
target.x * enhanced_gridmap.cell_size.x + enhanced_gridmap.cell_size.x / 2,
|
||||||
0,
|
enhanced_gridmap.cell_size.y,
|
||||||
target.y * enhanced_gridmap.cell_size.z + enhanced_gridmap.cell_size.z / 2
|
target.y * enhanced_gridmap.cell_size.z + enhanced_gridmap.cell_size.z / 2
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
+5
-5
@@ -451,11 +451,11 @@ func spawn_tiles_around(count: int = 4):
|
|||||||
else:
|
else:
|
||||||
item_id = rng.randi_range(11, 14)
|
item_id = rng.randi_range(11, 14)
|
||||||
|
|
||||||
if item_id != -1:
|
if item_id != -1:
|
||||||
var main = get_tree().get_root().get_node_or_null("Main")
|
var main = get_tree().get_root().get_node_or_null("Main")
|
||||||
if main and can_rpc():
|
if main and can_rpc():
|
||||||
main.rpc("sync_grid_item", pos.x, 1, pos.y, item_id)
|
main.rpc("sync_grid_item", pos.x, 1, pos.y, item_id)
|
||||||
spawned += 1
|
spawned += 1
|
||||||
|
|
||||||
@rpc("call_local", "reliable")
|
@rpc("call_local", "reliable")
|
||||||
func play_animation_rpc(anim_name: String):
|
func play_animation_rpc(anim_name: String):
|
||||||
|
|||||||
Reference in New Issue
Block a user