aboutsummaryrefslogtreecommitdiff
path: root/client/map/map.gd
diff options
context:
space:
mode:
authormetamuffin <metamuffin@disroot.org>2025-12-16 01:35:08 +0100
committermetamuffin <metamuffin@disroot.org>2025-12-16 01:35:08 +0100
commitc1203fc897638d1dc6a0a800aec1adff1c18f997 (patch)
tree97aa1d288a331330bdb14b7a8350d314f0a27cbf /client/map/map.gd
parentc1b9bbb5e76b88e803ba833c16337d528c1dd7be (diff)
downloadhurrycurry-c1203fc897638d1dc6a0a800aec1adff1c18f997.tar
hurrycurry-c1203fc897638d1dc6a0a800aec1adff1c18f997.tar.bz2
hurrycurry-c1203fc897638d1dc6a0a800aec1adff1c18f997.tar.zst
Animated black/white hole transitions
Diffstat (limited to 'client/map/map.gd')
-rw-r--r--client/map/map.gd5
1 files changed, 3 insertions, 2 deletions
diff --git a/client/map/map.gd b/client/map/map.gd
index 800cb57d..4dd76ec4 100644
--- a/client/map/map.gd
+++ b/client/map/map.gd
@@ -40,9 +40,10 @@ func get_tile_instance(pos: Vector2i) -> Tile:
else: return null
func set_tile(pos: Vector2i, tilename = null, neighbors: Array = [null,null,null,null]):
+ var inst = get_tile_instance(pos)
+ if inst and tilename: if inst.change(tilename): return # instance handled change itself
_remove_tile(pos)
- if tilename != null:
- _add_tile(pos, tilename, neighbors)
+ if tilename: _add_tile(pos, tilename, neighbors)
if autoflush: flush()
func _add_tile(pos: Vector2i, tilename: String, neighbors: Array) -> Tile: