diff options
Diffstat (limited to 'client/map')
| -rw-r--r-- | client/map/items/cooked_steak.res | bin | 0 -> 14183 bytes | |||
| -rw-r--r-- | client/map/items/cooked_steak.tscn | 10 | ||||
| -rw-r--r-- | client/map/items/icecream_plate.gd | 12 | ||||
| -rw-r--r-- | client/map/items/item.gd | 2 | ||||
| -rw-r--r-- | client/map/items/plate.gd | 4 | ||||
| -rw-r--r-- | client/map/items/plate_fill.gd | 8 | ||||
| -rw-r--r-- | client/map/items/steak.gd | 21 | ||||
| -rw-r--r-- | client/map/tiles/steak_crate.gd | 21 | ||||
| -rw-r--r-- | client/map/tiles/steak_crate.res | bin | 0 -> 50290 bytes | |||
| -rw-r--r-- | client/map/tiles/steak_crate.tscn | 10 | 
10 files changed, 74 insertions, 14 deletions
| diff --git a/client/map/items/cooked_steak.res b/client/map/items/cooked_steak.resBinary files differ new file mode 100644 index 00000000..68aaa171 --- /dev/null +++ b/client/map/items/cooked_steak.res diff --git a/client/map/items/cooked_steak.tscn b/client/map/items/cooked_steak.tscn new file mode 100644 index 00000000..2c2b8bf6 --- /dev/null +++ b/client/map/items/cooked_steak.tscn @@ -0,0 +1,10 @@ +[gd_scene load_steps=2 format=3 uid="uid://c70af18pms3gw"] + +[ext_resource type="ArrayMesh" uid="uid://kfod37qy5sx" path="res://map/items/cooked_steak.res" id="1_uomtq"] + +[node name="Steak" type="Node3D"] + +[node name="Mesh" type="MeshInstance3D" parent="."] +transform = Transform3D(0.5, 0, 0, 0, 0.5, 0, 0, 0, 0.5, 0, 0, 0) +mesh = ExtResource("1_uomtq") +skeleton = NodePath("") diff --git a/client/map/items/icecream_plate.gd b/client/map/items/icecream_plate.gd index 5febb09c..8cf9fbd3 100644 --- a/client/map/items/icecream_plate.gd +++ b/client/map/items/icecream_plate.gd @@ -13,15 +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 IcecreamPlate -extends Plate +class_name Icecream +extends Item  var model: MeshInstance3D = load("res://map/items/icecream.tscn").instantiate() -func _init(owned_by_: Node3D): +func _init(owned_by_: Node3D, color: Color):  	super(owned_by_) -	add_child(model) - -func set_color(c: Color):  	var mat: BaseMaterial3D = model.get_active_material(1) -	mat.albedo_color = c +	mat.albedo_color = color +	base.add_child(model) diff --git a/client/map/items/item.gd b/client/map/items/item.gd index 244613a8..59789d94 100644 --- a/client/map/items/item.gd +++ b/client/map/items/item.gd @@ -45,7 +45,7 @@ func _ready():  	position = owned_by.global_position  func _process(delta): -	if owned_by.get_parent() is Item:  +	if owned_by.get_parent() is Item or owned_by is Item:   		position = Vector3(0.,0.,0.)  		return  	var p = owned_by.get_parent().get_parent() is Player diff --git a/client/map/items/plate.gd b/client/map/items/plate.gd index 2ff62d65..3d5aa7a6 100644 --- a/client/map/items/plate.gd +++ b/client/map/items/plate.gd @@ -21,7 +21,9 @@ func _init(owned_by_: Node3D, contents: Array[String]):  	super(owned_by_)  	add_child(load("res://map/items/plate.tscn").instantiate())  	for c in contents: -		base.add_child(ItemFactory.produce(c, base)) +		match c: +			"tomato-soup": add_child(PlateFill.new(self, Color(1., .3, .2))) +			_: base.add_child(ItemFactory.produce(c, base))  func setup_sounds():  	take_sound.setup([preload("res://map/items/sounds/plate_take.ogg")]) diff --git a/client/map/items/plate_fill.gd b/client/map/items/plate_fill.gd index be5a320c..1ac8aa87 100644 --- a/client/map/items/plate_fill.gd +++ b/client/map/items/plate_fill.gd @@ -14,14 +14,12 @@  # along with this program.  If not, see <https://www.gnu.org/licenses/>.  #  class_name PlateFill -extends Plate +extends Item  var fill: MeshInstance3D = load("res://map/items/plate_fill.tscn").instantiate() -func _init(owned_by_: Node3D): +func _init(owned_by_: Node3D, c: Color):  	super(owned_by_) -	add_child(fill) - -func set_color(c: Color):  	var mat: BaseMaterial3D = fill.get_active_material(0)  	mat.albedo_color = c +	base.add_child(fill) diff --git a/client/map/items/steak.gd b/client/map/items/steak.gd new file mode 100644 index 00000000..7c8d9913 --- /dev/null +++ b/client/map/items/steak.gd @@ -0,0 +1,21 @@ +# 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 Steak +extends Item + +func _init(owned_by_: Node3D): +	super(owned_by_) +	base.add_child(load("res://map/items/steak.tscn").instantiate()) diff --git a/client/map/tiles/steak_crate.gd b/client/map/tiles/steak_crate.gd new file mode 100644 index 00000000..71062b39 --- /dev/null +++ b/client/map/tiles/steak_crate.gd @@ -0,0 +1,21 @@ +# 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 SteakCrate +extends Crate + +func _init(rename: String, neighbors: Array): +	super(rename, neighbors) +	base.add_child(load("res://map/tiles/raw_steak_crate.tscn").instantiate()) diff --git a/client/map/tiles/steak_crate.res b/client/map/tiles/steak_crate.resBinary files differ new file mode 100644 index 00000000..afb91ff5 --- /dev/null +++ b/client/map/tiles/steak_crate.res diff --git a/client/map/tiles/steak_crate.tscn b/client/map/tiles/steak_crate.tscn new file mode 100644 index 00000000..e37d2773 --- /dev/null +++ b/client/map/tiles/steak_crate.tscn @@ -0,0 +1,10 @@ +[gd_scene load_steps=2 format=3 uid="uid://cyi73ubyehy37"] + +[ext_resource type="ArrayMesh" uid="uid://bdsqnesyjl3kv" path="res://map/tiles/steak_crate.res" id="1_ujg4h"] + +[node name="SteakCrate" type="Node3D"] + +[node name="Mesh" type="MeshInstance3D" parent="."] +transform = Transform3D(0.5, 0, 0, 0, 0.5, 0, 0, 0, 0.5, 0, 0, 0) +mesh = ExtResource("1_ujg4h") +skeleton = NodePath("") | 
