aboutsummaryrefslogtreecommitdiff
path: root/client/map/tiles/counter.gd
diff options
context:
space:
mode:
authornokoe <nokoe@mailbox.org>2024-09-26 19:38:58 +0200
committernokoe <nokoe@mailbox.org>2024-09-26 20:28:08 +0200
commit2031a8b9d2bf568f538cc9223713f50c77bac897 (patch)
tree82d9ed6f8502bcd1d949e28d4d61528b8478c437 /client/map/tiles/counter.gd
parent2a96dbb14fe268c90025d1d0af5e66dc9b00f214 (diff)
downloadhurrycurry-2031a8b9d2bf568f538cc9223713f50c77bac897.tar
hurrycurry-2031a8b9d2bf568f538cc9223713f50c77bac897.tar.bz2
hurrycurry-2031a8b9d2bf568f538cc9223713f50c77bac897.tar.zst
floor as one mesh
Diffstat (limited to 'client/map/tiles/counter.gd')
-rw-r--r--client/map/tiles/counter.gd8
1 files changed, 4 insertions, 4 deletions
diff --git a/client/map/tiles/counter.gd b/client/map/tiles/counter.gd
index 59a8296a..f819490c 100644
--- a/client/map/tiles/counter.gd
+++ b/client/map/tiles/counter.gd
@@ -41,8 +41,8 @@ var kind: CounterKind = CounterKind.STRAIGHT
static func interact_target() -> Vector3:
return Vector3(0, 0.5, 0)
-func _init(rename: String, neighbors: Array):
- super(rename, neighbors)
+func _init(ctx: TileFactory.TileCC):
+ super(ctx)
var facing: int = 0
var max_series: int = 0
@@ -50,7 +50,7 @@ func _init(rename: String, neighbors: Array):
for start in range(4):
var series = 0
for i in range(4):
- if Counter.is_floor(neighbors[(start + i) % 4]):
+ if Counter.is_floor(ctx.neighbors[(start + i) % 4]):
series += 1
else:
break
@@ -62,7 +62,7 @@ func _init(rename: String, neighbors: Array):
# backsplash
facing = max_idx
if max_series == 1:
- if WallTile.is_wall(neighbors[(max_idx + 2) % 4]):
+ if WallTile.is_wall(ctx.neighbors[(max_idx + 2) % 4]):
kind = CounterKind.STRAIGHT_BACKSPLASH
else:
kind = CounterKind.STRAIGHT