diff options
Diffstat (limited to 'client/map')
46 files changed, 473 insertions, 826 deletions
diff --git a/client/map/environment/environment.gd b/client/map/environment/environment.gd index fd002406..35f69be6 100644 --- a/client/map/environment/environment.gd +++ b/client/map/environment/environment.gd @@ -20,7 +20,7 @@ func update(active: Array): # TODO ramp rain.emitting = active.has("rain") - rain.amount = 500 if active.has("rain") else 0 + # TODO: Allow server to specify rain.amount func set_sky(sky_name: String): world_environment.set_sky(sky_name) diff --git a/client/map/item_factory.gd b/client/map/item_factory.gd index 5a8c93e7..c56ab407 100644 --- a/client/map/item_factory.gd +++ b/client/map/item_factory.gd @@ -19,103 +19,72 @@ extends Object static func produce(name: String, owned_by: Node3D) -> Item: match name: - "plate": - return Plate.new(owned_by) - "dirty-plate": - return DirtyPlate.new(owned_by) - "tomato": - return Tomato.new(owned_by) - "raw-steak": - return RawSteak.new(owned_by) - "sliced-tomato": - return SlicedTomato.new(owned_by) - "pot": - return Pot.new(owned_by) - "raw-steak-pot": - return RawSteakPot.new(owned_by) - "steak-pot": - return SteakPot.new(owned_by) - "steak-plate": - return SteakPlate.new(owned_by) - "foodprocessor": - return FoodProcessor.new(owned_by) - "tomato-foodprocessor": - return TomatoFoodProcessor.new(owned_by) - "tomato-juice-foodprocessor": - return TomatoJuiceFoodProcessor.new(owned_by) - "flour": - return Flour.new(owned_by) - "flour-foodprocessor": - return FlourFoodProcessor.new(owned_by) - "dough": - return Dough.new(owned_by) - "bread": - return Bread.new(owned_by) - "dough-foodprocessor": - return DoughFoodProcessor.new(owned_by) - "bread-slice": - return BreadSlice.new(owned_by) - "burned-pot": - return BurnedPot.new(owned_by) - "tomato-juice-pot": - return TomatoJuicePot.new(owned_by) - "leek": - return Leek.new(owned_by) - "leek-pot": - return LeekPot.new(owned_by) - "leek-tomato-juice-pot": - return LeekTomatoJuicePot.new(owned_by) - "tomato-soup-pot": - return TomatoSoupPot.new(owned_by) - "tomato-soup-plate": - 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) - "fish": - return Fish.new(owned_by) - "sliced-fish": - return SlicedFish.new(owned_by) - "rice": - return Rice.new(owned_by) - "rice-pot": - return RicePot.new(owned_by) - "cooked-rice-pot": - return CookedRicePot.new(owned_by) - "rice-foodprocessor": - return RiceFoodProcessor.new(owned_by) - "rice-flour-foodprocessor": - return RiceFlourFoodProcessor.new(owned_by) - "rice-flour-pot": - return RiceFlourPot.new(owned_by) - "mochi-dough-pot": - return MochiDoughPot.new(owned_by) - "nigiri": - return Nigiri.new(owned_by) - "nigiri-plate": - return NigiriPlate.new(owned_by) - "coconut": - return Coconut.new(owned_by) - "coconut-foodprocessor": - return CoconutFoodProcessor.new(owned_by) - "strawberry": - return Strawberry.new(owned_by) - "strawberry-foodprocessor": - return StrawberryFoodProcessor.new(owned_by) - "strawberry-puree-foodprocessor": - return StrawberryPureeFoodProcessor.new(owned_by) - "milk-foodprocessor": - return MilkFoodProcessor.new(owned_by) - var t: - return GenericItem.new(owned_by, t) + "bread-slice": return BreadSlice.new(owned_by) + "bread": return Bread.new(owned_by) + "burned": return Burned.new(owned_by) + "coconut": return Coconut.new(owned_by) + "dough": return Dough.new(owned_by) + "fish": return Fish.new(owned_by) + "flour": return Flour.new(owned_by) + "leek": return Leek.new(owned_by) + "nigiri": return Nigiri.new(owned_by) + "raw-steak": return RawSteak.new(owned_by) + "rice": return Rice.new(owned_by) + "sliced-fish": return SlicedFish.new(owned_by) + "sliced-tomato-plate": return PlateItems.SlicedTomatoP.new(owned_by) + "sliced-tomato-steak-plate": return PlateItems.SlicedTomatoSteakP.new(owned_by) + "sliced-tomato": return SlicedTomato.new(owned_by) + "strawberry": return Strawberry.new(owned_by) + "tomato": return Tomato.new(owned_by) + + "pot": return Pot.new(owned_by) + "burned-pot": return PotItems.BurnedP.new(owned_by) + "cooked-rice-pot": return PotItems.CookedRiceP.new(owned_by) + "curry-pot": return PotItems.CurryP.new(owned_by) + "leek-milk-pot": return PotItems.LeekMilkP.new(owned_by) + "leek-milk-tomato-pot": return PotItems.LeekMilkTomatoP.new(owned_by) + "leek-pot": return PotItems.LeekP.new(owned_by) + "leek-tomato-juice-pot": return PotItems.LeekTomatoJuiceP.new(owned_by) + "leek-tomato-pot": return PotItems.LeekTomatoP.new(owned_by) + "milk-pot": return PotItems.MilkP.new(owned_by) + "milk-tomato-pot": return PotItems.MilkTomatoP.new(owned_by) + "mochi-dough-pot": return PotItems.MochiDoughP.new(owned_by) + "raw-steak-pot": return PotItems.RawSteakP.new(owned_by) + "rice-flour-pot": return PotItems.RiceFlourP.new(owned_by) + "rice-pot": return PotItems.RiceP.new(owned_by) + "steak-pot": return PotItems.SteakP.new(owned_by) + "tomato-juice-pot": return PotItems.TomatoJuiceP.new(owned_by) + "tomato-pot": return PotItems.TomatoP.new(owned_by) + "tomato-soup-pot": return PotItems.TomatoSoupP.new(owned_by) + + "foodprocessor": return FoodProcessor.new(owned_by) + "coconut-foodprocessor": return FoodProcessorItems.CoconutF.new(owned_by) + "coconut-strawberry-puree-foodprocessor": return FoodProcessorItems.CoconutStrawberryPureeF.new(owned_by) + "dough-foodprocessor": return FoodProcessorItems.DoughF.new(owned_by) + "flour-foodprocessor": return FoodProcessorItems.FlourF.new(owned_by) + "milk-foodprocessor": return FoodProcessorItems.MilkF.new(owned_by) + "milk-strawberry-foodprocessor": return FoodProcessorItems.MilkStrawberryF.new(owned_by) + "rice-flour-foodprocessor": return FoodProcessorItems.RiceFlourF.new(owned_by) + "rice-foodprocessor": return FoodProcessorItems.RiceF.new(owned_by) + "strawberry-foodprocessor": return FoodProcessorItems.StrawberryF.new(owned_by) + "strawberry-icecream-foodprocessor": return FoodProcessorItems.StrawberryIcecreamF.new(owned_by) + "strawberry-puree-foodprocessor": return FoodProcessorItems.StrawberryPureeF.new(owned_by) + "strawberry-shake-foodprocessor": return FoodProcessorItems.StrawberryShakeF.new(owned_by) + "tomato-foodprocessor": return FoodProcessorItems.TomatoF.new(owned_by) + "tomato-juice-foodprocessor": return FoodProcessorItems.TomatoJuiceF.new(owned_by) + + "glass": return Glass.new(owned_by) + "water-glass": return GlassItems.WaterG.new(owned_by) + "strawberry-shake-glass": return GlassItems.StrawberryShakeG.new(owned_by) + + "plate": return Plate.new(owned_by) + "bread-slice-plate": return PlateItems.BreadSliceP.new(owned_by) + "bread-slice-sliced-tomato-plate": return PlateItems.BreadSliceSlicedTomatoP.new(owned_by) + "bread-slice-sliced-tomato-steak-plate": return PlateItems.BreadSliceSlicedTomatoSteakP.new(owned_by) + "bread-slice-steak-plate": return PlateItems.BreadSliceSteakP.new(owned_by) + "dirty-plate": return PlateItems.DirtyP.new(owned_by) + "nigiri-plate": return PlateItems.NigiriP.new(owned_by) + "steak-plate": return PlateItems.SteakP.new(owned_by) + "tomato-soup-plate": return PlateItems.TomatoSoupP.new(owned_by) + + var t: return GenericItem.new(owned_by, t) diff --git a/client/map/items/bread_slice_plate.gd b/client/map/items/bread_slice_plate.gd deleted file mode 100644 index f222b7c2..00000000 --- a/client/map/items/bread_slice_plate.gd +++ /dev/null @@ -1,21 +0,0 @@ -# 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 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 deleted file mode 100644 index 4dc59897..00000000 --- a/client/map/items/bread_slice_sliced_tomato_plate.gd +++ /dev/null @@ -1,23 +0,0 @@ -# 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 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 deleted file mode 100644 index 963c2892..00000000 --- a/client/map/items/bread_slice_sliced_tomato_steak_plate.gd +++ /dev/null @@ -1,23 +0,0 @@ -# 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 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 deleted file mode 100644 index d6bca18f..00000000 --- a/client/map/items/bread_slice_steak_plate.gd +++ /dev/null @@ -1,23 +0,0 @@ -# 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 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/burned_pot.gd b/client/map/items/burned_pot.gd deleted file mode 100644 index 8a77d08d..00000000 --- a/client/map/items/burned_pot.gd +++ /dev/null @@ -1,25 +0,0 @@ -# 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 BurnedPot -extends PotFill - -func _init(owned_by_: Node3D): - super(owned_by_) - steam.color = Color(0., 0., 0.) - set_color(Color(.1, .1, .1)) - -func _ready(): - steam.emitting = true diff --git a/client/map/items/coconut_food_processor.gd b/client/map/items/coconut_food_processor.gd deleted file mode 100644 index c21ebabf..00000000 --- a/client/map/items/coconut_food_processor.gd +++ /dev/null @@ -1,22 +0,0 @@ -# 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 CoconutFoodProcessor -extends FoodProcessor - -func _init(owned_by_: Node3D): - super(owned_by_) - processing.color = Color(.8, .5, .4) - base.add_child(load("res://map/items/coconut.tscn").instantiate()) diff --git a/client/map/items/cooked_rice_pot.gd b/client/map/items/cooked_rice_pot.gd deleted file mode 100644 index 0181eaed..00000000 --- a/client/map/items/cooked_rice_pot.gd +++ /dev/null @@ -1,21 +0,0 @@ -# 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 CookedRicePot -extends RicePot - -func _init(owned_by_: Node3D): - super(owned_by_) - set_color(Color(1., 1., 1.)) diff --git a/client/map/items/dough_food_processor.gd b/client/map/items/dough_food_processor.gd deleted file mode 100644 index d72e4c58..00000000 --- a/client/map/items/dough_food_processor.gd +++ /dev/null @@ -1,21 +0,0 @@ -# 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 DoughFoodProcessor -extends FoodProcessorContent - -func _init(owned_by_: Node3D): - super(owned_by_) - set_color(Color8(200, 180, 160)) diff --git a/client/map/items/flour_food_processor.gd b/client/map/items/flour_food_processor.gd deleted file mode 100644 index dadd4b65..00000000 --- a/client/map/items/flour_food_processor.gd +++ /dev/null @@ -1,22 +0,0 @@ -# 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 FlourFoodProcessor -extends FoodProcessor - -func _init(owned_by_: Node3D): - super(owned_by_) - processing.color = Color(.9, .9, .9) - base.add_child(load("res://map/items/flour.tscn").instantiate()) diff --git a/client/map/items/food_processor_items.gd b/client/map/items/food_processor_items.gd new file mode 100644 index 00000000..0b5be011 --- /dev/null +++ b/client/map/items/food_processor_items.gd @@ -0,0 +1,92 @@ +# Hurry Curry! - a game about cooking +# Copyright 2024 metamuffin +# 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 FoodProcessorItems + +class MilkF extends FoodProcessorContent: + func _init(owned_by_: Node3D): + super(owned_by_) + set_color(Color8(250, 250, 250)) + +class RiceFlourF extends FoodProcessorContent: + func _init(owned_by_: Node3D): + super(owned_by_) + set_color(Color(1.,1.,.8)) + +class RiceF extends FoodProcessor: + func _init(owned_by_: Node3D): + super(owned_by_) + processing.color = Color(1.,1.,.8) + base.add_child(load("res://map/items/rice.tscn").instantiate()) + +class FlourF extends FoodProcessor: + func _init(owned_by_: Node3D): + super(owned_by_) + processing.color = Color(.9, .9, .9) + base.add_child(load("res://map/items/flour.tscn").instantiate()) + +class DoughF extends FoodProcessorContent: + func _init(owned_by_: Node3D): + super(owned_by_) + set_color(Color8(200, 180, 160)) + +class CoconutF extends FoodProcessor: + func _init(owned_by_: Node3D): + super(owned_by_) + processing.color = Color(.8, .5, .4) + base.add_child(load("res://map/items/coconut.tscn").instantiate()) + +class StrawberryF extends FoodProcessor: + func _init(owned_by_: Node3D): + super(owned_by_) + processing.color = Color(.9, .0, .0) + base.add_child(load("res://map/items/strawberry.tscn").instantiate()) + +class CoconutStrawberryPureeF extends StrawberryPureeF: + func _init(owned_by_: Node3D): + super(owned_by_) + base.add_child(load("res://map/items/coconut.tscn").instantiate()) + +class MilkStrawberryF extends MilkF: + func _init(owned_by_: Node3D): + super(owned_by_) + base.add_child(load("res://map/items/strawberry.tscn").instantiate()) + +class StrawberryShakeF extends FoodProcessorContent: + func _init(owned_by_: Node3D): + super(owned_by_) + set_color(Color8(250, 140, 180)) + +class StrawberryIcecreamF extends FoodProcessorContent: + func _init(owned_by_: Node3D): + super(owned_by_) + set_color(Color8(250, 180, 210)) + +class StrawberryPureeF extends FoodProcessorContent: + func _init(owned_by_: Node3D): + super(owned_by_) + set_color(Color8(200, 80, 80)) + +class TomatoF extends FoodProcessor: + func _init(owned_by_: Node3D): + super(owned_by_) + processing.color = Color(1.,0.,0.) + base.add_child(load("res://map/items/tomato.tscn").instantiate()) + +class TomatoJuiceF extends FoodProcessorContent: + func _init(owned_by_: Node3D): + super(owned_by_) + set_color(Color(1.,0.,0.)) diff --git a/client/map/items/dirty_plate.gd b/client/map/items/glass.gd index 859d6b35..e974abe9 100644 --- a/client/map/items/dirty_plate.gd +++ b/client/map/items/glass.gd @@ -1,5 +1,5 @@ # Hurry Curry! - a game about cooking -# Copyright 2024 nokoe +# Copyright 2024 tpart # # 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 @@ -13,9 +13,17 @@ # 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 DirtyPlate -extends Plate +class_name Glass +extends Item func _init(owned_by_: Node3D): super(owned_by_) - base.add_child(load("res://map/items/dirt.tscn").instantiate()) + add_child(load("res://map/items/glass.tscn").instantiate()) + +func setup_sounds(): + # TODO: Add custom glass sounds; For now use plate sounds as they are similar + take_sound.setup([preload("res://map/items/sounds/plate_take.ogg")]) + put_sound.setup([preload("res://map/items/sounds/plate_put.ogg")]) + +#static func base_position() -> Vector3: +# return Vector3(0., 0.05, 0.) diff --git a/client/map/items/glass.res b/client/map/items/glass.res Binary files differnew file mode 100644 index 00000000..8386865f --- /dev/null +++ b/client/map/items/glass.res diff --git a/client/map/items/glass.tscn b/client/map/items/glass.tscn new file mode 100644 index 00000000..29bdda8b --- /dev/null +++ b/client/map/items/glass.tscn @@ -0,0 +1,10 @@ +[gd_scene load_steps=2 format=3 uid="uid://c875kaj4v7nfv"] + +[ext_resource type="ArrayMesh" uid="uid://dywkxdkny1urs" path="res://map/items/glass.res" id="1_v2eeu"] + +[node name="Glass" type="Node3D"] + +[node name="Mesh" type="MeshInstance3D" parent="."] +transform = Transform3D(0.125, 0, 0, 0, 0.125, 0, 0, 0, 0.125, 0, 0.125, 0) +mesh = ExtResource("1_v2eeu") +skeleton = NodePath("") diff --git a/client/map/items/rice_pot.gd b/client/map/items/glass_fill.gd index 42bcd166..8b1e18f0 100644 --- a/client/map/items/rice_pot.gd +++ b/client/map/items/glass_fill.gd @@ -13,14 +13,13 @@ # 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 RicePot -extends Pot +class_name GlassFill +extends Glass -var fill: MeshInstance3D = load("res://map/items/rice_content.tscn").instantiate() +var fill: MeshInstance3D = load("res://map/items/glass_fill.tscn").instantiate() func _init(owned_by_: Node3D): super(owned_by_) - set_color(Color(1., 1., .8)) add_child(fill) func set_color(c: Color): diff --git a/client/map/items/glass_fill.res b/client/map/items/glass_fill.res Binary files differnew file mode 100644 index 00000000..8226fb04 --- /dev/null +++ b/client/map/items/glass_fill.res diff --git a/client/map/items/glass_fill.tscn b/client/map/items/glass_fill.tscn new file mode 100644 index 00000000..ec4d367e --- /dev/null +++ b/client/map/items/glass_fill.tscn @@ -0,0 +1,15 @@ +[gd_scene load_steps=3 format=3 uid="uid://dvdwxct8qu2fm"] + +[ext_resource type="ArrayMesh" uid="uid://byebq6oifi2jk" path="res://map/items/glass_fill.res" id="1_apxu2"] + +[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_g0wwk"] +resource_local_to_scene = true +resource_name = "Material.002" +cull_mode = 2 +metallic_specular = 0.0 + +[node name="GlassFill" type="MeshInstance3D"] +transform = Transform3D(0.125, 0, 0, 0, 0.125, 0, 0, 0, 0.125, 0, 0.125, 0) +mesh = ExtResource("1_apxu2") +skeleton = NodePath("") +surface_material_override/0 = SubResource("StandardMaterial3D_g0wwk") diff --git a/client/map/items/strawberry_food_processor.gd b/client/map/items/glass_items.gd index 416da224..d154579a 100644 --- a/client/map/items/strawberry_food_processor.gd +++ b/client/map/items/glass_items.gd @@ -1,6 +1,6 @@ # Hurry Curry! - a game about cooking +# Copyright 2024 tpart # Copyright 2024 metamuffin -# 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 @@ -14,10 +14,14 @@ # 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 StrawberryFoodProcessor -extends FoodProcessor +class_name GlassItems -func _init(owned_by_: Node3D): - super(owned_by_) - processing.color = Color(.9, .0, .0) - base.add_child(load("res://map/items/strawberry.tscn").instantiate()) +class WaterG extends GlassFill: + func _init(owned_by_: Node3D): + super(owned_by_) + set_color(Color(.5, .6, .8)) + +class StrawberryShakeG extends GlassFill: + func _init(owned_by_: Node3D): + super(owned_by_) + set_color(Color8(250, 140, 180)) diff --git a/client/map/items/leek_pot.gd b/client/map/items/leek_pot.gd deleted file mode 100644 index 3e5b7def..00000000 --- a/client/map/items/leek_pot.gd +++ /dev/null @@ -1,24 +0,0 @@ -# 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 LeekPot -extends Pot - -func _init(owned_by_: Node3D): - super(owned_by_) - var leek: Node3D = load("res://map/items/leek.tscn").instantiate() - leek.rotation_degrees = Vector3(14.5, 0, -25) - leek.position.x = .03 - base.add_child(leek) diff --git a/client/map/items/leek_tomato_juice_pot.gd b/client/map/items/leek_tomato_juice_pot.gd deleted file mode 100644 index 26a614b5..00000000 --- a/client/map/items/leek_tomato_juice_pot.gd +++ /dev/null @@ -1,24 +0,0 @@ -# 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 LeekTomatoJuicePot -extends TomatoJuicePot - -func _init(owned_by_: Node3D): - super(owned_by_) - var leek: Node3D = load("res://map/items/leek.tscn").instantiate() - leek.rotation_degrees = Vector3(14.5, 0, -25) - leek.position.x = .03 - base.add_child(leek) diff --git a/client/map/items/milk_food_processor.gd b/client/map/items/milk_food_processor.gd deleted file mode 100644 index 4be2553b..00000000 --- a/client/map/items/milk_food_processor.gd +++ /dev/null @@ -1,22 +0,0 @@ -# Hurry Curry! - a game about cooking -# Copyright 2024 metamuffin -# 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 MilkFoodProcessor -extends FoodProcessorContent - -func _init(owned_by_: Node3D): - super(owned_by_) - set_color(Color8(250,250,250)) diff --git a/client/map/items/mochi_dough_pot.gd b/client/map/items/mochi_dough_pot.gd deleted file mode 100644 index 1b7e3e33..00000000 --- a/client/map/items/mochi_dough_pot.gd +++ /dev/null @@ -1,21 +0,0 @@ -# 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 MochiDoughPot -extends PotFill - -func _init(owned_by_: Node3D): - super(owned_by_) - set_color(Color(1., 1., .3)) diff --git a/client/map/items/nigiri_plate.gd b/client/map/items/nigiri_plate.gd deleted file mode 100644 index 210803d3..00000000 --- a/client/map/items/nigiri_plate.gd +++ /dev/null @@ -1,21 +0,0 @@ -# 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 NigiriPlate -extends Plate - -func _init(owned_by_: Node3D): - super(owned_by_) - base.add_child(load("res://map/items/nigiri.tscn").instantiate()) diff --git a/client/map/items/plate_items.gd b/client/map/items/plate_items.gd new file mode 100644 index 00000000..c1f4df37 --- /dev/null +++ b/client/map/items/plate_items.gd @@ -0,0 +1,75 @@ +# Hurry Curry! - a game about cooking +# Copyright 2024 metamuffin +# 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 PlateItems + +class BreadSliceP extends Plate: + func _init(owned_by_: Node3D): + super(owned_by_) + base.add_child(load("res://map/items/bread_slice.tscn").instantiate()) + +class BreadSliceSlicedTomatoP extends BreadSliceP: + 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) + +class BreadSliceSlicedTomatoSteakP extends BreadSliceSteakP: + 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) + +class BreadSliceSteakP extends BreadSliceP: + 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) + +class DirtyP extends Plate: + func _init(owned_by_: Node3D): + super(owned_by_) + base.add_child(load("res://map/items/dirt.tscn").instantiate()) + +class SlicedTomatoP extends Plate: + func _init(owned_by_: Node3D): + super(owned_by_) + base.add_child(load("res://map/items/sliced_tomato.tscn").instantiate()) + +class SlicedTomatoSteakP extends SteakP: + 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) + +class SteakP extends Plate: + func _init(owned_by_: Node3D): + super(owned_by_) + base.add_child(load("res://map/items/steak.tscn").instantiate()) + +class TomatoSoupP extends PlateFill: + func _init(owned_by_: Node3D): + super(owned_by_) + set_color(Color(1., .3, .2)) + +class NigiriP extends Plate: + func _init(owned_by_: Node3D): + super(owned_by_) + base.add_child(load("res://map/items/nigiri.tscn").instantiate()) diff --git a/client/map/items/pot.gd b/client/map/items/pot.gd index 4fb065cd..dd5a6c6f 100644 --- a/client/map/items/pot.gd +++ b/client/map/items/pot.gd @@ -29,7 +29,7 @@ func progress(p: float, warn: bool): if warn: steam.color = Color(.2, .2, .2) else: - steam.color = Color(1., 1., 1.) + steam.color = Color(1.,1.,1.) func finish(warn: bool): super(warn) @@ -40,4 +40,4 @@ func setup_sounds(): put_sound.setup([preload("res://map/items/sounds/pot_put.ogg")]) static func base_position() -> Vector3: - return Vector3(0., 0.015, 0.) + return Vector3(0.,0.015, 0.) diff --git a/client/map/items/pot_items.gd b/client/map/items/pot_items.gd new file mode 100644 index 00000000..fae2ccaa --- /dev/null +++ b/client/map/items/pot_items.gd @@ -0,0 +1,130 @@ +# Hurry Curry! - a game about cooking +# Copyright 2024 metamuffin +# 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 PotItems + +class MochiDoughP extends PotFill: + func _init(owned_by_: Node3D): + super(owned_by_) + set_color(Color(1.,1.,.3)) + +class RiceP extends Pot: + var fill: MeshInstance3D = load("res://map/items/rice_content.tscn").instantiate() + func _init(owned_by_: Node3D): + super(owned_by_) + set_color(Color(1.,1.,.8)) + add_child(fill) + func set_color(c: Color): + var mat: BaseMaterial3D = fill.get_active_material(0) + mat.albedo_color = c + +class RiceFlourP extends PotFill: + func _init(owned_by_: Node3D): + super(owned_by_) + set_color(Color(1.,1.,.8)) + +class TomatoJuiceP extends PotFill: + func _init(owned_by_: Node3D): + super(owned_by_) + set_color(Color(1.,0.,0.)) + +class TomatoSoupP extends PotFill: + func _init(owned_by_: Node3D): + super(owned_by_) + set_color(Color(1.,.3, .2)) + +class RawSteakP extends Pot: + func _init(owned_by_: Node3D): + super(owned_by_) + base.add_child(preload("res://map/items/raw_steak.tscn").instantiate()) + + func progress(p: float, warn: bool): + super(p, warn) + if sound_id == null: + sound_id = Sound.item_progress(self, preload("res://map/items/sounds/frying.ogg"), null) + +class LeekP extends Pot: + func _init(owned_by_: Node3D): + super(owned_by_) + var leek: Node3D = load("res://map/items/leek.tscn").instantiate() + leek.rotation_degrees = Vector3(14.5, 0, -25) + leek.position.x = .03 + base.add_child(leek) + +class LeekTomatoJuiceP extends TomatoJuiceP: + func _init(owned_by_: Node3D): + super(owned_by_) + var leek: Node3D = load("res://map/items/leek.tscn").instantiate() + leek.rotation_degrees = Vector3(14.5, 0, -25) + leek.position.x = .03 + base.add_child(leek) + +class CookedRiceP extends RiceP: + func _init(owned_by_: Node3D): + super(owned_by_) + set_color(Color(1.,1.,1.)) + +class BurnedP extends PotFill: + func _init(owned_by_: Node3D): + super(owned_by_) + steam.color = Color(0.,0.,0.) + set_color(Color(.1, .1, .1)) + + func _ready(): + steam.emitting = true + +class SteakP extends Pot: + func _init(owned_by_: Node3D): + super(owned_by_) + base.add_child(load("res://map/items/steak.tscn").instantiate()) + +class TomatoP extends Pot: + func _init(owned_by_: Node3D): + super(owned_by_) + base.add_child(load("res://map/items/tomato.tscn").instantiate()) + +class LeekTomatoP extends LeekP: + func _init(owned_by_: Node3D): + super(owned_by_) + base.add_child(load("res://map/items/tomato.tscn").instantiate()) + +class CurryP extends PotFill: + func _init(owned_by_: Node3D): + super(owned_by_) + set_color(Color(.75, .45, .1)) + +class MilkP extends PotFill: + func _init(owned_by_: Node3D): + super(owned_by_) + set_color(Color8(250, 250, 250)) + +class LeekMilkP extends MilkP: + func _init(owned_by_: Node3D): + super(owned_by_) + var leek: Node3D = load("res://map/items/leek.tscn").instantiate() + leek.rotation_degrees = Vector3(14.5, 0, -25) + leek.position.x = .03 + base.add_child(leek) + +class LeekMilkTomatoP extends LeekMilkP: + func _init(owned_by_: Node3D): + super(owned_by_) + base.add_child(load("res://map/items/tomato.tscn").instantiate()) + +class MilkTomatoP extends MilkP: + func _init(owned_by_: Node3D): + super(owned_by_) + base.add_child(load("res://map/items/tomato.tscn").instantiate()) diff --git a/client/map/items/raw_steak_pot.gd b/client/map/items/raw_steak_pot.gd deleted file mode 100644 index 6c3d4717..00000000 --- a/client/map/items/raw_steak_pot.gd +++ /dev/null @@ -1,30 +0,0 @@ -# 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 RawSteakPot -extends Pot - -func _init(owned_by_: Node3D): - super(owned_by_) - base.add_child(preload("res://map/items/raw_steak.tscn").instantiate()) - -func progress(p: float, warn: bool): - super(p, warn) - if sound_id == null: - sound_id = Sound.item_progress( - self, - preload("res://map/items/sounds/frying.ogg"), - null - ) diff --git a/client/map/items/rice_flour_food_processor.gd b/client/map/items/rice_flour_food_processor.gd deleted file mode 100644 index e70af0fc..00000000 --- a/client/map/items/rice_flour_food_processor.gd +++ /dev/null @@ -1,21 +0,0 @@ -# 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 RiceFlourFoodProcessor -extends FoodProcessorContent - -func _init(owned_by_: Node3D): - super(owned_by_) - set_color(Color(1., 1., .8)) diff --git a/client/map/items/rice_flour_pot.gd b/client/map/items/rice_flour_pot.gd deleted file mode 100644 index ee5afccc..00000000 --- a/client/map/items/rice_flour_pot.gd +++ /dev/null @@ -1,21 +0,0 @@ -# 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 RiceFlourPot -extends PotFill - -func _init(owned_by_: Node3D): - super(owned_by_) - set_color(Color(1., 1., .8)) diff --git a/client/map/items/rice_food_processor.gd b/client/map/items/rice_food_processor.gd deleted file mode 100644 index 205a6c7b..00000000 --- a/client/map/items/rice_food_processor.gd +++ /dev/null @@ -1,22 +0,0 @@ -# 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 RiceFoodProcessor -extends FoodProcessor - -func _init(owned_by_: Node3D): - super(owned_by_) - processing.color = Color(1., 1., .8) - base.add_child(load("res://map/items/rice.tscn").instantiate()) diff --git a/client/map/items/sliced_tomato_plate.gd b/client/map/items/sliced_tomato_plate.gd deleted file mode 100644 index 061a4d1f..00000000 --- a/client/map/items/sliced_tomato_plate.gd +++ /dev/null @@ -1,21 +0,0 @@ -# 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 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 deleted file mode 100644 index 3d8070f0..00000000 --- a/client/map/items/sliced_tomato_steak_plate.gd +++ /dev/null @@ -1,23 +0,0 @@ -# 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 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/items/steak_plate.gd b/client/map/items/steak_plate.gd deleted file mode 100644 index 6ff91420..00000000 --- a/client/map/items/steak_plate.gd +++ /dev/null @@ -1,21 +0,0 @@ -# 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 SteakPlate -extends Plate - -func _init(owned_by_: Node3D): - super(owned_by_) - base.add_child(load("res://map/items/steak.tscn").instantiate()) diff --git a/client/map/items/steak_pot.gd b/client/map/items/steak_pot.gd deleted file mode 100644 index 32dbea5c..00000000 --- a/client/map/items/steak_pot.gd +++ /dev/null @@ -1,21 +0,0 @@ -# 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 SteakPot -extends Pot - -func _init(owned_by_: Node3D): - super(owned_by_) - base.add_child(load("res://map/items/steak.tscn").instantiate()) diff --git a/client/map/items/strawberry_puree_food_processor.gd b/client/map/items/strawberry_puree_food_processor.gd deleted file mode 100644 index 5e3d97a3..00000000 --- a/client/map/items/strawberry_puree_food_processor.gd +++ /dev/null @@ -1,22 +0,0 @@ -# Hurry Curry! - a game about cooking -# Copyright 2024 metamuffin -# 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 StrawberryPureeFoodProcessor -extends FoodProcessorContent - -func _init(owned_by_: Node3D): - super(owned_by_) - set_color(Color8(200, 80, 80)) diff --git a/client/map/items/tomato_food_processor.gd b/client/map/items/tomato_food_processor.gd deleted file mode 100644 index 296a996c..00000000 --- a/client/map/items/tomato_food_processor.gd +++ /dev/null @@ -1,22 +0,0 @@ -# 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 TomatoFoodProcessor -extends FoodProcessor - -func _init(owned_by_: Node3D): - super(owned_by_) - processing.color = Color(1., 0., 0.) - base.add_child(load("res://map/items/tomato.tscn").instantiate()) diff --git a/client/map/items/tomato_juice_food_processor.gd b/client/map/items/tomato_juice_food_processor.gd deleted file mode 100644 index d6767786..00000000 --- a/client/map/items/tomato_juice_food_processor.gd +++ /dev/null @@ -1,21 +0,0 @@ -# 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 TomatoJuiceFoodProcessor -extends FoodProcessorContent - -func _init(owned_by_: Node3D): - super(owned_by_) - set_color(Color(1., 0., 0.)) diff --git a/client/map/items/tomato_juice_pot.gd b/client/map/items/tomato_juice_pot.gd deleted file mode 100644 index 7219b51a..00000000 --- a/client/map/items/tomato_juice_pot.gd +++ /dev/null @@ -1,21 +0,0 @@ -# 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 TomatoJuicePot -extends PotFill - -func _init(owned_by_: Node3D): - super(owned_by_) - set_color(Color(1., 0., 0.)) diff --git a/client/map/items/tomato_soup_plate.gd b/client/map/items/tomato_soup_plate.gd deleted file mode 100644 index c5ec9312..00000000 --- a/client/map/items/tomato_soup_plate.gd +++ /dev/null @@ -1,21 +0,0 @@ -# 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 TomatoSoupPlate -extends PlateFill - -func _init(owned_by_: Node3D): - super(owned_by_) - set_color(Color(1., .3, .2)) diff --git a/client/map/items/tomato_soup_pot.gd b/client/map/items/tomato_soup_pot.gd deleted file mode 100644 index c77c5dc3..00000000 --- a/client/map/items/tomato_soup_pot.gd +++ /dev/null @@ -1,21 +0,0 @@ -# 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 TomatoSoupPot -extends PotFill - -func _init(owned_by_: Node3D): - super(owned_by_) - set_color(Color(1., .3, .2)) diff --git a/client/map/progress.gd b/client/map/progress.gd index 52415b95..94670651 100644 --- a/client/map/progress.gd +++ b/client/map/progress.gd @@ -21,4 +21,3 @@ func set_progress(progress: float, bad: bool): var mat: ShaderMaterial = self.get_active_material(0) mat.set_shader_parameter("progress", progress) mat.set_shader_parameter("bad", bad) - diff --git a/client/map/tile_factory.gd b/client/map/tile_factory.gd index 9f157b78..9580bd66 100644 --- a/client/map/tile_factory.gd +++ b/client/map/tile_factory.gd @@ -18,80 +18,45 @@ 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 FlourCrate.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) - "coconut-crate": - return CoconutCrate.new(node_name, neighbors) - "freezer": - return Freezer.new(node_name, neighbors) + "black-hole-counter": return ItemPortal.new(node_name, neighbors, false) + "black-hole": return PlayerPortal.new(node_name, neighbors, false) + "book": return Book.new(node_name, neighbors) + "ceiling-lamp": return CeilingLamp.new(node_name, neighbors) + "chair": return Chair.new(node_name, neighbors) + "chandelier": return Chandelier.new(node_name, neighbors) + "conveyor": return Conveyor.new(node_name, neighbors) + "counter-window": return CounterWindow.new(node_name, neighbors) + "counter": return CounterBase.new(node_name, neighbors) + "cuttingboard": return CuttingBoard.new(node_name, neighbors) + "door": return Door.new(node_name, neighbors) + "fence": return Fence.new(node_name, neighbors) + "floor": return Floor.new(node_name, neighbors) + "freezer": return Freezer.new(node_name, neighbors) + "grass": return Grass.new(node_name, neighbors) + "lamp": return Lamp.new(node_name, neighbors) + "oven": return Oven.new(node_name, neighbors) + "path": return Path.new(node_name, neighbors) + "sink": return Sink.new(node_name, neighbors) + "stove": return Stove.new(node_name, neighbors) + "street": return Street.new(node_name, neighbors) + "table": return Table.new(node_name, neighbors) + "trash": return Trash.new(node_name, neighbors) + "tree": return ExteriorTree.new(node_name, neighbors) + "wall-window": return WallWindow.new(node_name, neighbors) + "wall": return Wall.new(node_name, neighbors) + "white-hole-counter": return ItemPortal.new(node_name, neighbors, true) + "white-hole": return PlayerPortal.new(node_name, neighbors, true) + + "coconut-crate": return CoconutCrate.new(node_name, neighbors) + "dirty-plate-crate": return CounterBase.new(node_name, neighbors) + "fish-crate": return FishCrate.new(node_name, neighbors) + "flour-crate": return FlourCrate.new(node_name, neighbors) + "leek-crate": return LeekCrate.new(node_name, neighbors) + "raw-steak-crate": return RawSteakCrate.new(node_name, neighbors) + "rice-crate": return RiceCrate.new(node_name, neighbors) + "strawberry-crate": return StrawberryCrate.new(node_name, neighbors) + "tomato-crate": return TomatoCrate.new(node_name, neighbors) + var t: push_warning("tile %s unknown" % t) return GenericTile.new(node_name, neighbors, t) diff --git a/client/map/tiles/sink.gd b/client/map/tiles/sink.gd index e98a25d0..c39a2a2a 100644 --- a/client/map/tiles/sink.gd +++ b/client/map/tiles/sink.gd @@ -16,13 +16,13 @@ class_name Sink extends Counter -var bubbles: SinkBubbles = preload("res://map/tiles/sink_bubbles.tscn").instantiate() +var particles: SinkParticles = preload("res://map/tiles/sink_particles.tscn").instantiate() var running: AudioStreamPlayer3D = AudioStreamPlayer3D.new() var stopping: AudioStreamPlayer3D = AudioStreamPlayer3D.new() func _init(rename: String, neighbors: Array): super(rename, neighbors) - base.add_child(bubbles) + base.add_child(particles) match kind: CounterKind.STRAIGHT: base.add_child(load("res://map/tiles/sink.tscn").instantiate()) @@ -38,20 +38,22 @@ func _init(rename: String, neighbors: Array): func progress(p: float, warn: bool): super(p, warn) if item is Plate: - bubbles.start() + particles.start(true) + elif item is Glass: + particles.start() if not running.playing: running.play() func finish(warn: bool): super(warn) - bubbles.stop() + particles.stop() running.stop() stopping.play() func set_item(i: Item): super(i) - self.bubbles.stop() + particles.stop() func take_item() -> Item: - self.bubbles.stop() + particles.stop() return super() diff --git a/client/map/tiles/sink_bubbles.gd b/client/map/tiles/sink_particles.gd index 7afa7f5b..adc1564f 100644 --- a/client/map/tiles/sink_bubbles.gd +++ b/client/map/tiles/sink_particles.gd @@ -13,12 +13,12 @@ # 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 SinkBubbles +class_name SinkParticles extends Node3D -func start(): +func start(bubbles: bool = false): $Stream.emitting = true - $Bubbles.emitting = true + $Bubbles.emitting = bubbles func stop(): $Stream.emitting = false diff --git a/client/map/tiles/sink_bubbles.tscn b/client/map/tiles/sink_particles.tscn index 6e4487fa..7a54f841 100644 --- a/client/map/tiles/sink_bubbles.tscn +++ b/client/map/tiles/sink_particles.tscn @@ -1,6 +1,6 @@ [gd_scene load_steps=8 format=3 uid="uid://ckxtlgx7hg368"] -[ext_resource type="Script" path="res://map/tiles/sink_bubbles.gd" id="1_xt81f"] +[ext_resource type="Script" path="res://map/tiles/sink_particles.gd" id="1_vh7ox"] [sub_resource type="StandardMaterial3D" id="StandardMaterial3D_b8p5f"] vertex_color_use_as_albedo = true @@ -26,8 +26,8 @@ height = 0.1 _data = [Vector2(0.264045, 0), 0.0, 0.0, 0, 0, Vector2(0.460674, 1), 0.0, 0.0, 0, 0, Vector2(0.949438, 1), 0.0, 0.0, 0, 0, Vector2(1, 0), 0.0, 0.0, 0, 0] point_count = 4 -[node name="SinkBubbles" type="Node3D"] -script = ExtResource("1_xt81f") +[node name="SinkParticles" type="Node3D"] +script = ExtResource("1_vh7ox") [node name="Stream" type="CPUParticles3D" parent="."] transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.75, -0.05) |