diff options
| author | tpart <tpart120@proton.me> | 2026-03-01 22:17:36 +0100 |
|---|---|---|
| committer | tpart <tpart120@proton.me> | 2026-03-01 22:17:41 +0100 |
| commit | a4d9e467bb629546f7c663f2d6fa3a8f2a753977 (patch) | |
| tree | ca667dc9466fa5e152d213319112cb48784f66da /client/map/tile_factory.gd | |
| parent | 998267627f1b31ca4534eb6b450a1d09379d58ff (diff) | |
| download | hurrycurry-a4d9e467bb629546f7c663f2d6fa3a8f2a753977.tar hurrycurry-a4d9e467bb629546f7c663f2d6fa3a8f2a753977.tar.bz2 hurrycurry-a4d9e467bb629546f7c663f2d6fa3a8f2a753977.tar.zst | |
Implement server name and motd; Update to new data protocol
Diffstat (limited to 'client/map/tile_factory.gd')
| -rw-r--r-- | client/map/tile_factory.gd | 4 |
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")) |