From 7c8bff5a0b853ec0eb4a2e9a9a7a2be2981e7e24 Mon Sep 17 00:00:00 2001 From: nokoe Date: Thu, 27 Jun 2024 14:52:49 +0200 Subject: add missing items --- client/map/item_factory.gd | 12 +++++++++++ client/map/items/bread_slice.gd | 21 +++++++++++++++++++ client/map/items/bread_slice_plate.gd | 21 +++++++++++++++++++ .../map/items/bread_slice_sliced_tomato_plate.gd | 23 +++++++++++++++++++++ .../items/bread_slice_sliced_tomato_steak_plate.gd | 23 +++++++++++++++++++++ client/map/items/bread_slice_steak_plate.gd | 23 +++++++++++++++++++++ client/map/items/exterior_tree.gd | 24 ---------------------- client/map/items/plate.gd | 2 +- client/map/items/pot.gd | 2 +- client/map/items/slice.gd | 21 ------------------- client/map/items/sliced_tomato_plate.gd | 21 +++++++++++++++++++ client/map/items/sliced_tomato_steak_plate.gd | 23 +++++++++++++++++++++ client/map/tiles/exterior_tree.gd | 24 ++++++++++++++++++++++ 13 files changed, 193 insertions(+), 47 deletions(-) create mode 100644 client/map/items/bread_slice.gd create mode 100644 client/map/items/bread_slice_plate.gd create mode 100644 client/map/items/bread_slice_sliced_tomato_plate.gd create mode 100644 client/map/items/bread_slice_sliced_tomato_steak_plate.gd create mode 100644 client/map/items/bread_slice_steak_plate.gd delete mode 100644 client/map/items/exterior_tree.gd delete mode 100644 client/map/items/slice.gd create mode 100644 client/map/items/sliced_tomato_plate.gd create mode 100644 client/map/items/sliced_tomato_steak_plate.gd create mode 100644 client/map/tiles/exterior_tree.gd (limited to 'client') diff --git a/client/map/item_factory.gd b/client/map/item_factory.gd index 86e69d1d..d3da32ef 100644 --- a/client/map/item_factory.gd +++ b/client/map/item_factory.gd @@ -70,5 +70,17 @@ static func produce(name: String, owned_by: Node3D) -> Item: return TomatoSoupPlate.new(owned_by) "burned": return Burned.new(owned_by) + "bread-slice-plate": + return BreadSlicePlate.new(owned_by) + "bread-slice-steak-plate": + return BreadSliceSteakPlate.new(owned_by) + "bread-slice-sliced-tomato-plate": + return BreadSliceSlicedTomatoPlate.new(owned_by) + "bread-slice-sliced-tomato-steak-plate": + return BreadSliceSlicedTomatoSteakPlate.new(owned_by) + "sliced-tomato-plate": + return SlicedTomatoPlate.new(owned_by) + "sliced-tomato-steak-plate": + return SlicedTomatoSteakPlate.new(owned_by) var t: return GenericItem.new(owned_by, t) diff --git a/client/map/items/bread_slice.gd b/client/map/items/bread_slice.gd new file mode 100644 index 00000000..0449689a --- /dev/null +++ b/client/map/items/bread_slice.gd @@ -0,0 +1,21 @@ +# Undercooked - 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 BreadSlice +extends Item + +func _init(owned_by_: Node3D): + super(owned_by_) + base.add_child(load("res://map/items/bread_slice.tscn").instantiate()) diff --git a/client/map/items/bread_slice_plate.gd b/client/map/items/bread_slice_plate.gd new file mode 100644 index 00000000..54a393bc --- /dev/null +++ b/client/map/items/bread_slice_plate.gd @@ -0,0 +1,21 @@ +# Undercooked - 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 BreadSlicePlate +extends Plate + +func _init(owned_by_: Node3D): + super(owned_by_) + base.add_child(load("res://map/items/bread_slice.tscn").instantiate()) diff --git a/client/map/items/bread_slice_sliced_tomato_plate.gd b/client/map/items/bread_slice_sliced_tomato_plate.gd new file mode 100644 index 00000000..63e74c21 --- /dev/null +++ b/client/map/items/bread_slice_sliced_tomato_plate.gd @@ -0,0 +1,23 @@ +# Undercooked - 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 BreadSliceSlicedTomatoPlate +extends BreadSlicePlate + +func _init(owned_by_: Node3D): + super(owned_by_) + var tomato = load("res://map/items/sliced_tomato.tscn").instantiate() + tomato.position.y = .05 + base.add_child(tomato) diff --git a/client/map/items/bread_slice_sliced_tomato_steak_plate.gd b/client/map/items/bread_slice_sliced_tomato_steak_plate.gd new file mode 100644 index 00000000..157c02e9 --- /dev/null +++ b/client/map/items/bread_slice_sliced_tomato_steak_plate.gd @@ -0,0 +1,23 @@ +# Undercooked - 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 BreadSliceSlicedTomatoSteakPlate +extends BreadSliceSteakPlate + +func _init(owned_by_: Node3D): + super(owned_by_) + var tomato = load("res://map/items/sliced_tomato.tscn").instantiate() + tomato.position.y = .15 + base.add_child(tomato) diff --git a/client/map/items/bread_slice_steak_plate.gd b/client/map/items/bread_slice_steak_plate.gd new file mode 100644 index 00000000..902cdf44 --- /dev/null +++ b/client/map/items/bread_slice_steak_plate.gd @@ -0,0 +1,23 @@ +# Undercooked - 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 BreadSliceSteakPlate +extends BreadSlicePlate + +func _init(owned_by_: Node3D): + super(owned_by_) + var steak = load("res://map/items/steak.tscn").instantiate() + steak.position.y = .05 + base.add_child(steak) diff --git a/client/map/items/exterior_tree.gd b/client/map/items/exterior_tree.gd deleted file mode 100644 index d1e0b6b3..00000000 --- a/client/map/items/exterior_tree.gd +++ /dev/null @@ -1,24 +0,0 @@ -# Undercooked - 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 ExteriorTree -extends Grass - -func _init(rename: String, _neighbors: Array): - super(rename, _neighbors) - var random = RandomNumberGenerator.new() - random.seed = rename.hash() - var path = "res://map/tiles/tree_%s.tscn" % random.randi_range(1,5) - base.add_child(load(path).instantiate()) diff --git a/client/map/items/plate.gd b/client/map/items/plate.gd index 91faf0b1..4431a6c8 100644 --- a/client/map/items/plate.gd +++ b/client/map/items/plate.gd @@ -18,7 +18,7 @@ extends Item func _init(owned_by_: Node3D): super(owned_by_) - base.add_child(load("res://map/items/plate.tscn").instantiate()) + add_child(load("res://map/items/plate.tscn").instantiate()) static func base_position() -> Vector3: return Vector3(0., 0.015, 0.) diff --git a/client/map/items/pot.gd b/client/map/items/pot.gd index ac865329..89cbf4c4 100644 --- a/client/map/items/pot.gd +++ b/client/map/items/pot.gd @@ -20,7 +20,7 @@ var steam: CPUParticles3D = load("res://map/items/steam.tscn").instantiate() func _init(owned_by_: Node3D): super(owned_by_) - base.add_child(load("res://map/items/pot.tscn").instantiate()) + add_child(load("res://map/items/pot.tscn").instantiate()) base.add_child(steam) func progress(p: float, warn: bool): diff --git a/client/map/items/slice.gd b/client/map/items/slice.gd deleted file mode 100644 index 0449689a..00000000 --- a/client/map/items/slice.gd +++ /dev/null @@ -1,21 +0,0 @@ -# Undercooked - 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 BreadSlice -extends Item - -func _init(owned_by_: Node3D): - super(owned_by_) - base.add_child(load("res://map/items/bread_slice.tscn").instantiate()) diff --git a/client/map/items/sliced_tomato_plate.gd b/client/map/items/sliced_tomato_plate.gd new file mode 100644 index 00000000..e8ea2d7b --- /dev/null +++ b/client/map/items/sliced_tomato_plate.gd @@ -0,0 +1,21 @@ +# Undercooked - 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 SlicedTomatoPlate +extends Plate + +func _init(owned_by_: Node3D): + super(owned_by_) + base.add_child(load("res://map/items/sliced_tomato.tscn").instantiate()) diff --git a/client/map/items/sliced_tomato_steak_plate.gd b/client/map/items/sliced_tomato_steak_plate.gd new file mode 100644 index 00000000..8dbb9c71 --- /dev/null +++ b/client/map/items/sliced_tomato_steak_plate.gd @@ -0,0 +1,23 @@ +# Undercooked - 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 SlicedTomatoSteakPlate +extends SteakPlate + +func _init(owned_by_: Node3D): + super(owned_by_) + var tomato = load("res://map/items/sliced_tomato.tscn").instantiate() + tomato.position.y = .1 + base.add_child(tomato) diff --git a/client/map/tiles/exterior_tree.gd b/client/map/tiles/exterior_tree.gd new file mode 100644 index 00000000..d1e0b6b3 --- /dev/null +++ b/client/map/tiles/exterior_tree.gd @@ -0,0 +1,24 @@ +# Undercooked - 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 ExteriorTree +extends Grass + +func _init(rename: String, _neighbors: Array): + super(rename, _neighbors) + var random = RandomNumberGenerator.new() + random.seed = rename.hash() + var path = "res://map/tiles/tree_%s.tscn" % random.randi_range(1,5) + base.add_child(load(path).instantiate()) -- cgit v1.2.3-70-g09d2