aboutsummaryrefslogtreecommitdiff
path: root/client/map/items
diff options
context:
space:
mode:
Diffstat (limited to 'client/map/items')
-rw-r--r--client/map/items/food_processor.gd4
-rw-r--r--client/map/items/generic_item.gd3
-rw-r--r--client/map/items/item.gd4
-rw-r--r--client/map/items/plate.gd6
-rw-r--r--client/map/items/sliced_cheese.gd24
-rw-r--r--client/map/items/sliced_cheese.gd.uid1
-rw-r--r--client/map/items/sliced_leek/sliced_leek.gd24
-rw-r--r--client/map/items/sliced_leek/sliced_leek.gd.uid1
-rw-r--r--client/map/items/sliced_lettuce.gd24
-rw-r--r--client/map/items/sliced_lettuce.gd.uid1
-rw-r--r--client/map/items/sliced_tomato.gd24
-rw-r--r--client/map/items/sliced_tomato.gd.uid1
12 files changed, 6 insertions, 111 deletions
diff --git a/client/map/items/food_processor.gd b/client/map/items/food_processor.gd
index f3ae0b9e..0a78904f 100644
--- a/client/map/items/food_processor.gd
+++ b/client/map/items/food_processor.gd
@@ -21,6 +21,7 @@ var processing: CPUParticles3D = load("res://map/items/processing.tscn").instant
func _init(owned_by_: Node3D):
super(owned_by_)
+ height = 0.8
add_child(load("res://map/items/food_processor.tscn").instantiate())
add_child(processing)
@@ -81,6 +82,3 @@ func finish():
static func base_position() -> Vector3:
return Vector3(0., 0.4, 0.)
-
-static func height() -> float:
- return .3
diff --git a/client/map/items/generic_item.gd b/client/map/items/generic_item.gd
index fd119feb..5f101646 100644
--- a/client/map/items/generic_item.gd
+++ b/client/map/items/generic_item.gd
@@ -16,6 +16,7 @@
class_name GenericItem
extends Item
-func _init(owned_by_: Node3D, scene: PackedScene):
+func _init(owned_by_: Node3D, scene: PackedScene, height_: float = height):
super(owned_by_)
+ height = height_
base.add_child(scene.instantiate())
diff --git a/client/map/items/item.gd b/client/map/items/item.gd
index 44482c9b..39c7afc1 100644
--- a/client/map/items/item.gd
+++ b/client/map/items/item.gd
@@ -24,6 +24,7 @@ var owned_by: Node3D
var base: Node3D = Node3D.new()
var rotation_target: float = 0.
var position_target: Vector3 = Vector3(0., 0., 0.)
+var height: float = 0.1
var progress_instance: Progress3D = preload("res://map/progress/progress.tscn").instantiate()
var take_sound: PlayRandom = preload("res://audio/play_random.tscn").instantiate()
@@ -145,6 +146,3 @@ func put():
static func base_position() -> Vector3:
return Vector3(0., 0., 0.)
-
-static func height() -> float:
- return .1
diff --git a/client/map/items/plate.gd b/client/map/items/plate.gd
index b4ae8baf..e5b86df2 100644
--- a/client/map/items/plate.gd
+++ b/client/map/items/plate.gd
@@ -18,6 +18,7 @@ extends Item
func _init(owned_by_: Node3D):
super(owned_by_)
+ height = .05
add_child(load("res://map/items/plate.tscn").instantiate())
func add_contents(contents: Array[String]):
@@ -69,7 +70,7 @@ func add_contents(contents: Array[String]):
base.add_child(item)
item.position.y = height_sum
@warning_ignore("static_called_on_instance")
- height_sum += item.height()
+ height_sum += item.height
func setup_sounds():
take_sound.setup([preload("res://map/items/sounds/plate_take.ogg")])
@@ -77,6 +78,3 @@ func setup_sounds():
static func base_position() -> Vector3:
return Vector3(0., .025, 0.)
-
-static func height() -> float:
- return .05
diff --git a/client/map/items/sliced_cheese.gd b/client/map/items/sliced_cheese.gd
deleted file mode 100644
index dc64aa66..00000000
--- a/client/map/items/sliced_cheese.gd
+++ /dev/null
@@ -1,24 +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 <https://www.gnu.org/licenses/>.
-#
-class_name SlicedCheese
-extends Item
-
-func _init(owned_by_: Node3D):
- super(owned_by_)
- base.add_child(load("res://map/items/sliced_cheese.tscn").instantiate())
-
-static func height() -> float:
- return .05
diff --git a/client/map/items/sliced_cheese.gd.uid b/client/map/items/sliced_cheese.gd.uid
deleted file mode 100644
index e41c56aa..00000000
--- a/client/map/items/sliced_cheese.gd.uid
+++ /dev/null
@@ -1 +0,0 @@
-uid://boa66jn85qghw
diff --git a/client/map/items/sliced_leek/sliced_leek.gd b/client/map/items/sliced_leek/sliced_leek.gd
deleted file mode 100644
index a53ed6ff..00000000
--- a/client/map/items/sliced_leek/sliced_leek.gd
+++ /dev/null
@@ -1,24 +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 <https://www.gnu.org/licenses/>.
-#
-class_name SlicedLeek
-extends Item
-
-func _init(owned_by_: Node3D):
- super(owned_by_)
- base.add_child(load("res://map/items/sliced_leek/sliced_leek.tscn").instantiate())
-
-static func height() -> float:
- return .05
diff --git a/client/map/items/sliced_leek/sliced_leek.gd.uid b/client/map/items/sliced_leek/sliced_leek.gd.uid
deleted file mode 100644
index 3e2a5eb2..00000000
--- a/client/map/items/sliced_leek/sliced_leek.gd.uid
+++ /dev/null
@@ -1 +0,0 @@
-uid://d7siimt0uu8h
diff --git a/client/map/items/sliced_lettuce.gd b/client/map/items/sliced_lettuce.gd
deleted file mode 100644
index 871038be..00000000
--- a/client/map/items/sliced_lettuce.gd
+++ /dev/null
@@ -1,24 +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 <https://www.gnu.org/licenses/>.
-#
-class_name SlicedLettuce
-extends Item
-
-func _init(owned_by_: Node3D):
- super(owned_by_)
- base.add_child(load("res://map/items/sliced_lettuce.tscn").instantiate())
-
-static func height() -> float:
- return .05
diff --git a/client/map/items/sliced_lettuce.gd.uid b/client/map/items/sliced_lettuce.gd.uid
deleted file mode 100644
index 1b53d6d9..00000000
--- a/client/map/items/sliced_lettuce.gd.uid
+++ /dev/null
@@ -1 +0,0 @@
-uid://dncjhvkj3bqc2
diff --git a/client/map/items/sliced_tomato.gd b/client/map/items/sliced_tomato.gd
deleted file mode 100644
index 6630b336..00000000
--- a/client/map/items/sliced_tomato.gd
+++ /dev/null
@@ -1,24 +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 <https://www.gnu.org/licenses/>.
-#
-class_name SlicedTomato
-extends Item
-
-func _init(owned_by_: Node3D):
- super(owned_by_)
- base.add_child(load("res://map/items/sliced_tomato.tscn").instantiate())
-
-static func height() -> float:
- return .05
diff --git a/client/map/items/sliced_tomato.gd.uid b/client/map/items/sliced_tomato.gd.uid
deleted file mode 100644
index 2c7bdabc..00000000
--- a/client/map/items/sliced_tomato.gd.uid
+++ /dev/null
@@ -1 +0,0 @@
-uid://b60e2pltc4lpc