diff --git a/materials/plain_tile.tres b/materials/plain_tile.tres index 69c1b75..0391eca 100644 --- a/materials/plain_tile.tres +++ b/materials/plain_tile.tres @@ -6,4 +6,3 @@ resource_name = "Material" cull_mode = 2 albedo_texture = ExtResource("1_nijc4") -roughness = 0.5 diff --git a/scenes/models/tile-old.tscn b/scenes/models/tile-old.tscn index e229491..e170fc6 100644 --- a/scenes/models/tile-old.tscn +++ b/scenes/models/tile-old.tscn @@ -11,7 +11,6 @@ material = ExtResource("2_6ssja") size = Vector3(10, 5, 10) [sub_resource type="CompressedTexture2D" id="CompressedTexture2D_t334j"] -load_path = "res://.godot/imported/plus.svg-fa9840203ca82cc4696e02bad07ef61f.s3tc.ctex" [node name="Tile" type="StaticBody3D"] transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, -2.5, 0) diff --git a/scenes/world.tscn b/scenes/world.tscn index 0cc04d9..b383504 100644 --- a/scenes/world.tscn +++ b/scenes/world.tscn @@ -1,4 +1,4 @@ -[gd_scene load_steps=6 format=3 uid="uid://ddnlfxwoeywq0"] +[gd_scene load_steps=6 format=3 uid="uid://cao75w3xdkup3"] [ext_resource type="Script" path="res://scripts/Earth.gd" id="1_u71pd"] [ext_resource type="PackedScene" uid="uid://b6er1dx11vq1a" path="res://scenes/models/god.tscn" id="2_frpdt"] @@ -25,3 +25,4 @@ environment = SubResource("Environment_4hkk2") [node name="DirectionalLight3D" type="DirectionalLight3D" parent="WorldEnvironment"] transform = Transform3D(-3.53179e-08, 0.58921, -0.80798, 2.57552e-08, 0.80798, 0.58921, 1, 0, -4.37114e-08, -14.3426, 13.3054, 0) +shadow_enabled = true diff --git a/scenes/world.tscn.bak.tscn b/scenes/world.tscn.bak.tscn new file mode 100644 index 0000000..f45ab1f --- /dev/null +++ b/scenes/world.tscn.bak.tscn @@ -0,0 +1,28 @@ +[gd_scene load_steps=6 format=3 uid="uid://dgnq54ix2bdv2"] + +[ext_resource type="Script" path="res://scripts/Earth.gd" id="1_bry4w"] +[ext_resource type="PackedScene" uid="uid://b6er1dx11vq1a" path="res://scenes/models/god.tscn" id="2_mujaw"] + +[sub_resource type="ProceduralSkyMaterial" id="ProceduralSkyMaterial_01wm3"] + +[sub_resource type="Sky" id="Sky_oeb53"] +sky_material = SubResource("ProceduralSkyMaterial_01wm3") + +[sub_resource type="Environment" id="Environment_4hkk2"] +background_mode = 2 +sky = SubResource("Sky_oeb53") + +[node name="World" type="Node3D"] + +[node name="Earth" type="Node3D" parent="."] +script = ExtResource("1_bry4w") + +[node name="God" parent="." instance=ExtResource("2_mujaw")] +transform = Transform3D(-4.37114e-08, 0, -1, 0, 1, 0, 1, 0, -4.37114e-08, -2.77222, 0.906321, 0) + +[node name="WorldEnvironment" type="WorldEnvironment" parent="."] +environment = SubResource("Environment_4hkk2") + +[node name="DirectionalLight3D" type="DirectionalLight3D" parent="WorldEnvironment"] +transform = Transform3D(-3.53179e-08, 0.58921, -0.80798, 2.57552e-08, 0.80798, 0.58921, 1, 0, -4.37114e-08, -14.3426, 13.3054, 0) +shadow_enabled = true diff --git a/scripts/Earth.gd b/scripts/Earth.gd index 4840598..c5116e3 100644 --- a/scripts/Earth.gd +++ b/scripts/Earth.gd @@ -20,7 +20,8 @@ func mark_empty_tiles(): var tiles = get_children() var available = [] for tile in tiles: - tile.update_tile() + #tile.update_tile() + tile.request_ready() if tile.tile_type == TileType.Empty: continue var free_dirs = tile.get_empty_dirs_around() for dir in free_dirs: diff --git a/scripts/Tile.gd b/scripts/Tile.gd index e551e3e..fe9c3df 100644 --- a/scripts/Tile.gd +++ b/scripts/Tile.gd @@ -38,6 +38,7 @@ func generate_decoration_objects(): decoration.position = pos decoration.add_to_group("Decoration") add_child(decoration) + func update_tile(): for decoration in get_children(): if(decoration.is_in_group("Decoration")): diff --git a/scripts/world.gd b/scripts/world.gd index d2f0188..8dd7178 100644 --- a/scripts/world.gd +++ b/scripts/world.gd @@ -78,5 +78,6 @@ func load_world(save_name): if i == "node" or "pos" in i: continue new_object.set(i, node_data[i]) + new_object._ready() #request ready don't work /shrug await get_tree().physics_frame earth.mark_empty_tiles()