diff options
author | metamuffin <metamuffin@disroot.org> | 2024-07-09 14:53:12 +0200 |
---|---|---|
committer | metamuffin <metamuffin@disroot.org> | 2024-07-09 14:53:12 +0200 |
commit | 1da3465d7a4402760aed03ce2f450cd1b412417f (patch) | |
tree | bb110241f83f5b7cf372d05a59a4824eee626437 | |
parent | 13cbcc920a2756376e0005046b4b82c68eb9c9da (diff) | |
parent | e6cf494ccbd5541585aff16b4f4825d9b58f6a31 (diff) | |
download | hurrycurry-1da3465d7a4402760aed03ce2f450cd1b412417f.tar hurrycurry-1da3465d7a4402760aed03ce2f450cd1b412417f.tar.bz2 hurrycurry-1da3465d7a4402760aed03ce2f450cd1b412417f.tar.zst |
Merge branch 'master' of https://codeberg.org/hurrycurry/hurrycurry
-rw-r--r-- | client/map/items/item.gd | 3 | ||||
-rw-r--r-- | client/map/tile_factory.gd | 2 | ||||
-rw-r--r-- | client/map/tiles/chair.gd | 2 | ||||
-rw-r--r-- | client/map/tiles/conveyor.gd | 25 | ||||
-rw-r--r-- | client/map/tiles/conveyor.res | bin | 0 -> 6513 bytes | |||
-rw-r--r-- | client/map/tiles/conveyor.tscn | 10 |
6 files changed, 41 insertions, 1 deletions
diff --git a/client/map/items/item.gd b/client/map/items/item.gd index e9671e91..466348fe 100644 --- a/client/map/items/item.gd +++ b/client/map/items/item.gd @@ -49,6 +49,9 @@ func _process(delta): func progress(p: float, warn: bool): progress_instance.visible = true progress_instance.set_progress(p, warn) + # this shoukd be removed when the server is fixed + if p >= 1.: + finish(warn) func finish(_warn: bool): progress_instance.visible = false diff --git a/client/map/tile_factory.gd b/client/map/tile_factory.gd index b8f70200..8b9e2157 100644 --- a/client/map/tile_factory.gd +++ b/client/map/tile_factory.gd @@ -64,6 +64,8 @@ static func produce(tile_name: String, node_name: String, neighbors: Array) -> T return Fence.new(node_name, neighbors) "book": return Book.new(node_name, neighbors) + "conveyor": + return Conveyor.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/chair.gd b/client/map/tiles/chair.gd index 65b0f91e..54fe7f0c 100644 --- a/client/map/tiles/chair.gd +++ b/client/map/tiles/chair.gd @@ -18,7 +18,7 @@ extends Floor func _init(rename: String, neighbors: Array): super(rename, neighbors) - var chair = load("res://map/tiles/chair.tscn").instantiate() + var chair = preload("res://map/tiles/chair.tscn").instantiate() var facing = 0; for i in range(4): if neighbors[i] == "table": diff --git a/client/map/tiles/conveyor.gd b/client/map/tiles/conveyor.gd new file mode 100644 index 00000000..93bd4282 --- /dev/null +++ b/client/map/tiles/conveyor.gd @@ -0,0 +1,25 @@ +# 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 Conveyor +extends Floor + +func _init(rename: String, neighbors: Array): + super(rename, neighbors) + var conveyor = preload("res://map/tiles/conveyor.tscn").instantiate() + base.add_child(conveyor) + +static func interact_target() -> Vector3: + return Vector3(0., .425, 0.) diff --git a/client/map/tiles/conveyor.res b/client/map/tiles/conveyor.res Binary files differnew file mode 100644 index 00000000..e28bb057 --- /dev/null +++ b/client/map/tiles/conveyor.res diff --git a/client/map/tiles/conveyor.tscn b/client/map/tiles/conveyor.tscn new file mode 100644 index 00000000..3a5d3a83 --- /dev/null +++ b/client/map/tiles/conveyor.tscn @@ -0,0 +1,10 @@ +[gd_scene load_steps=2 format=3 uid="uid://df5wbypoqbkf"] + +[ext_resource type="ArrayMesh" uid="uid://djet05vuyh6iv" path="res://map/tiles/conveyor.res" id="1_hoctt"] + +[node name="Conveyor" 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_hoctt") +skeleton = NodePath("") |