diff options
author | tpart <tpart120@proton.me> | 2024-08-16 22:11:44 +0200 |
---|---|---|
committer | tpart <tpart120@proton.me> | 2024-08-16 22:11:44 +0200 |
commit | d1b80432f13b6ff373c9a727373e432929c2155f (patch) | |
tree | 390239ca8b4187a80624293743a20479a816271b /client/map | |
parent | 1b7aad1747b69b369ee646399b49e44c5f250124 (diff) | |
download | hurrycurry-d1b80432f13b6ff373c9a727373e432929c2155f.tar hurrycurry-d1b80432f13b6ff373c9a727373e432929c2155f.tar.bz2 hurrycurry-d1b80432f13b6ff373c9a727373e432929c2155f.tar.zst |
Add flour crate model to replace unsuitable flour counter and improve consistency & implement item
Diffstat (limited to 'client/map')
-rw-r--r-- | client/map/tile_factory.gd | 2 | ||||
-rw-r--r-- | client/map/tiles/flour_crate.gd (renamed from client/map/tiles/flour_counter.gd) | 13 | ||||
-rw-r--r-- | client/map/tiles/flour_crate.tscn | 24 |
3 files changed, 29 insertions, 10 deletions
diff --git a/client/map/tile_factory.gd b/client/map/tile_factory.gd index 06f1c1fa..4a8a1d7d 100644 --- a/client/map/tile_factory.gd +++ b/client/map/tile_factory.gd @@ -27,7 +27,7 @@ static func produce(tile_name: String, node_name: String, neighbors: Array) -> T "counter": return CounterBase.new(node_name, neighbors) "flour-crate": - return FlourCounter.new(node_name, neighbors) + return FlourCrate.new(node_name, neighbors) "fish-crate": return FishCrate.new(node_name, neighbors) "oven": diff --git a/client/map/tiles/flour_counter.gd b/client/map/tiles/flour_crate.gd index 03bb7742..4949e646 100644 --- a/client/map/tiles/flour_counter.gd +++ b/client/map/tiles/flour_crate.gd @@ -1,5 +1,5 @@ # Hurry Curry! - a game about cooking -# Copyright 2024 nokoe +# Copyright 2024 tpart # # 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 @@ -13,14 +13,9 @@ # 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 FlourCounter -extends CounterBase +class_name FlourCrate +extends Crate func _init(rename: String, neighbors: Array): super(rename, neighbors) - var bag = load("res://map/items/flour.tscn").instantiate() - # this is supposed to be overridden - @warning_ignore("static_called_on_instance") - bag.position = interact_target() - bag.rotation_degrees.y = 45 - base.add_child(bag) + base.add_child(load("res://map/tiles/flour_crate.tscn").instantiate()) diff --git a/client/map/tiles/flour_crate.tscn b/client/map/tiles/flour_crate.tscn new file mode 100644 index 00000000..8f3dde0e --- /dev/null +++ b/client/map/tiles/flour_crate.tscn @@ -0,0 +1,24 @@ +[gd_scene load_steps=3 format=3 uid="uid://qwk6nih458mh"] + +[ext_resource type="PackedScene" uid="uid://xdui0oya4lpb" path="res://map/tiles/crate.tscn" id="1_7xctt"] +[ext_resource type="PackedScene" uid="uid://dgo8cknr1o6ml" path="res://map/items/flour.tscn" id="2_i5ha0"] + +[node name="FlourCrate" instance=ExtResource("1_7xctt")] + +[node name="Flour" parent="." index="1" instance=ExtResource("2_i5ha0")] +transform = Transform3D(0.990268, 0, -0.139173, 0, 1, 0, 0.139173, 0, 0.990268, 0.25, 0, -0.2) + +[node name="Flour2" parent="." index="2" instance=ExtResource("2_i5ha0")] +transform = Transform3D(0.990268, 0, 0.139173, 0, 1, 0, -0.139173, 0, 0.990268, 0.25, 0, 0.2) + +[node name="Flour3" parent="." index="3" instance=ExtResource("2_i5ha0")] +transform = Transform3D(-0.0965059, 0, 0.995332, -0.436731, 0.898595, -0.0423448, -0.894401, -0.438779, -0.0867198, 0, 0, -0.146685) + +[node name="Flour4" parent="." index="4" instance=ExtResource("2_i5ha0")] +transform = Transform3D(0.99525, -0.00903298, -0.0969282, -0.0219365, 0.949266, -0.313707, 0.0948444, 0.314343, 0.94456, 0, 0, 0.106343) + +[node name="Flour5" parent="." index="5" instance=ExtResource("2_i5ha0")] +transform = Transform3D(0.990268, 0, -0.139173, 0, 1, 0, 0.139173, 0, 0.990268, -0.25, 0, -0.2) + +[node name="Flour6" parent="." index="6" instance=ExtResource("2_i5ha0")] +transform = Transform3D(0.997564, 0, 0.0697565, 0, 1, 0, -0.0697565, 0, 0.997564, -0.25, 0, 0.2) |