aboutsummaryrefslogtreecommitdiff
path: root/client/map/tile_factory.gd
diff options
context:
space:
mode:
Diffstat (limited to 'client/map/tile_factory.gd')
-rw-r--r--client/map/tile_factory.gd4
1 files changed, 3 insertions, 1 deletions
diff --git a/client/map/tile_factory.gd b/client/map/tile_factory.gd
index ce239f4c..1ff6baf4 100644
--- a/client/map/tile_factory.gd
+++ b/client/map/tile_factory.gd
@@ -31,6 +31,7 @@ class TileCC:
var position: Vector2i
var neighbors: Array
var floor_meshers: Dictionary[String, FloorMesher]
+ var server_context: Game.ServerContext
var floor_meshers: Dictionary[String, FloorMesher] = {
"floor": FloorMesher.new(Floor.floor_mesh()),
@@ -39,7 +40,7 @@ var floor_meshers: Dictionary[String, FloorMesher] = {
"street": FloorMesher.new(Street.floor_mesh())
}
-func produce(raw_name: String, position: Vector2i, neighbors: Array) -> Tile:
+func produce(raw_name: String, position: Vector2i, neighbors: Array, server_context: Game.ServerContext = null) -> Tile:
var tile_name = TileName.new(raw_name)
var ctx := TileCC.new()
@@ -51,6 +52,7 @@ func produce(raw_name: String, position: Vector2i, neighbors: Array) -> Tile:
else: return null
)
ctx.floor_meshers = floor_meshers
+ ctx.server_context = server_context
match tile_name.name:
"book": return CounterBase.new(ctx, preload("res://map/tiles/book.tscn"))