From d0bc8f954789a26817997d8349487514df1dad7e Mon Sep 17 00:00:00 2001 From: nokoe Date: Mon, 6 Oct 2025 23:00:57 +0200 Subject: cuttable class; splash when cutting steak --- client/map/items/Cuttable.gd | 28 ++++++++++++++++++++++++++++ client/map/items/Cuttable.gd.uid | 1 + client/map/items/cheese.gd | 29 ----------------------------- client/map/items/cheese.gd.uid | 1 - client/map/items/potato.gd | 29 ----------------------------- client/map/items/potato.gd.uid | 1 - client/map/items/strawberry.gd | 33 --------------------------------- client/map/items/strawberry.gd.uid | 1 - client/map/items/tomato.gd | 29 ----------------------------- client/map/items/tomato.gd.uid | 1 - 10 files changed, 29 insertions(+), 124 deletions(-) create mode 100644 client/map/items/Cuttable.gd create mode 100644 client/map/items/Cuttable.gd.uid delete mode 100644 client/map/items/cheese.gd delete mode 100644 client/map/items/cheese.gd.uid delete mode 100644 client/map/items/potato.gd delete mode 100644 client/map/items/potato.gd.uid delete mode 100644 client/map/items/strawberry.gd delete mode 100644 client/map/items/strawberry.gd.uid delete mode 100644 client/map/items/tomato.gd delete mode 100644 client/map/items/tomato.gd.uid (limited to 'client/map/items') diff --git a/client/map/items/Cuttable.gd b/client/map/items/Cuttable.gd new file mode 100644 index 00000000..e106a96d --- /dev/null +++ b/client/map/items/Cuttable.gd @@ -0,0 +1,28 @@ +# Hurry Curry! - a game about cooking +# Copyright (C) 2025 Hurry Curry! contributors +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as published by +# the Free Software Foundation, version 3 of the License only. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# +class_name Cuttable +extends GenericItem + +var cut: CPUParticles3D = load("res://map/items/cut.tscn").instantiate() + +func _init(owned_by_: Node3D, scene: PackedScene, color: Color, height_: float = height): + super(owned_by_, scene, height_) + base.add_child(cut) + cut.color = color + +func progress(position_: float, speed: float, warn: bool): + super(position_, speed, warn) + cut.emitting = speed > 0 diff --git a/client/map/items/Cuttable.gd.uid b/client/map/items/Cuttable.gd.uid new file mode 100644 index 00000000..0854ed74 --- /dev/null +++ b/client/map/items/Cuttable.gd.uid @@ -0,0 +1 @@ +uid://b8mq1c1sb2xnr diff --git a/client/map/items/cheese.gd b/client/map/items/cheese.gd deleted file mode 100644 index 0e6d9df7..00000000 --- a/client/map/items/cheese.gd +++ /dev/null @@ -1,29 +0,0 @@ -# Hurry Curry! - a game about cooking -# Copyright (C) 2025 Hurry Curry! contributors -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by -# the Free Software Foundation, version 3 of the License only. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# -class_name Cheese -extends Item - -var cut: CPUParticles3D = load("res://map/items/cut.tscn").instantiate() - -func _init(owned_by_: Node3D): - super(owned_by_) - base.add_child(load("res://map/items/cheese.tscn").instantiate()) - base.add_child(cut) - cut.color = Color("ffc844ff") - -func progress(position_: float, speed: float, warn: bool): - super(position_, speed, warn) - cut.emitting = speed > 0 diff --git a/client/map/items/cheese.gd.uid b/client/map/items/cheese.gd.uid deleted file mode 100644 index a3beb088..00000000 --- a/client/map/items/cheese.gd.uid +++ /dev/null @@ -1 +0,0 @@ -uid://g04vr0yok8t1 diff --git a/client/map/items/potato.gd b/client/map/items/potato.gd deleted file mode 100644 index afc0ca5c..00000000 --- a/client/map/items/potato.gd +++ /dev/null @@ -1,29 +0,0 @@ -# Hurry Curry! - a game about cooking -# Copyright (C) 2025 Hurry Curry! contributors -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by -# the Free Software Foundation, version 3 of the License only. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# -class_name Potato -extends Item - -var cut: CPUParticles3D = load("res://map/items/cut.tscn").instantiate() - -func _init(owned_by_: Node3D): - super(owned_by_) - base.add_child(load("res://map/items/potato.tscn").instantiate()) - base.add_child(cut) - cut.color = Color("e1af5e") - -func progress(position_: float, speed: float, warn: bool): - super(position_, speed, warn) - cut.emitting = speed > 0 diff --git a/client/map/items/potato.gd.uid b/client/map/items/potato.gd.uid deleted file mode 100644 index 1166947d..00000000 --- a/client/map/items/potato.gd.uid +++ /dev/null @@ -1 +0,0 @@ -uid://55drj8jpmcci diff --git a/client/map/items/strawberry.gd b/client/map/items/strawberry.gd deleted file mode 100644 index 3478dffd..00000000 --- a/client/map/items/strawberry.gd +++ /dev/null @@ -1,33 +0,0 @@ -# Hurry Curry! - a game about cooking -# Copyright (C) 2025 Hurry Curry! contributors -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by -# the Free Software Foundation, version 3 of the License only. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# -class_name Strawberry -extends Item - -var cut: CPUParticles3D = load("res://map/items/cut.tscn").instantiate() - -func _init(owned_by_: Node3D): - super(owned_by_) - base.add_child(load("res://map/items/strawberry.tscn").instantiate()) - base.add_child(cut) - cut.color = Color(1., 0., 0.) - -func progress(position_: float, speed: float, warn: bool): - super(position_, speed, warn) - cut.emitting = true - -func finish(): - super() - cut.emitting = false diff --git a/client/map/items/strawberry.gd.uid b/client/map/items/strawberry.gd.uid deleted file mode 100644 index c927a54f..00000000 --- a/client/map/items/strawberry.gd.uid +++ /dev/null @@ -1 +0,0 @@ -uid://dg0a4sawbd81j diff --git a/client/map/items/tomato.gd b/client/map/items/tomato.gd deleted file mode 100644 index 4782010f..00000000 --- a/client/map/items/tomato.gd +++ /dev/null @@ -1,29 +0,0 @@ -# Hurry Curry! - a game about cooking -# Copyright (C) 2025 Hurry Curry! contributors -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by -# the Free Software Foundation, version 3 of the License only. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# -class_name Tomato -extends Item - -var cut: CPUParticles3D = load("res://map/items/cut.tscn").instantiate() - -func _init(owned_by_: Node3D): - super(owned_by_) - base.add_child(load("res://map/items/tomato.tscn").instantiate()) - base.add_child(cut) - cut.color = Color(1., 0., 0.) - -func progress(position_: float, speed: float, warn: bool): - super(position_, speed, warn) - cut.emitting = speed > 0 diff --git a/client/map/items/tomato.gd.uid b/client/map/items/tomato.gd.uid deleted file mode 100644 index 0bd23b47..00000000 --- a/client/map/items/tomato.gd.uid +++ /dev/null @@ -1 +0,0 @@ -uid://e6l4io5vsomt -- cgit v1.2.3-70-g09d2