small fixes

This commit is contained in:
Nitwel 2024-04-26 14:42:30 +02:00
parent b25cc8c08d
commit 08de973e96
8 changed files with 50 additions and 18 deletions

View File

@ -51,6 +51,9 @@ func update_align_reference():
corner1.global_position = Store.house.state.align_position1 corner1.global_position = Store.house.state.align_position1
corner2.global_position = Store.house.state.align_position2 corner2.global_position = Store.house.state.align_position2
if corner1.global_position == corner2.global_position:
corner2.global_position = corner1.global_position + Vector3(1, 0, 0)
corner2.look_at(corner1.global_position, Vector3.UP) corner2.look_at(corner1.global_position, Vector3.UP)
corner2.rotate(Vector3.UP, deg_to_rad( - 90)) corner2.rotate(Vector3.UP, deg_to_rad( - 90))

View File

@ -9,7 +9,6 @@ const temperature_gradient = preload ("./temp_gradient.tres")
@onready var small_node = $Body/Small @onready var small_node = $Body/Small
@onready var model = $Body/Small/Model @onready var model = $Body/Small/Model
@onready var collision_shape = $Body/CollisionShape3D @onready var collision_shape = $Body/CollisionShape3D
@onready var toggle_heatmap = $Body/HeatmapButton
@onready var entity_select = $Body/EntitySelect @onready var entity_select = $Body/EntitySelect
enum HeatmapType { enum HeatmapType {

View File

@ -18,7 +18,6 @@ disabled = true
[node name="Movable" type="Node" parent="Body"] [node name="Movable" type="Node" parent="Body"]
script = ExtResource("2_x7oed") script = ExtResource("2_x7oed")
restricted = true restricted = true
disabled = null
[node name="Small" type="Node3D" parent="Body"] [node name="Small" type="Node3D" parent="Body"]

View File

@ -1,10 +1,25 @@
[gd_scene load_steps=7 format=3 uid="uid://bsjqdvkt0u87c"] [gd_scene load_steps=8 format=3 uid="uid://bsjqdvkt0u87c"]
[ext_resource type="Script" path="res://content/ui/components/button/button.gd" id="1_74x7g"] [ext_resource type="Script" path="res://content/ui/components/button/button.gd" id="1_74x7g"]
[ext_resource type="Material" uid="uid://crycqex1ucj04" path="res://content/ui/components/panel/panel.material" id="2_28wsr"] [ext_resource type="Shader" path="res://content/ui/components/panel/glass.gdshader" id="2_db5by"]
[ext_resource type="Script" path="res://content/ui/components/panel/panel.gd" id="3_skm86"] [ext_resource type="Script" path="res://content/ui/components/panel/panel.gd" id="3_skm86"]
[sub_resource type="QuadMesh" id="QuadMesh_bu2il"] [sub_resource type="ShaderMaterial" id="ShaderMaterial_tulmb"]
resource_local_to_scene = true
render_priority = 10
shader = ExtResource("2_db5by")
shader_parameter/color = Color(1, 1, 1, 0.3)
shader_parameter/border_color = Color(1, 1, 1, 1)
shader_parameter/edge_color = Color(0, 0, 0, 1)
shader_parameter/size = Vector2(1, 1)
shader_parameter/border_size = 0.01
shader_parameter/border_fade_in = 0.05
shader_parameter/border_fade_out = 0.0
shader_parameter/corner_radius = 0.2
shader_parameter/roughness = 0.3
shader_parameter/grain_amount = 0.02
[sub_resource type="QuadMesh" id="QuadMesh_hvywi"]
size = Vector2(0.04, 0.04) size = Vector2(0.04, 0.04)
[sub_resource type="BoxShape3D" id="BoxShape3D_xwopm"] [sub_resource type="BoxShape3D" id="BoxShape3D_xwopm"]
@ -27,8 +42,8 @@ collision_mask = 0
[node name="Panel3D" type="MeshInstance3D" parent="Body"] [node name="Panel3D" type="MeshInstance3D" parent="Body"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0.005) transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0.005)
material_override = ExtResource("2_28wsr") material_override = SubResource("ShaderMaterial_tulmb")
mesh = SubResource("QuadMesh_bu2il") mesh = SubResource("QuadMesh_hvywi")
skeleton = NodePath("../..") skeleton = NodePath("../..")
script = ExtResource("3_skm86") script = ExtResource("3_skm86")
size = Vector2(0.04, 0.04) size = Vector2(0.04, 0.04)

View File

@ -5,7 +5,7 @@
[ext_resource type="FontVariation" uid="uid://d2ofyimg5s65q" path="res://assets/fonts/ui_font_500.tres" id="3_ij5fh"] [ext_resource type="FontVariation" uid="uid://d2ofyimg5s65q" path="res://assets/fonts/ui_font_500.tres" id="3_ij5fh"]
[ext_resource type="Shader" path="res://content/ui/components/panel/glass.gdshader" id="3_nl02b"] [ext_resource type="Shader" path="res://content/ui/components/panel/glass.gdshader" id="3_nl02b"]
[sub_resource type="ShaderMaterial" id="ShaderMaterial_ioqea"] [sub_resource type="ShaderMaterial" id="ShaderMaterial_exbug"]
resource_local_to_scene = true resource_local_to_scene = true
render_priority = 10 render_priority = 10
shader = ExtResource("3_nl02b") shader = ExtResource("3_nl02b")
@ -20,7 +20,7 @@ shader_parameter/corner_radius = 0.2
shader_parameter/roughness = 0.3 shader_parameter/roughness = 0.3
shader_parameter/grain_amount = 0.02 shader_parameter/grain_amount = 0.02
[sub_resource type="QuadMesh" id="QuadMesh_qgsvu"] [sub_resource type="QuadMesh" id="QuadMesh_lemta"]
size = Vector2(0.15, 0.03) size = Vector2(0.15, 0.03)
[sub_resource type="BoxShape3D" id="BoxShape3D_x4yp8"] [sub_resource type="BoxShape3D" id="BoxShape3D_x4yp8"]
@ -82,8 +82,8 @@ collision_mask = 6
[node name="Panel3D" type="MeshInstance3D" parent="Body"] [node name="Panel3D" type="MeshInstance3D" parent="Body"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0.005) transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0.005)
material_override = SubResource("ShaderMaterial_ioqea") material_override = SubResource("ShaderMaterial_exbug")
mesh = SubResource("QuadMesh_qgsvu") mesh = SubResource("QuadMesh_lemta")
script = ExtResource("3_3bvrj") script = ExtResource("3_3bvrj")
size = Vector2(0.15, 0.03) size = Vector2(0.15, 0.03)

View File

@ -1,14 +1,29 @@
[gd_scene load_steps=4 format=3 uid="uid://dnam3fe36gg62"] [gd_scene load_steps=5 format=3 uid="uid://dnam3fe36gg62"]
[ext_resource type="Script" path="res://content/ui/components/panel/panel.gd" id="1_2jq4a"] [ext_resource type="Script" path="res://content/ui/components/panel/panel.gd" id="1_2jq4a"]
[ext_resource type="Material" uid="uid://crycqex1ucj04" path="res://content/ui/components/panel/panel.material" id="1_8jj0l"] [ext_resource type="Shader" path="res://content/ui/components/panel/glass.gdshader" id="1_mpdsy"]
[sub_resource type="QuadMesh" id="QuadMesh_vflbj"] [sub_resource type="ShaderMaterial" id="ShaderMaterial_jbi6t"]
resource_local_to_scene = true
render_priority = 10
shader = ExtResource("1_mpdsy")
shader_parameter/color = Color(1, 1, 1, 0.3)
shader_parameter/border_color = Color(1, 1, 1, 1)
shader_parameter/edge_color = Color(0, 0, 0, 1)
shader_parameter/size = Vector2(1, 1)
shader_parameter/border_size = 0.01
shader_parameter/border_fade_in = 0.05
shader_parameter/border_fade_out = 0.0
shader_parameter/corner_radius = 0.04
shader_parameter/roughness = 0.3
shader_parameter/grain_amount = 0.02
[sub_resource type="QuadMesh" id="QuadMesh_vcnnc"]
size = Vector2(0.04, 0.04) size = Vector2(0.04, 0.04)
[node name="Panel" type="MeshInstance3D"] [node name="Panel" type="MeshInstance3D"]
material_override = ExtResource("1_8jj0l") material_override = SubResource("ShaderMaterial_jbi6t")
mesh = SubResource("QuadMesh_vflbj") mesh = SubResource("QuadMesh_vcnnc")
script = ExtResource("1_2jq4a") script = ExtResource("1_2jq4a")
size = Vector2(0.04, 0.04) size = Vector2(0.04, 0.04)
corner_radius = null corner_radius = null

View File

@ -16,6 +16,6 @@ func _ready():
R.effect(func(_arg): R.effect(func(_arg):
if tabs.selected.value.get_index() == i: if tabs.selected.value.get_index() == i:
add_child(child) add_child(child)
else: elif child.get_parent() == self:
remove_child(child) remove_child(child)
) )

View File

@ -3,9 +3,10 @@ extends Node3D
@onready var getting_started_button = $GettingStartedButton @onready var getting_started_button = $GettingStartedButton
@onready var close_button = $CloseButton @onready var close_button = $CloseButton
@onready var camera = $"/root/Main/XROrigin3D/XRCamera3D" @onready var camera = $"/root/Main/XROrigin3D/XRCamera3D"
var next_new_position = global_position var next_new_position = null
func _ready(): func _ready():
next_new_position = global_position
if Store.settings.is_loaded() == false: if Store.settings.is_loaded() == false:
await Store.settings.on_loaded await Store.settings.on_loaded