1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
|
# 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 <https://www.gnu.org/licenses/>.
#
class_name TileFactory
extends Object
static func produce(tile_name: String, node_name: String, neighbors: Array) -> Tile:
match tile_name:
"trash":
return Trash.new(node_name, neighbors)
"tomato-crate":
return TomatoCrate.new(node_name, neighbors)
"cuttingboard":
return CuttingBoard.new(node_name, neighbors)
"counter":
return CounterBase.new(node_name, neighbors)
"flour-crate":
return FlourCounter.new(node_name, neighbors)
"fish-crate":
return FishCrate.new(node_name, neighbors)
"oven":
return Oven.new(node_name, neighbors)
"raw-steak-crate":
return RawSteakCrate.new(node_name, neighbors)
"stove":
return Stove.new(node_name, neighbors)
"sink":
return Sink.new(node_name, neighbors)
"dirty-plate-crate":
return CounterBase.new(node_name, neighbors)
"wall":
return Wall.new(node_name, neighbors)
"chair":
return Chair.new(node_name, neighbors)
"table":
return Table.new(node_name, neighbors)
"floor":
return Floor.new(node_name, neighbors)
"counter-window":
return CounterWindow.new(node_name, neighbors)
"wall-window":
return WallWindow.new(node_name, neighbors)
"door":
return Door.new(node_name, neighbors)
"leek-crate":
return LeekCrate.new(node_name, neighbors)
"tree":
return ExteriorTree.new(node_name, neighbors)
"grass":
return Grass.new(node_name, neighbors)
"path":
return Path.new(node_name, neighbors)
"fence":
return Fence.new(node_name, neighbors)
"book":
return Book.new(node_name, neighbors)
"conveyor":
return Conveyor.new(node_name, neighbors)
"black-hole-counter":
return ItemPortal.new(node_name, neighbors, false)
"white-hole-counter":
return ItemPortal.new(node_name, neighbors, true)
"black-hole":
return PlayerPortal.new(node_name, neighbors, false)
"white-hole":
return PlayerPortal.new(node_name, neighbors, true)
"lamp":
return Lamp.new(node_name, neighbors)
"chandelier":
return Chandelier.new(node_name, neighbors)
"ceiling-lamp":
return CeilingLamp.new(node_name, neighbors)
"street":
return Street.new(node_name, neighbors)
"rice-crate":
return RiceCrate.new(node_name, neighbors)
"strawberry-crate":
return StrawberryCrate.new(node_name, neighbors)
var t:
push_warning("tile %s unknown" % t)
return GenericTile.new(node_name, neighbors, t)
|