diff options
Diffstat (limited to 'client/menu')
-rw-r--r-- | client/menu/menu_background.gd | 6 | ||||
-rw-r--r-- | client/menu/menu_background.tscn | 5 |
2 files changed, 6 insertions, 5 deletions
diff --git a/client/menu/menu_background.gd b/client/menu/menu_background.gd index 1d9322f3..4304cdbf 100644 --- a/client/menu/menu_background.gd +++ b/client/menu/menu_background.gd @@ -20,6 +20,7 @@ const NULLS = [null,null,null,null] const BUCKETS = [[], ["floor","floor","floor","floor","tomato-crate", "raw-steak-crate"], ["table", "chair", "counter"], ["sink", "stove"]] @onready var environment: WorldEnvironment = $Environment +@onready var map: Map = $Map func _ready(): if !Global.on_vulkan(): @@ -32,7 +33,4 @@ func _ready(): var bucket = BUCKETS[int(floor(k * BUCKETS.size())) % BUCKETS.size()] if bucket.size() == 0: continue 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) + map.set_tile(Vector2i(x,y), tile_name) diff --git a/client/menu/menu_background.tscn b/client/menu/menu_background.tscn index dbc7010a..fefffef3 100644 --- a/client/menu/menu_background.tscn +++ b/client/menu/menu_background.tscn @@ -1,7 +1,8 @@ -[gd_scene load_steps=10 format=3 uid="uid://l4vm07dtda4j"] +[gd_scene load_steps=11 format=3 uid="uid://l4vm07dtda4j"] [ext_resource type="Script" path="res://menu/menu_background.gd" id="1_ijsg0"] [ext_resource type="Shader" path="res://menu/menu_background.gdshader" id="3_5mp8y"] +[ext_resource type="PackedScene" uid="uid://b4gone8fu53r7" path="res://map/map.tscn" id="3_p80a7"] [sub_resource type="ProceduralSkyMaterial" id="ProceduralSkyMaterial_uw50b"] sky_top_color = Color(0.55, 0.55, 0.55, 1) @@ -63,3 +64,5 @@ environment = SubResource("Environment_slkjl") transform = Transform3D(0.614606, 0.499662, -0.610408, -0.00282255, 0.775198, 0.631712, 0.78883, -0.386531, 0.477851, 6, -13, -11) mesh = SubResource("QuadMesh_fvp2p") surface_material_override/0 = SubResource("ShaderMaterial_gd87g") + +[node name="Map" parent="." instance=ExtResource("3_p80a7")] |