fix(candy-survival): support automatic delivery upon walking adjacent to Mekton NPC
This commit is contained in:
@@ -167,8 +167,10 @@ func simple_move_to(grid_position: Vector2i) -> bool:
|
||||
|
||||
if gm and gm.active and gm.has_method("try_deliver"):
|
||||
var dist = abs(grid_position.x - 8) + abs(grid_position.y - 8)
|
||||
if dist <= 2:
|
||||
pass # Delivery must be triggered by 'action_interact' input
|
||||
if dist <= 1:
|
||||
if multiplayer.is_server():
|
||||
var pid = player.get("peer_id") if "peer_id" in player else player.name.to_int()
|
||||
gm.try_deliver(pid)
|
||||
|
||||
rotate_towards_target(grid_position)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user