diff options
64 files changed, 520 insertions, 855 deletions
diff --git a/client/audio/sound.gd b/client/audio/sound.gd index ea39050a..fbd4fb5d 100644 --- a/client/audio/sound.gd +++ b/client/audio/sound.gd @@ -49,6 +49,8 @@ func play_hover(): hover_sound.play() func play_hover_maybe(element): + # Don't play hover sound when focus is changed by clicking using a mouse. + # TODO: Clean up this code and find a proper solution. if element is Button: if element.is_hovered(): return diff --git a/client/global.gd b/client/global.gd index be83057f..7338e491 100644 --- a/client/global.gd +++ b/client/global.gd @@ -34,6 +34,7 @@ var default_profile := { "has_rotated": false, "has_reset": false, "has_zoomed": false, + "has_seen_performance": false, "has_seen_join_while_running": false } } @@ -216,7 +217,7 @@ func apply_settings(): using_touch = false using_touch_change.emit() - emit_signal("settings_changed") + settings_changed.emit() func update_language(): var language = languages[get_setting("language")][0] 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) diff --git a/client/menu/lobby.gd b/client/menu/lobby.gd index a419c636..44afe9cf 100644 --- a/client/menu/lobby.gd +++ b/client/menu/lobby.gd @@ -39,7 +39,8 @@ var difficulty_names = [tr("Easy"), tr("Moderate"), tr("Hard"), tr("Very hard"), @onready var map_name_label = $HBoxContainer/Bottom/MarginContainer/VBoxContainer/HBoxContainer/Map/Name @onready var map_player_label = $HBoxContainer/Bottom/MarginContainer/VBoxContainer/HBoxContainer/Map/Players @onready var map_difficulty_label = $HBoxContainer/Bottom/MarginContainer/VBoxContainer/HBoxContainer/Map/Difficulty -@onready var map_list = $HBoxContainer/Bottom/MarginContainer/VBoxContainer/MapList/VBoxContainer +@onready var map_list_container = $HBoxContainer/Bottom/MarginContainer/VBoxContainer/MapList/VBoxContainer +@onready var map_list = $HBoxContainer/Bottom/MarginContainer/VBoxContainer/MapList @onready var map_selector = $HBoxContainer/Bottom/MarginContainer/VBoxContainer/HBoxContainer @onready var prev_map = $HBoxContainer/Bottom/MarginContainer/VBoxContainer/HBoxContainer/VBoxContainer/Left @@ -63,7 +64,7 @@ func _ready(): func initialize(): map_count = game.maps.size() - for c in map_list.get_children(): + for c in map_list_container.get_children(): c.queue_free() for c in bot_settings.get_children(): c.queue_free() @@ -75,7 +76,7 @@ func initialize(): b.text = "%s (%d)" % [m[1]["name"], m[1]["players"]] b.pressed.connect(select_map.bind(i)) b.focus_entered.connect(select_map.bind(i)) - map_list.add_child(b) + map_list_container.add_child(b) i += 1 select_map(0) @@ -112,7 +113,7 @@ func select_map(i: int): map_player_label.text = tr("%d players recommended") % map_data["players"] map_difficulty_label.text = difficulty_names[map_data["difficulty"] - 1] selected_map_name = game.maps[i][0] - map_list.get_child(i).grab_focus() + map_list_container.get_child(i).grab_focus() func increase_bot_count(algo_id: String): bot_counts[algo_id] = bot_counts[algo_id] + 1 @@ -153,10 +154,14 @@ func _input(_event): func _on_game_joined(): map_selector.show() + map_list.show() + bots_container.show() start_button.disabled = false func _on_game_left(): map_selector.hide() + map_list.hide() + bots_container.hide() start_button.disabled = true func _on_left_pressed(): diff --git a/client/menu/main.tscn b/client/menu/main.tscn index cee3003d..94726109 100644 --- a/client/menu/main.tscn +++ b/client/menu/main.tscn @@ -46,8 +46,8 @@ theme_override_constants/margin_bottom = 20 layout_mode = 2 [node name="title" type="Label" parent="side/margin/options"] +auto_translate_mode = 2 layout_mode = 2 -auto_translate = false theme_override_colors/font_outline_color = Color(0.566408, 0.208917, 0.266045, 1) theme_override_constants/outline_size = 10 theme_override_fonts/font = SubResource("FontVariation_htgmg") diff --git a/client/menu/popup_message.gd b/client/menu/popup_message.gd index 9293847b..86b0ee2b 100644 --- a/client/menu/popup_message.gd +++ b/client/menu/popup_message.gd @@ -155,3 +155,8 @@ func _on_join_while_running_timeout(): if not game.is_joined and not Global.get_hint("has_seen_join_while_running"): Global.set_hint("has_seen_join_while_running", true) display_hint_msg(tr("Press %s and click \"Join\" to join the game while it is running") % display_keybind(tr("ESCAPE"), tr("Menu button"))) + +func _on_performance_timeout() -> void: + if not Global.get_hint("has_seen_performance") and Engine.get_frames_per_second() < DisplayServer.screen_get_refresh_rate() * 0.75: + Global.set_hint("has_seen_performance", true) + display_hint_msg(tr("Your framerate seems to be low. You can lower your graphics settings in the settings menu.")) diff --git a/client/menu/popup_message.tscn b/client/menu/popup_message.tscn index 765ee345..0df38364 100644 --- a/client/menu/popup_message.tscn +++ b/client/menu/popup_message.tscn @@ -36,7 +36,7 @@ content_margin_bottom = 8.0 shader = ExtResource("3_2vnom") shader_parameter/blur_amount = 3.5 shader_parameter/mix_amount = 0.85 -shader_parameter/mix_amount_no_blur = null +shader_parameter/mix_amount_no_blur = 1.0 shader_parameter/color_over = Color(0, 0, 0, 1) shader_parameter/enable_blur = null @@ -81,6 +81,7 @@ layout_mode = 2 size_flags_vertical = 0 mouse_filter = 2 theme_override_styles/panel = SubResource("StyleBoxFlat_vq4dg") +script = ExtResource("4_pvwmw") [node name="CenterContainer" type="HBoxContainer" parent="VBox/HintMessage"] layout_mode = 2 @@ -122,6 +123,10 @@ one_shot = true wait_time = 2.0 one_shot = true +[node name="Performance" type="Timer" parent="AutoHintTimers"] +wait_time = 20.0 +one_shot = true + [node name="Boost" type="Timer" parent="AutoHintTimers"] wait_time = 90.0 one_shot = true @@ -153,6 +158,7 @@ one_shot = true [connection signal="timeout" from="ServerTimer" to="." method="_on_server_timer_timeout"] [connection signal="timeout" from="HintTimer" to="." method="_on_hint_timer_timeout"] [connection signal="timeout" from="AutoHintTimers/Move" to="." method="_on_move_timeout"] +[connection signal="timeout" from="AutoHintTimers/Performance" to="." method="_on_performance_timeout"] [connection signal="timeout" from="AutoHintTimers/Boost" to="." method="_on_boost_timeout"] [connection signal="timeout" from="AutoHintTimers/Interact" to="." method="_on_interact_timeout"] [connection signal="timeout" from="AutoHintTimers/RotateCamera" to="." method="_on_rotate_camera_timeout"] diff --git a/client/menu/scene_transition.gd b/client/menu/scene_transition.gd index 77bce326..9b6b1cac 100644 --- a/client/menu/scene_transition.gd +++ b/client/menu/scene_transition.gd @@ -22,8 +22,6 @@ extends Control var black = true var fading = false -signal close() - func _ready(): $ColorRect.visible = true diff --git a/client/menu/theme/font-azaret-mono.woff2.import b/client/menu/theme/font-azaret-mono.woff2.import index 4209452d..cafe1fbd 100644 --- a/client/menu/theme/font-azaret-mono.woff2.import +++ b/client/menu/theme/font-azaret-mono.woff2.import @@ -15,6 +15,7 @@ dest_files=["res://.godot/imported/font-azaret-mono.woff2-38a6d727215392526b2e0e Rendering=null antialiasing=1 generate_mipmaps=false +disable_embedded_bitmaps=true multichannel_signed_distance_field=false msdf_pixel_range=8 msdf_size=48 diff --git a/client/menu/theme/font-josefin-sans.woff2.import b/client/menu/theme/font-josefin-sans.woff2.import index 5ecd872c..03e086da 100644 --- a/client/menu/theme/font-josefin-sans.woff2.import +++ b/client/menu/theme/font-josefin-sans.woff2.import @@ -15,6 +15,7 @@ dest_files=["res://.godot/imported/font-josefin-sans.woff2-e2c3f263d98e1132cfe6a Rendering=null antialiasing=1 generate_mipmaps=false +disable_embedded_bitmaps=true multichannel_signed_distance_field=false msdf_pixel_range=8 msdf_size=48 diff --git a/client/menu/theme/font-sansita-swashed.woff2.import b/client/menu/theme/font-sansita-swashed.woff2.import index faf840fa..2d38716d 100644 --- a/client/menu/theme/font-sansita-swashed.woff2.import +++ b/client/menu/theme/font-sansita-swashed.woff2.import @@ -15,6 +15,7 @@ dest_files=["res://.godot/imported/font-sansita-swashed.woff2-323b4a2ee0671aba6e Rendering=null antialiasing=1 generate_mipmaps=false +disable_embedded_bitmaps=true multichannel_signed_distance_field=false msdf_pixel_range=8 msdf_size=48 diff --git a/client/multiplayer.gd b/client/multiplayer.gd index efcf6275..b3ce6217 100644 --- a/client/multiplayer.gd +++ b/client/multiplayer.gd @@ -293,6 +293,7 @@ func send_movement(player: int, pos: Vector2, direction: Vector2, boost: bool): }) func send_tile_interact(player: int, pos: Vector2i, edge: bool): + @warning_ignore("incompatible_ternary") send_packet({ "type": "interact", "player": player, diff --git a/client/player/item_bubble.gd b/client/player/item_bubble.gd index 626fb7b6..32e353e8 100644 --- a/client/player/item_bubble.gd +++ b/client/player/item_bubble.gd @@ -16,8 +16,6 @@ class_name ItemBubble extends MeshInstance3D -signal submit_message - @onready var base: Node3D = $SubViewport/ItemMessage/VBoxContainer/SubViewportContainer/SubViewport/ItemBase @onready var progress: ProgressBar = $SubViewport/ItemMessage/VBoxContainer/ProgressBar diff --git a/client/player/item_bubble.tscn b/client/player/item_bubble.tscn index 89cd89ad..8189cfc0 100644 --- a/client/player/item_bubble.tscn +++ b/client/player/item_bubble.tscn @@ -45,10 +45,10 @@ transparent_bg = true size = Vector2i(256, 256) [node name="ItemMessage" type="PanelContainer" parent="SubViewport"] +auto_translate_mode = 2 offset_right = 256.0 offset_bottom = 256.0 size_flags_vertical = 3 -auto_translate = false theme_override_styles/panel = SubResource("StyleBoxFlat_dpele") [node name="VBoxContainer" type="VBoxContainer" parent="SubViewport/ItemMessage"] diff --git a/client/project.godot b/client/project.godot index 64e4aa2e..ec53efd8 100644 --- a/client/project.godot +++ b/client/project.godot @@ -28,6 +28,7 @@ DisableWrongJoypads="*res://disable_wrong_joypads.gd" window/stretch/mode="canvas_items" window/stretch/aspect="expand" +display_server/driver.linuxbsd="wayland" [input] diff --git a/data/recipes/default.ts b/data/recipes/default.ts index 5899a80d..c46e984c 100644 --- a/data/recipes/default.ts +++ b/data/recipes/default.ts @@ -171,7 +171,7 @@ function either(a: Item, b: Item) { } function sink_fill(c: Container) { const o = new Item("water", c) - out({ action: "instant", inputs: [c], outputs: [o], tile: "sink" }) + out({ action: "active", inputs: [c], outputs: [o], tile: "sink", duration: 1 }) return o } @@ -217,8 +217,8 @@ edible(nigiri) const strawberry_puree = process(strawberry.tr(FP)).as("strawberry-puree") const milk = process(coconut.tr(FP)).as("milk") const strawberry_shake = either( - process(container_add(milk, strawberry).as("coconut-strawberry-puree")).as("strawberry-shake"), - process(container_add(strawberry_puree, coconut).as("milk-strawberry")).as("strawberry-shake") + process(container_add(milk, strawberry).as("milk-strawberry")).as("strawberry-shake"), + process(container_add(strawberry_puree, coconut).as("coconut-strawberry-puree")).as("strawberry-shake") ) // Icecream diff --git a/server/bot/src/algos/customer.rs b/server/bot/src/algos/customer.rs index 716897f7..61a79dbc 100644 --- a/server/bot/src/algos/customer.rs +++ b/server/bot/src/algos/customer.rs @@ -237,18 +237,18 @@ impl BotAlgo for Customer { player: me, pos: None, }); - packets.push(PacketS::ApplyScore(Score { - demands_completed: 1, - points: demand.points, - ..Default::default() - })); - info!("{me:?} -> exiting"); - *self = Customer::Exiting { path }; - return BotInput { - extra: packets, - ..Default::default() - }; } + packets.push(PacketS::ApplyScore(Score { + demands_completed: 1, + points: demand.points, + ..Default::default() + })); + info!("{me:?} -> exiting"); + *self = Customer::Exiting { path }; + return BotInput { + extra: packets, + ..Default::default() + }; } } BotInput { diff --git a/server/src/server.rs b/server/src/server.rs index 2f93246d..43f2a59f 100644 --- a/server/src/server.rs +++ b/server/src/server.rs @@ -37,7 +37,6 @@ use std::{ pub struct ServerState { pub data: Arc<Serverdata>, pub entities: Entities, - pub lobby: bool, pub player_id_counter: PlayerID, pub score_changed: bool, pub packet_loopback: VecDeque<PacketS>, @@ -215,7 +214,6 @@ impl GameServerExt for Game { impl ServerState { pub fn new() -> Self { Self { - lobby: false, data: Serverdata::default().into(), entities: vec![], player_id_counter: PlayerID(1), diff --git a/server/src/state.rs b/server/src/state.rs index f6304db5..20a57b9d 100644 --- a/server/src/state.rs +++ b/server/src/state.rs @@ -185,7 +185,7 @@ impl State { } } - if server.count_chefs() <= 0 && !server.state.lobby { + if server.count_chefs() <= 0 && !server.game.lobby { self.tx .send(PacketC::ServerMessage { text: "Game was aborted automatically due to a lack of players".to_string(), |