cleanups and refactors

This commit is contained in:
2024-04-01 00:33:38 +02:00
parent ec6facd4fc
commit 53243b368d
58 changed files with 581 additions and 539 deletions
+378
View File
@@ -0,0 +1,378 @@
[gd_scene load_steps=12 format=3 uid="uid://dh63aggy3a08x"]
[ext_resource type="Script" path="res://GameLogic.gd" id="1_0vmht"]
[ext_resource type="Environment" uid="uid://5s8lkk12bxyx" path="res://assets/default_environment.tres" id="3_8gl6a"]
[ext_resource type="Environment" uid="uid://olhmjdg33u2i" path="res://assets/camera_environment.tres" id="3_evlwd"]
[sub_resource type="FastNoiseLite" id="OpenSimplexNoise_37ngu"]
noise_type = 2
frequency = 0.0793
[sub_resource type="NoiseTexture2D" id="NoiseTexture_qxk8p"]
width = 1024
height = 1024
seamless = true
as_normal_map = true
bump_strength = 0.3
noise = SubResource("OpenSimplexNoise_37ngu")
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_2ho13"]
albedo_color = Color(0.278431, 0.266667, 0.223529, 1)
normal_enabled = true
normal_texture = SubResource("NoiseTexture_qxk8p")
[sub_resource type="PlaneMesh" id="PlaneMesh_4f4w7"]
material = SubResource("StandardMaterial3D_2ho13")
size = Vector2(42, 42)
[sub_resource type="ConcavePolygonShape3D" id="ConcavePolygonShape3D_fs1ki"]
data = PackedVector3Array(21, 0, 21, -21, 0, 21, 21, 0, -21, -21, 0, 21, -21, 0, -21, 21, 0, -21)
[sub_resource type="CylinderMesh" id="CylinderMesh_lvw42"]
top_radius = 0.2
bottom_radius = 0.2
height = 10.0
[sub_resource type="BoxMesh" id="BoxMesh_x36ey"]
size = Vector3(20, 5, 1)
[sub_resource type="ConcavePolygonShape3D" id="ConcavePolygonShape3D_cfdha"]
data = PackedVector3Array(-10, 2.5, 0.5, 10, 2.5, 0.5, -10, -2.5, 0.5, 10, 2.5, 0.5, 10, -2.5, 0.5, -10, -2.5, 0.5, 10, 2.5, -0.5, -10, 2.5, -0.5, 10, -2.5, -0.5, -10, 2.5, -0.5, -10, -2.5, -0.5, 10, -2.5, -0.5, 10, 2.5, 0.5, 10, 2.5, -0.5, 10, -2.5, 0.5, 10, 2.5, -0.5, 10, -2.5, -0.5, 10, -2.5, 0.5, -10, 2.5, -0.5, -10, 2.5, 0.5, -10, -2.5, -0.5, -10, 2.5, 0.5, -10, -2.5, 0.5, -10, -2.5, -0.5, 10, 2.5, 0.5, -10, 2.5, 0.5, 10, 2.5, -0.5, -10, 2.5, 0.5, -10, 2.5, -0.5, 10, 2.5, -0.5, -10, -2.5, 0.5, 10, -2.5, 0.5, -10, -2.5, -0.5, 10, -2.5, 0.5, 10, -2.5, -0.5, -10, -2.5, -0.5)
[node name="Node3D" type="Node3D"]
script = ExtResource("1_0vmht")
[node name="NetworkedNodes" type="Node3D" parent="."]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 2, 0)
[node name="WorldEnvironment" type="WorldEnvironment" parent="."]
environment = ExtResource("3_8gl6a")
[node name="Floor" type="MeshInstance3D" parent="."]
cast_shadow = 0
mesh = SubResource("PlaneMesh_4f4w7")
[node name="StaticBody3D" type="StaticBody3D" parent="Floor"]
[node name="@@89816" type="CollisionShape3D" parent="Floor/StaticBody3D"]
shape = SubResource("ConcavePolygonShape3D_fs1ki")
[node name="Pole" type="MeshInstance3D" parent="."]
transform = Transform3D(-0.642614, 0, -0.76619, 0, 1, 0, 0.76619, 0, -0.642614, -20, 5, -20)
mesh = SubResource("CylinderMesh_lvw42")
[node name="Camera3D" type="Camera3D" parent="Pole"]
transform = Transform3D(1, 4.47035e-08, -2.08616e-07, 0, 0.926798, 0.375561, 1.49012e-07, -0.375561, 0.926798, 0, 5, 0)
environment = ExtResource("3_evlwd")
fov = 96.3
near = 1.0
far = 300.0
[node name="MultiplayerSpawner" type="MultiplayerSpawner" parent="."]
spawn_path = NodePath("../NetworkedNodes")
[node name="DirectionalLight3D" type="DirectionalLight3D" parent="."]
transform = Transform3D(1, 0, 0, 0, -0.999, 0.0447004, 0, -0.0447004, -0.999, 0, 14.0621, -6.13505)
light_color = Color(0.878431, 0.909804, 1, 1)
shadow_enabled = true
shadow_blur = 0.1
[node name="VisibleWalls" type="Node3D" parent="."]
[node name="Wall" type="MeshInstance3D" parent="VisibleWalls"]
transform = Transform3D(2.11, 0, 0, 0, 1, 0, 0, 0, 1, -0.0145617, 2.49625, -21.0871)
cast_shadow = 0
mesh = SubResource("BoxMesh_x36ey")
skeleton = NodePath("../..")
[node name="StaticBody3D" type="StaticBody3D" parent="VisibleWalls/Wall"]
[node name="130952" type="CollisionShape3D" parent="VisibleWalls/Wall/StaticBody3D"]
shape = SubResource("ConcavePolygonShape3D_cfdha")
[node name="Wall3" type="MeshInstance3D" parent="VisibleWalls"]
transform = Transform3D(2.11, 0, 0, 0, 1, 0, 0, 0, 1, -0.0145617, 2.49625, 20.7768)
cast_shadow = 0
mesh = SubResource("BoxMesh_x36ey")
skeleton = NodePath("../..")
[node name="StaticBody3D" type="StaticBody3D" parent="VisibleWalls/Wall3"]
[node name="130952" type="CollisionShape3D" parent="VisibleWalls/Wall3/StaticBody3D"]
shape = SubResource("ConcavePolygonShape3D_cfdha")
[node name="Wall2" type="MeshInstance3D" parent="VisibleWalls"]
transform = Transform3D(0, 0, 1, 0, 1, 0, -2.128, 0, 0, -20.7124, 2.49625, -0.0979538)
cast_shadow = 0
mesh = SubResource("BoxMesh_x36ey")
skeleton = NodePath("../..")
[node name="StaticBody3D" type="StaticBody3D" parent="VisibleWalls/Wall2"]
[node name="130952" type="CollisionShape3D" parent="VisibleWalls/Wall2/StaticBody3D"]
shape = SubResource("ConcavePolygonShape3D_cfdha")
[node name="Wall4" type="MeshInstance3D" parent="VisibleWalls"]
transform = Transform3D(0, 0, 1, 0, 1, 0, -2.128, 0, 0, 20.7769, 2.49625, -0.0979538)
cast_shadow = 0
mesh = SubResource("BoxMesh_x36ey")
skeleton = NodePath("../..")
[node name="StaticBody3D" type="StaticBody3D" parent="VisibleWalls/Wall4"]
[node name="130952" type="CollisionShape3D" parent="VisibleWalls/Wall4/StaticBody3D"]
shape = SubResource("ConcavePolygonShape3D_cfdha")
[node name="InvisibleWalls" type="Node3D" parent="."]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -10.1293, -1.41031, -13.5949)
[node name="InvisWall" type="MeshInstance3D" parent="InvisibleWalls"]
layers = 2
cast_shadow = 0
mesh = SubResource("BoxMesh_x36ey")
skeleton = NodePath("../..")
[node name="StaticBody3D" type="StaticBody3D" parent="InvisibleWalls/InvisWall"]
[node name="@@130952" type="CollisionShape3D" parent="InvisibleWalls/InvisWall/StaticBody3D"]
shape = SubResource("ConcavePolygonShape3D_cfdha")
[node name="130952" type="CollisionShape3D" parent="InvisibleWalls/InvisWall/StaticBody3D"]
shape = SubResource("ConcavePolygonShape3D_cfdha")
[node name="InvisWall9" type="MeshInstance3D" parent="InvisibleWalls"]
transform = Transform3D(0.623, 0, 0, 0, 1, 0, 0, 0, 1, 21.3576, 0, 8.59735)
layers = 2
cast_shadow = 0
mesh = SubResource("BoxMesh_x36ey")
skeleton = NodePath("../..")
[node name="StaticBody3D" type="StaticBody3D" parent="InvisibleWalls/InvisWall9"]
[node name="130952" type="CollisionShape3D" parent="InvisibleWalls/InvisWall9/StaticBody3D"]
shape = SubResource("ConcavePolygonShape3D_cfdha")
[node name="@130952@57092" type="CollisionShape3D" parent="InvisibleWalls/InvisWall9/StaticBody3D"]
shape = SubResource("ConcavePolygonShape3D_cfdha")
[node name="InvisWall7" type="MeshInstance3D" parent="InvisibleWalls"]
transform = Transform3D(-4.37114e-08, 0, -1, 0, 1, 0, 1, 0, -4.37114e-08, -3.07695, 0, 17.1947)
layers = 2
cast_shadow = 0
mesh = SubResource("BoxMesh_x36ey")
skeleton = NodePath("../..")
[node name="StaticBody3D" type="StaticBody3D" parent="InvisibleWalls/InvisWall7"]
[node name="130952" type="CollisionShape3D" parent="InvisibleWalls/InvisWall7/StaticBody3D"]
shape = SubResource("ConcavePolygonShape3D_cfdha")
[node name="@130952@51822" type="CollisionShape3D" parent="InvisibleWalls/InvisWall7/StaticBody3D"]
shape = SubResource("ConcavePolygonShape3D_cfdha")
[node name="InvisWall5" type="MeshInstance3D" parent="InvisibleWalls"]
transform = Transform3D(0.515, 0, 0, 0, 1, 0, 0, 0, 1, 1.49848, 0, 27.5284)
layers = 2
cast_shadow = 0
mesh = SubResource("BoxMesh_x36ey")
skeleton = NodePath("../..")
[node name="StaticBody3D" type="StaticBody3D" parent="InvisibleWalls/InvisWall5"]
[node name="130952" type="CollisionShape3D" parent="InvisibleWalls/InvisWall5/StaticBody3D"]
shape = SubResource("ConcavePolygonShape3D_cfdha")
[node name="@130952@50040" type="CollisionShape3D" parent="InvisibleWalls/InvisWall5/StaticBody3D"]
shape = SubResource("ConcavePolygonShape3D_cfdha")
[node name="InvisWall6" type="MeshInstance3D" parent="InvisibleWalls"]
transform = Transform3D(0.128, 0, 0, 0, 1, 0, 0, 0, 1, -8.63735, 0, 27.5284)
layers = 2
cast_shadow = 0
mesh = SubResource("BoxMesh_x36ey")
skeleton = NodePath("../..")
[node name="StaticBody3D" type="StaticBody3D" parent="InvisibleWalls/InvisWall6"]
[node name="130952" type="CollisionShape3D" parent="InvisibleWalls/InvisWall6/StaticBody3D"]
shape = SubResource("ConcavePolygonShape3D_cfdha")
[node name="13095250040" type="CollisionShape3D" parent="InvisibleWalls/InvisWall6/StaticBody3D"]
shape = SubResource("ConcavePolygonShape3D_cfdha")
[node name="InvisWall8" type="MeshInstance3D" parent="InvisibleWalls"]
transform = Transform3D(0.232, 0, 0, 0, 1, 0, 0, 0, 1, 9.46234, 0, 27.5284)
layers = 2
cast_shadow = 0
mesh = SubResource("BoxMesh_x36ey")
skeleton = NodePath("../..")
[node name="StaticBody3D" type="StaticBody3D" parent="InvisibleWalls/InvisWall8"]
[node name="130952" type="CollisionShape3D" parent="InvisibleWalls/InvisWall8/StaticBody3D"]
shape = SubResource("ConcavePolygonShape3D_cfdha")
[node name="13095250040" type="CollisionShape3D" parent="InvisibleWalls/InvisWall8/StaticBody3D"]
shape = SubResource("ConcavePolygonShape3D_cfdha")
[node name="InvisWall11" type="MeshInstance3D" parent="InvisibleWalls"]
transform = Transform3D(0.232, 0, 0, 0, 1, 0, 0, 0, 1, 14.6208, 0, 12.6866)
layers = 2
cast_shadow = 0
mesh = SubResource("BoxMesh_x36ey")
skeleton = NodePath("../..")
[node name="StaticBody3D" type="StaticBody3D" parent="InvisibleWalls/InvisWall11"]
[node name="130952" type="CollisionShape3D" parent="InvisibleWalls/InvisWall11/StaticBody3D"]
shape = SubResource("ConcavePolygonShape3D_cfdha")
[node name="13095250040" type="CollisionShape3D" parent="InvisibleWalls/InvisWall11/StaticBody3D"]
shape = SubResource("ConcavePolygonShape3D_cfdha")
[node name="InvisWall12" type="MeshInstance3D" parent="InvisibleWalls"]
transform = Transform3D(0.232, 0, 0, 0, 1, 0, 0, 0, 1, 18.8742, 0, 16.3971)
layers = 2
cast_shadow = 0
mesh = SubResource("BoxMesh_x36ey")
skeleton = NodePath("../..")
[node name="StaticBody3D" type="StaticBody3D" parent="InvisibleWalls/InvisWall12"]
[node name="130952" type="CollisionShape3D" parent="InvisibleWalls/InvisWall12/StaticBody3D"]
shape = SubResource("ConcavePolygonShape3D_cfdha")
[node name="13095250040" type="CollisionShape3D" parent="InvisibleWalls/InvisWall12/StaticBody3D"]
shape = SubResource("ConcavePolygonShape3D_cfdha")
[node name="InvisWall17" type="MeshInstance3D" parent="InvisibleWalls"]
transform = Transform3D(0.232, 0, 0, 0, 1, 0, 0, 0, 1, 28.648, 0, 12.3246)
layers = 2
cast_shadow = 0
mesh = SubResource("BoxMesh_x36ey")
skeleton = NodePath("../..")
[node name="StaticBody3D" type="StaticBody3D" parent="InvisibleWalls/InvisWall17"]
[node name="130952" type="CollisionShape3D" parent="InvisibleWalls/InvisWall17/StaticBody3D"]
shape = SubResource("ConcavePolygonShape3D_cfdha")
[node name="13095250040" type="CollisionShape3D" parent="InvisibleWalls/InvisWall17/StaticBody3D"]
shape = SubResource("ConcavePolygonShape3D_cfdha")
[node name="InvisWall13" type="MeshInstance3D" parent="InvisibleWalls"]
transform = Transform3D(0.232, 0, 0, 0, 1, 0, 0, 0, 1, 14.6208, 0, 20.1075)
layers = 2
cast_shadow = 0
mesh = SubResource("BoxMesh_x36ey")
skeleton = NodePath("../..")
[node name="StaticBody3D" type="StaticBody3D" parent="InvisibleWalls/InvisWall13"]
[node name="130952" type="CollisionShape3D" parent="InvisibleWalls/InvisWall13/StaticBody3D"]
shape = SubResource("ConcavePolygonShape3D_cfdha")
[node name="13095250040" type="CollisionShape3D" parent="InvisibleWalls/InvisWall13/StaticBody3D"]
shape = SubResource("ConcavePolygonShape3D_cfdha")
[node name="InvisWall14" type="MeshInstance3D" parent="InvisibleWalls"]
transform = Transform3D(0.232, 0, 0, 0, 1, 0, 0, 0, 1, 19.2362, 0, 23.0035)
layers = 2
cast_shadow = 0
mesh = SubResource("BoxMesh_x36ey")
skeleton = NodePath("../..")
[node name="StaticBody3D" type="StaticBody3D" parent="InvisibleWalls/InvisWall14"]
[node name="130952" type="CollisionShape3D" parent="InvisibleWalls/InvisWall14/StaticBody3D"]
shape = SubResource("ConcavePolygonShape3D_cfdha")
[node name="13095250040" type="CollisionShape3D" parent="InvisibleWalls/InvisWall14/StaticBody3D"]
shape = SubResource("ConcavePolygonShape3D_cfdha")
[node name="InvisWall15" type="MeshInstance3D" parent="InvisibleWalls"]
transform = Transform3D(0.232, 0, 0, 0, 1, 0, 0, 0, 1, 14.8018, 0, 26.0804)
layers = 2
cast_shadow = 0
mesh = SubResource("BoxMesh_x36ey")
skeleton = NodePath("../..")
[node name="StaticBody3D" type="StaticBody3D" parent="InvisibleWalls/InvisWall15"]
[node name="130952" type="CollisionShape3D" parent="InvisibleWalls/InvisWall15/StaticBody3D"]
shape = SubResource("ConcavePolygonShape3D_cfdha")
[node name="13095250040" type="CollisionShape3D" parent="InvisibleWalls/InvisWall15/StaticBody3D"]
shape = SubResource("ConcavePolygonShape3D_cfdha")
[node name="InvisWall16" type="MeshInstance3D" parent="InvisibleWalls"]
transform = Transform3D(0.521, 0, 0, 0, 1, 0, 0, 0, 1, 16.9737, 0, 30.4398)
layers = 2
cast_shadow = 0
mesh = SubResource("BoxMesh_x36ey")
skeleton = NodePath("../..")
[node name="StaticBody3D" type="StaticBody3D" parent="InvisibleWalls/InvisWall16"]
[node name="130952" type="CollisionShape3D" parent="InvisibleWalls/InvisWall16/StaticBody3D"]
shape = SubResource("ConcavePolygonShape3D_cfdha")
[node name="13095250040" type="CollisionShape3D" parent="InvisibleWalls/InvisWall16/StaticBody3D"]
shape = SubResource("ConcavePolygonShape3D_cfdha")
[node name="InvisWall2" type="MeshInstance3D" parent="InvisibleWalls"]
transform = Transform3D(1.205, 0, 0, 0, 1, 0, 0, 0, 1, 19.1994, 0, 4.6047)
layers = 2
cast_shadow = 0
mesh = SubResource("BoxMesh_x36ey")
skeleton = NodePath("../..")
[node name="StaticBody3D" type="StaticBody3D" parent="InvisibleWalls/InvisWall2"]
[node name="130952" type="CollisionShape3D" parent="InvisibleWalls/InvisWall2/StaticBody3D"]
shape = SubResource("ConcavePolygonShape3D_cfdha")
[node name="InvisWall3" type="MeshInstance3D" parent="InvisibleWalls"]
transform = Transform3D(-5.23225e-08, 0, -1, 0, 1, 0, 1.197, 0, -4.37114e-08, 6.74318, 0, 16.0151)
layers = 2
cast_shadow = 0
mesh = SubResource("BoxMesh_x36ey")
skeleton = NodePath("../..")
[node name="StaticBody3D" type="StaticBody3D" parent="InvisibleWalls/InvisWall3"]
[node name="130952" type="CollisionShape3D" parent="InvisibleWalls/InvisWall3/StaticBody3D"]
shape = SubResource("ConcavePolygonShape3D_cfdha")
[node name="InvisWall4" type="MeshInstance3D" parent="InvisibleWalls"]
transform = Transform3D(0, 0, -1, 0, 1, 0, 1.115, 0, 0, 11.8942, 0, 19.7792)
layers = 2
cast_shadow = 0
mesh = SubResource("BoxMesh_x36ey")
skeleton = NodePath("../..")
[node name="StaticBody3D" type="StaticBody3D" parent="InvisibleWalls/InvisWall4"]
[node name="130952" type="CollisionShape3D" parent="InvisibleWalls/InvisWall4/StaticBody3D"]
shape = SubResource("ConcavePolygonShape3D_cfdha")
[node name="InvisWall10" type="MeshInstance3D" parent="InvisibleWalls"]
transform = Transform3D(0, 0, -1, 0, 1, 0, 1.073, 0, 0, 21.6681, 0, 19.5024)
layers = 2
cast_shadow = 0
mesh = SubResource("BoxMesh_x36ey")
skeleton = NodePath("../..")
[node name="StaticBody3D" type="StaticBody3D" parent="InvisibleWalls/InvisWall10"]
[node name="130952" type="CollisionShape3D" parent="InvisibleWalls/InvisWall10/StaticBody3D"]
shape = SubResource("ConcavePolygonShape3D_cfdha")
[node name="SpotLight3D2" type="SpotLight3D" parent="."]
transform = Transform3D(1, 0, 0, 0, -4.37114e-08, 1, 0, -1, -4.37114e-08, -19.3273, 10.7166, -19.2999)
light_color = Color(1, 0.945098, 0.823529, 1)
light_energy = 3.0
spot_range = 18.4
spot_attenuation = 1.46409
spot_angle = 50.6
spot_angle_attenuation = 2.0