# Hurry Curry! - a game about cooking # Copyright 2024 nokoe # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by # the Free Software Foundation, version 3 of the License only. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU Affero General Public License for more details. # # You should have received a copy of the GNU Affero General Public License # along with this program. If not, see . # class_name TileFactory extends Object class TileCC: var tile_name: String var position: Vector2i var neighbors: Array var floor_mesher: FloorMesher static func produce(tile_name: String, position: Vector2i, neighbors: Array, floor_mesher) -> Tile: var ctx := TileCC.new() ctx.tile_name = tile_name ctx.position = position ctx.neighbors = neighbors ctx.floor_mesher = floor_mesher match tile_name: "black-hole-counter": return ItemPortal.new(ctx, false) "black-hole": return PlayerPortal.new(ctx, false) "book": return Book.new(ctx) "ceiling-lamp": return CeilingLamp.new(ctx) "chair": return Chair.new(ctx) "chandelier": return Chandelier.new(ctx) "conveyor": return Conveyor.new(ctx) "counter-window": return CounterWindow.new(ctx) "counter": return CounterBase.new(ctx) "cuttingboard": return CuttingBoard.new(ctx) "door": return Door.new(ctx) "fence": return Fence.new(ctx) "floor": return Floor.new(ctx) "freezer": return Freezer.new(ctx) "grass": return Grass.new(ctx) "lamp": return Lamp.new(ctx) "oven": return Oven.new(ctx) "path": return Path.new(ctx) "sink": return Sink.new(ctx) "stove": return Stove.new(ctx) "street": return Street.new(ctx) "table": return Table.new(ctx) "trash": return Trash.new(ctx) "tree": return ExteriorTree.new(ctx) "wall-window": return WallWindow.new(ctx) "wall": return Wall.new(ctx) "white-hole-counter": return ItemPortal.new(ctx, true) "white-hole": return PlayerPortal.new(ctx, true) "cheese-crate": return CheeseCrate.new(ctx) "coconut-crate": return CoconutCrate.new(ctx) "dirty-plate-crate": return CounterBase.new(ctx) "fish-crate": return FishCrate.new(ctx) "flour-crate": return FlourCrate.new(ctx) "leek-crate": return LeekCrate.new(ctx) "lettuce-crate": return LettuceCrate.new(ctx) "steak-crate": return RawSteakCrate.new(ctx) "rice-crate": return RiceCrate.new(ctx) "strawberry-crate": return StrawberryCrate.new(ctx) "tomato-crate": return TomatoCrate.new(ctx) var t: push_warning("tile %s unknown" % t) return GenericTile.new(ctx)