From 5b34f8a894e4214df9efd6d5911b8be2d1c4a8be Mon Sep 17 00:00:00 2001 From: metamuffin Date: Thu, 27 Jun 2024 17:23:43 +0200 Subject: fix crash in map tile getter --- client/map/map.gd | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'client') diff --git a/client/map/map.gd b/client/map/map.gd index af80d9ac..32b267d7 100644 --- a/client/map/map.gd +++ b/client/map/map.gd @@ -5,11 +5,11 @@ var tile_by_pos: Dictionary = {} var baking = false func get_tile_name(pos: Vector2i): - var e = tile_by_pos[str(pos)] + var e = tile_by_pos.get(str(pos)) if e != null: return e[1] else: return null func get_tile_instance(pos: Vector2i) -> Tile: - var e = tile_by_pos[str(pos)] + var e = tile_by_pos.get(str(pos)) if e != null: return e[2] else: return null -- cgit v1.2.3-70-g09d2