diff options
| author | metamuffin <metamuffin@disroot.org> | 2024-06-25 23:57:41 +0200 | 
|---|---|---|
| committer | metamuffin <metamuffin@disroot.org> | 2024-06-25 23:57:41 +0200 | 
| commit | 319fb148582a6b154c85d03ca02e60e7e26e32ef (patch) | |
| tree | 4fa96c0b23734b00f669c1094c504414db7f5cff /client/menu | |
| parent | 9cd92ce6266bfe7be6a44e3985ee49f959f88e16 (diff) | |
| parent | 1a4edb61ad5454b76b5dc8e8a66db82b97beec41 (diff) | |
| download | hurrycurry-319fb148582a6b154c85d03ca02e60e7e26e32ef.tar hurrycurry-319fb148582a6b154c85d03ca02e60e7e26e32ef.tar.bz2 hurrycurry-319fb148582a6b154c85d03ca02e60e7e26e32ef.tar.zst | |
Merge branch 'master' of codeberg.org:metamuffin/undercooked
Diffstat (limited to 'client/menu')
| -rw-r--r-- | client/menu/character_menu.tscn | 8 | ||||
| -rw-r--r-- | client/menu/menu_background.gd | 17 | ||||
| -rw-r--r-- | client/menu/menu_background.tscn | 5 | 
3 files changed, 14 insertions, 16 deletions
| diff --git a/client/menu/character_menu.tscn b/client/menu/character_menu.tscn index 29c9c88f..cad0cb35 100644 --- a/client/menu/character_menu.tscn +++ b/client/menu/character_menu.tscn @@ -31,10 +31,6 @@ transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.75, 1.75)  [node name="Character" parent="." instance=ExtResource("3_odq7n")] -[node name="SceneTransition" parent="." instance=ExtResource("4_c0ocf")] -visible = false -layout_mode = 1 -  [node name="VBoxContainer" type="VBoxContainer" parent="."]  layout_mode = 1  anchors_preset = 15 @@ -115,6 +111,10 @@ grow_vertical = 2  size_flags_vertical = 8  text = "Back" +[node name="SceneTransition" parent="." instance=ExtResource("4_c0ocf")] +visible = false +layout_mode = 1 +  [connection signal="text_changed" from="VBoxContainer/top_panel/a/username" to="." method="_on_username_text_changed"]  [connection signal="pressed" from="VBoxContainer/Spacer/VBoxContainer/HBoxContainer/Back" to="." method="_on_character_back_pressed"]  [connection signal="pressed" from="VBoxContainer/Spacer/VBoxContainer/HBoxContainer/Forward" to="." method="_on_character_forward_pressed"] diff --git a/client/menu/menu_background.gd b/client/menu/menu_background.gd index 0e8e87e1..62c38baa 100644 --- a/client/menu/menu_background.gd +++ b/client/menu/menu_background.gd @@ -1,23 +1,21 @@  # Undercooked - a game about cooking  # Copyright 2024 metamuffin  # 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  # 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/>. -#  +#  extends Node3D -@onready var map = $Map -  const NULLS = [null,null,null,null]  const BUCKETS = [[], ["floor","floor","floor","floor","tomato-crate", "raw-steak-crate"], ["table", "chair", "counter"], ["sink", "stove"]] @@ -28,5 +26,8 @@ func _ready():  			var k = randf() * w  			var bucket = BUCKETS[int(floor(k * BUCKETS.size())) % BUCKETS.size()]  			if bucket.size() == 0: continue -			var tile = bucket[randi() % bucket.size()] -			map.update([x,y], tile, NULLS) +			var tile_name = bucket[randi() % bucket.size()] +			var tile = TileFactory.produce(tile_name, tile_name, NULLS) + +			add_child(tile) +			tile.position = Vector3(x, 0, y) diff --git a/client/menu/menu_background.tscn b/client/menu/menu_background.tscn index 88ccf49d..5c29e4ac 100644 --- a/client/menu/menu_background.tscn +++ b/client/menu/menu_background.tscn @@ -1,7 +1,6 @@ -[gd_scene load_steps=11 format=3 uid="uid://l4vm07dtda4j"] +[gd_scene load_steps=10 format=3 uid="uid://l4vm07dtda4j"]  [ext_resource type="Script" path="res://menu/menu_background.gd" id="1_ijsg0"] -[ext_resource type="PackedScene" uid="uid://cs8gxa22c6joh" path="res://map/map.tscn" id="2_eg8f5"]  [ext_resource type="Shader" path="res://menu/menu_background.gdshader" id="3_5mp8y"]  [sub_resource type="ProceduralSkyMaterial" id="ProceduralSkyMaterial_uw50b"] @@ -42,8 +41,6 @@ shader_parameter/noise = SubResource("NoiseTexture2D_s4fnp")  [node name="MenuBackground" type="Node3D"]  script = ExtResource("1_ijsg0") -[node name="Map" parent="." instance=ExtResource("2_eg8f5")] -  [node name="Camera" type="Camera3D" parent="."]  transform = Transform3D(0.614606, 0.499662, -0.610408, -0.00282255, 0.775198, 0.631712, 0.78883, -0.386531, 0.477852, -9.13611, 4.90356, 1.22532)  projection = 1 | 
