This commit is contained in:
2025-02-04 18:08:56 +08:00
parent c578c3e97e
commit 7d022775d3
3 changed files with 40 additions and 30 deletions
+6 -6
View File
@@ -395,11 +395,11 @@ func initialize_random_goals(_size:int, min_value:int, max_value:int, null_count
return result
func append_random_goals():
goals.append_array(initialize_random_goals(9, 7, 10, 1.0))
if is_multiplayer_authority():
rpc("sync_goals", goals)
# Remove this since goals are now set by main.gd
#func append_random_goals():
# goals.append_array(initialize_random_goals(9, 7, 10, 1.0))
# if is_multiplayer_authority():
# rpc("sync_goals", goals)
func bot_try_grab_item() -> bool:
if not enhanced_gridmap or action_points <= 0:
@@ -939,7 +939,7 @@ func sync_grid_item(x: int, y: int, z: int, item: int):
@rpc("any_peer", "call_local")
func sync_goals(new_goals: Array):
goals = new_goals
goals = new_goals.duplicate() # Make sure to duplicate the array
@rpc("any_peer", "call_local")
func sync_playerboard(new_playerboard: Array):