diff options
| author | nokoe <nokoe@mailbox.org> | 2025-10-16 21:36:22 +0200 |
|---|---|---|
| committer | nokoe <nokoe@mailbox.org> | 2025-10-16 21:38:03 +0200 |
| commit | c5bcd5ac47c095b231f9caadc9fdaaa7e066f3e5 (patch) | |
| tree | 77b88f9bdb843b91b9cc679934dc7115b95d137a /client | |
| parent | 1532e80cf37c9ee77cd921a158499188a1e172b2 (diff) | |
| download | hurrycurry-c5bcd5ac47c095b231f9caadc9fdaaa7e066f3e5.tar hurrycurry-c5bcd5ac47c095b231f9caadc9fdaaa7e066f3e5.tar.bz2 hurrycurry-c5bcd5ac47c095b231f9caadc9fdaaa7e066f3e5.tar.zst | |
add counter window conveyor; fixes #471
Diffstat (limited to 'client')
| -rw-r--r-- | client/map/tile_factory.gd | 1 | ||||
| -rw-r--r-- | client/map/tiles/conveyor.res | bin | 6513 -> 6529 bytes | |||
| -rw-r--r-- | client/map/tiles/conveyor_model.gd | 2 | ||||
| -rw-r--r-- | client/map/tiles/counter_window_conveyor.gd | 36 | ||||
| -rw-r--r-- | client/map/tiles/counter_window_conveyor.gd.uid | 1 | ||||
| -rw-r--r-- | client/map/tiles/counter_window_conveyor.res | bin | 0 -> 8059 bytes | |||
| -rw-r--r-- | client/map/tiles/counter_window_conveyor.tscn | 32 | ||||
| -rw-r--r-- | client/map/tiles/wall_t.res | bin | 3046 -> 3185 bytes | |||
| -rw-r--r-- | client/map/tiles/wall_tile.gd | 1 |
9 files changed, 72 insertions, 1 deletions
diff --git a/client/map/tile_factory.gd b/client/map/tile_factory.gd index 08d71333..cb5e5f13 100644 --- a/client/map/tile_factory.gd +++ b/client/map/tile_factory.gd @@ -55,6 +55,7 @@ func produce(raw_name: String, position: Vector2i, neighbors: Array) -> Tile: "chandelier": return Chandelier.new(ctx) "conveyor": return Conveyor.new(ctx) "counter-window": return CounterWindow.new(ctx) + "counter-window-conveyor": return CounterWindowConveyor.new(ctx) "counter": return CounterBase.new(ctx) "cutting-board": return CuttingBoard.new(ctx) "door": return Door.new(ctx) diff --git a/client/map/tiles/conveyor.res b/client/map/tiles/conveyor.res Binary files differindex e28bb057..0bd30827 100644 --- a/client/map/tiles/conveyor.res +++ b/client/map/tiles/conveyor.res diff --git a/client/map/tiles/conveyor_model.gd b/client/map/tiles/conveyor_model.gd index 1cbeb8a2..81ba1ecd 100644 --- a/client/map/tiles/conveyor_model.gd +++ b/client/map/tiles/conveyor_model.gd @@ -26,5 +26,5 @@ func _process(delta): func to_direction(direction: Vector2): direction.y *= -1 - $ConveyorDirection.rotation.y = direction.angle() + .5 * PI + $ConveyorDirection.global_rotation.y = direction.angle() + .5 * PI alpha = 1. diff --git a/client/map/tiles/counter_window_conveyor.gd b/client/map/tiles/counter_window_conveyor.gd new file mode 100644 index 00000000..a22b65cd --- /dev/null +++ b/client/map/tiles/counter_window_conveyor.gd @@ -0,0 +1,36 @@ +# 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 CounterWindowConveyor +extends WallTile + +var conveyor: ConveyorModel = preload("res://map/tiles/counter_window_conveyor.tscn").instantiate() + +func _init(ctx: TileFactory.TileCC): + super(ctx) + match kind: + WallKind.STRAIGHT: + add_dyed_mesh(ctx, conveyor) + WallKind.OUTER_CORNER: + push_warning("There is no corner counter window!") + add_dyed_mesh(ctx, conveyor) + +static func interact_target() -> Vector3: + return Vector3(0., .425, 0.) + +func pass_to(tile: Tile): + super(tile) + var dir: Vector3 = (tile.position - position) + conveyor.to_direction(Vector2(dir.x, dir.z).normalized()) diff --git a/client/map/tiles/counter_window_conveyor.gd.uid b/client/map/tiles/counter_window_conveyor.gd.uid new file mode 100644 index 00000000..861f4f0c --- /dev/null +++ b/client/map/tiles/counter_window_conveyor.gd.uid @@ -0,0 +1 @@ +uid://onp3ijhfm4hg diff --git a/client/map/tiles/counter_window_conveyor.res b/client/map/tiles/counter_window_conveyor.res Binary files differnew file mode 100644 index 00000000..23d5d0e3 --- /dev/null +++ b/client/map/tiles/counter_window_conveyor.res diff --git a/client/map/tiles/counter_window_conveyor.tscn b/client/map/tiles/counter_window_conveyor.tscn new file mode 100644 index 00000000..0645ea67 --- /dev/null +++ b/client/map/tiles/counter_window_conveyor.tscn @@ -0,0 +1,32 @@ +[gd_scene load_steps=7 format=3 uid="uid://qxbupftye50d"] + +[ext_resource type="ArrayMesh" uid="uid://cgxmagghg40l3" path="res://map/tiles/counter_window_conveyor.res" id="1_sxc4d"] +[ext_resource type="Script" uid="uid://sawoy4fqmd43" path="res://map/tiles/conveyor_model.gd" id="1_yowx8"] +[ext_resource type="PackedScene" uid="uid://60wue8ult1bx" path="res://map/tiles/conveyor_direction.tscn" id="2_5k25t"] +[ext_resource type="Shader" uid="uid://2cpdtie0rquv" path="res://map/tiles/conveyor_direction.gdshader" id="3_yowx8"] + +[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_yowx8"] +albedo_color = Color(0, 0, 0, 1) + +[sub_resource type="ShaderMaterial" id="ShaderMaterial_bk0aq"] +resource_local_to_scene = true +render_priority = 0 +shader = ExtResource("3_yowx8") +shader_parameter/angle = 0.2 +shader_parameter/frequency = 0.5 +shader_parameter/width = 0.2 +shader_parameter/speed = 1.0 +shader_parameter/alpha_fac = 1.0 + +[node name="CounterWindowConveyor" type="Node3D"] +script = ExtResource("1_yowx8") + +[node name="Mesh" type="MeshInstance3D" parent="."] +transform = Transform3D(-2.1855694e-08, 0, 0.5, 0, 0.5, 0, -0.5, 0, -2.1855694e-08, 0, 0, 0) +mesh = ExtResource("1_sxc4d") +skeleton = NodePath("") +surface_material_override/3 = SubResource("StandardMaterial3D_yowx8") + +[node name="ConveyorDirection" parent="." instance=ExtResource("2_5k25t")] +transform = Transform3D(-4.371139e-08, -1, -4.371139e-08, 0, -4.371139e-08, 1, -1, 4.371139e-08, 1.9106855e-15, 0, 0.43, 0) +surface_material_override/0 = SubResource("ShaderMaterial_bk0aq") diff --git a/client/map/tiles/wall_t.res b/client/map/tiles/wall_t.res Binary files differindex 5de79639..6dd74dca 100644 --- a/client/map/tiles/wall_t.res +++ b/client/map/tiles/wall_t.res diff --git a/client/map/tiles/wall_tile.gd b/client/map/tiles/wall_tile.gd index 390a4bfb..de9e551f 100644 --- a/client/map/tiles/wall_tile.gd +++ b/client/map/tiles/wall_tile.gd @@ -31,6 +31,7 @@ const WALLS: Array = [ "wall", "wall-window", "counter-window", + "counter-window-conveyor", "door", "fence" ] |