aboutsummaryrefslogtreecommitdiff
path: root/client/map
diff options
context:
space:
mode:
authormetamuffin <metamuffin@disroot.org>2024-06-27 17:23:43 +0200
committermetamuffin <metamuffin@disroot.org>2024-06-27 17:23:43 +0200
commit5b34f8a894e4214df9efd6d5911b8be2d1c4a8be (patch)
tree78a8223bb654ba950ccfe6b7752713962113216a /client/map
parent82408a6d478ed9f7009482c69f1f4d69025c833d (diff)
downloadhurrycurry-5b34f8a894e4214df9efd6d5911b8be2d1c4a8be.tar
hurrycurry-5b34f8a894e4214df9efd6d5911b8be2d1c4a8be.tar.bz2
hurrycurry-5b34f8a894e4214df9efd6d5911b8be2d1c4a8be.tar.zst
fix crash in map tile getter
Diffstat (limited to 'client/map')
-rw-r--r--client/map/map.gd4
1 files changed, 2 insertions, 2 deletions
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