From e1154abead2566d5bf6c471e992b87119740a101 Mon Sep 17 00:00:00 2001 From: HumanoidSandvichDispenser Date: Sat, 5 Oct 2024 15:37:40 -0700 Subject: [PATCH] Fix broken WorldEnvironment for maps --- Items/Weapons/Pugio.tscn | 10 +--------- Items/Weapons/Sword.tscn | 10 +--------- Scenes/Maps/Arena.tscn | 6 +++++- Scenes/Maps/ArenaEnvironment.tres | 16 ++++++++++++++++ Scenes/Maps/ArenaExterior.tscn | 20 +++---------------- Scenes/Maps/ForestNew.tscn | 32 ++++++++++++++++++++----------- 6 files changed, 47 insertions(+), 47 deletions(-) create mode 100644 Scenes/Maps/ArenaEnvironment.tres diff --git a/Items/Weapons/Pugio.tscn b/Items/Weapons/Pugio.tscn index 542904c..b82c959 100644 --- a/Items/Weapons/Pugio.tscn +++ b/Items/Weapons/Pugio.tscn @@ -1,4 +1,4 @@ -[gd_scene load_steps=30 format=3 uid="uid://5y1acxl4j4n7"] +[gd_scene load_steps=29 format=3 uid="uid://5y1acxl4j4n7"] [ext_resource type="Script" path="res://Items/Weapons/Sword.cs" id="1_mai31"] [ext_resource type="Script" path="res://State/Weapon/WeaponStateMachine.cs" id="2_5ramr"] @@ -19,11 +19,6 @@ [ext_resource type="AudioStream" uid="uid://qvthq6tppp63" path="res://Assets/Sounds/whoosh.wav" id="12_a8o3x"] [ext_resource type="AudioStream" uid="uid://c4n7ioxpukdwi" path="res://Assets/Sounds/parry.wav" id="13_t5wmj"] -[sub_resource type="Environment" id="Environment_72txp"] -background_mode = 3 -glow_enabled = true -glow_hdr_threshold = 1.42 - [sub_resource type="Animation" id="Animation_b7327"] length = 0.001 tracks/0/type = "value" @@ -382,9 +377,6 @@ IdleState = NodePath("../Idle") UseState = NodePath("../Anticipate") BlockAnimKey = "block" -[node name="WorldEnvironment" type="WorldEnvironment" parent="."] -environment = SubResource("Environment_72txp") - [node name="Anchor" type="Node2D" parent="."] y_sort_enabled = true rotation = 3.14159 diff --git a/Items/Weapons/Sword.tscn b/Items/Weapons/Sword.tscn index 0af9b1c..97397aa 100644 --- a/Items/Weapons/Sword.tscn +++ b/Items/Weapons/Sword.tscn @@ -1,4 +1,4 @@ -[gd_scene load_steps=26 format=3 uid="uid://dvqap2uhcah63"] +[gd_scene load_steps=25 format=3 uid="uid://dvqap2uhcah63"] [ext_resource type="Script" path="res://Items/Weapons/Sword.cs" id="1_mlo73"] [ext_resource type="Resource" uid="uid://cl7jvdu2lnv2d" path="res://Items/Weapons/Sword.tres" id="2_atd4f"] @@ -16,11 +16,6 @@ [ext_resource type="Texture2D" uid="uid://cmvh6pc71ir1m" path="res://Assets/Sprites/sword-swing-large.png" id="10_672jv"] [ext_resource type="AudioStream" uid="uid://qvthq6tppp63" path="res://Assets/Sounds/whoosh.wav" id="10_mfnl7"] -[sub_resource type="Environment" id="Environment_72txp"] -background_mode = 3 -glow_enabled = true -glow_hdr_threshold = 1.42 - [sub_resource type="Curve" id="Curve_4cxtp"] _data = [Vector2(0.00687286, 1), 0.0, 0.0, 0, 0, Vector2(0.879725, 0.190909), -2.93145, -2.93145, 0, 0, Vector2(1, 0.0454545), 0.0483926, 0.0, 0, 0] point_count = 3 @@ -380,9 +375,6 @@ script = ExtResource("5_hmisb") Sword = NodePath("../..") IdleState = NodePath("../Idle") -[node name="WorldEnvironment" type="WorldEnvironment" parent="."] -environment = SubResource("Environment_72txp") - [node name="Anchor" type="Node2D" parent="."] y_sort_enabled = true rotation = -1.5708 diff --git a/Scenes/Maps/Arena.tscn b/Scenes/Maps/Arena.tscn index 284e6e3..0b20a90 100644 --- a/Scenes/Maps/Arena.tscn +++ b/Scenes/Maps/Arena.tscn @@ -1,4 +1,4 @@ -[gd_scene load_steps=49 format=4 uid="uid://b2x17su05ou5w"] +[gd_scene load_steps=50 format=4 uid="uid://b2x17su05ou5w"] [ext_resource type="PackedScene" uid="uid://clwv2owvk6abe" path="res://Scenes/BaseMap.tscn" id="1_ifiic"] [ext_resource type="TileSet" uid="uid://l61kbx31ug4p" path="res://Scenes/Maps/ArenaTileset.tres" id="2_x0mh7"] @@ -17,6 +17,7 @@ [ext_resource type="Script" path="res://addons/phantom_camera/scripts/phantom_camera/phantom_camera_2d.gd" id="11_q01ik"] [ext_resource type="Texture2D" uid="uid://c1a7lvb4uuwfy" path="res://Assets/Sprites/Particles/circle-16.png" id="11_yjp7m"] [ext_resource type="Script" path="res://addons/phantom_camera/scripts/resources/tween_resource.gd" id="12_ca3oh"] +[ext_resource type="Environment" uid="uid://bl15544uvuppq" path="res://Scenes/Maps/ArenaEnvironment.tres" id="18_m6btu"] [sub_resource type="AtlasTexture" id="AtlasTexture_7aiot"] atlas = ExtResource("5_5ley7") @@ -409,6 +410,9 @@ visible = false [node name="Entrance" type="Marker2D" parent="Markers" index="0"] position = Vector2(0, 352) +[node name="WorldEnvironment" parent="." index="7"] +environment = ExtResource("18_m6btu") + [node name="CanvasLayer" type="CanvasLayer" parent="." index="8"] layer = -99 diff --git a/Scenes/Maps/ArenaEnvironment.tres b/Scenes/Maps/ArenaEnvironment.tres new file mode 100644 index 0000000..2f84a66 --- /dev/null +++ b/Scenes/Maps/ArenaEnvironment.tres @@ -0,0 +1,16 @@ +[gd_resource type="Environment" load_steps=3 format=3 uid="uid://bl15544uvuppq"] + +[sub_resource type="Gradient" id="Gradient_u5tnr"] +offsets = PackedFloat32Array(0, 0.933649, 1) +colors = PackedColorArray(0, 0, 0, 1, 0.938186, 0.874428, 0.818076, 1, 1, 1, 1, 1) + +[sub_resource type="GradientTexture1D" id="GradientTexture1D_ri0vy"] +gradient = SubResource("Gradient_u5tnr") + +[resource] +background_mode = 3 +glow_enabled = true +glow_intensity = 4.0 +adjustment_enabled = true +adjustment_saturation = 0.75 +adjustment_color_correction = SubResource("GradientTexture1D_ri0vy") diff --git a/Scenes/Maps/ArenaExterior.tscn b/Scenes/Maps/ArenaExterior.tscn index 6c7b270..96298bc 100644 --- a/Scenes/Maps/ArenaExterior.tscn +++ b/Scenes/Maps/ArenaExterior.tscn @@ -1,4 +1,4 @@ -[gd_scene load_steps=96 format=4 uid="uid://dr3bcvql7burk"] +[gd_scene load_steps=94 format=4 uid="uid://dr3bcvql7burk"] [ext_resource type="PackedScene" uid="uid://clwv2owvk6abe" path="res://Scenes/BaseMap.tscn" id="1_ci4ij"] [ext_resource type="TileSet" uid="uid://l61kbx31ug4p" path="res://Scenes/Maps/ArenaTileset.tres" id="2_m6h7j"] @@ -42,6 +42,7 @@ [ext_resource type="Script" path="res://addons/phantom_camera/scripts/phantom_camera/phantom_camera_2d.gd" id="39_48cwk"] [ext_resource type="Script" path="res://BoundingBoxes/CameraTrigger.cs" id="39_50gr5"] [ext_resource type="Script" path="res://addons/phantom_camera/scripts/resources/tween_resource.gd" id="40_h1ykh"] +[ext_resource type="Environment" uid="uid://bl15544uvuppq" path="res://Scenes/Maps/ArenaEnvironment.tres" id="44_kuply"] [ext_resource type="Script" path="res://BoundingBoxes/OcclusionTrigger.cs" id="44_oj3d3"] [sub_resource type="Gradient" id="Gradient_jupxw"] @@ -363,21 +364,6 @@ agent_radius = 8.0 [sub_resource type="RectangleShape2D" id="RectangleShape2D_te7jt"] size = Vector2(112, 64) -[sub_resource type="Gradient" id="Gradient_u5tnr"] -offsets = PackedFloat32Array(0.455224, 1) - -[sub_resource type="GradientTexture1D" id="GradientTexture1D_ri0vy"] -gradient = SubResource("Gradient_u5tnr") - -[sub_resource type="Environment" id="Environment_6j53s"] -background_mode = 3 -tonemap_mode = 3 -glow_enabled = true -glow_intensity = 4.0 -adjustment_enabled = true -adjustment_saturation = 0.01 -adjustment_color_correction = SubResource("GradientTexture1D_ri0vy") - [sub_resource type="Gradient" id="Gradient_yn44d"] offsets = PackedFloat32Array(0) colors = PackedColorArray(0.105882, 0.0470588, 0.117647, 1) @@ -1134,7 +1120,7 @@ shape = SubResource("RectangleShape2D_te7jt") position = Vector2(576, 431) [node name="WorldEnvironment" parent="." index="7"] -environment = SubResource("Environment_6j53s") +environment = ExtResource("44_kuply") [node name="CanvasLayer" type="CanvasLayer" parent="." index="8"] layer = -99 diff --git a/Scenes/Maps/ForestNew.tscn b/Scenes/Maps/ForestNew.tscn index 53dc15a..b3507cb 100644 --- a/Scenes/Maps/ForestNew.tscn +++ b/Scenes/Maps/ForestNew.tscn @@ -1,4 +1,4 @@ -[gd_scene load_steps=17 format=4 uid="uid://cumi1cbg6xfdd"] +[gd_scene load_steps=20 format=4 uid="uid://cumi1cbg6xfdd"] [ext_resource type="PackedScene" uid="uid://clwv2owvk6abe" path="res://Scenes/BaseMap.tscn" id="1_oy3cp"] [ext_resource type="TileSet" uid="uid://dkis3rb4n62cu" path="res://Scenes/Maps/ForestTileset.tres" id="2_q0kvn"] @@ -41,11 +41,22 @@ source_geometry_group_name = &"navigation" cell_size = 16.0 agent_radius = 8.0 -[node name="TileMap" node_paths=PackedStringArray("Entities", "Areas", "Spawners", "Markers") groups=["navigation"] instance=ExtResource("1_oy3cp")] -Entities = NodePath("Entities") -Areas = NodePath("Areas") -Spawners = NodePath("Spawners") -Markers = NodePath("Markers") +[sub_resource type="Gradient" id="Gradient_pc2cc"] +offsets = PackedFloat32Array(0, 0.962085, 1) +colors = PackedColorArray(0, 0, 0, 1, 1, 0.911833, 0.77, 1, 1, 1, 1, 1) + +[sub_resource type="GradientTexture1D" id="GradientTexture1D_s5jwl"] +gradient = SubResource("Gradient_pc2cc") + +[sub_resource type="Environment" id="Environment_usobl"] +background_mode = 3 +glow_enabled = true +glow_hdr_threshold = 1.2 +adjustment_enabled = true +adjustment_saturation = 0.7 +adjustment_color_correction = SubResource("GradientTexture1D_s5jwl") + +[node name="TileMap" groups=["navigation"] instance=ExtResource("1_oy3cp")] AreaName = "Forest" MapName = "Forest" @@ -441,12 +452,8 @@ position = Vector2(1272, 0) [node name="Campfire" parent="Entities" index="0" instance=ExtResource("3_ve4i2")] position = Vector2(-24, -8) -[node name="SnusDealer" parent="Entities" index="1" node_paths=PackedStringArray("ThinkerStateMachine", "Sprite", "Inventory", "StateMachine") instance=ExtResource("12_eyny2")] +[node name="SnusDealer" parent="Entities" index="1" instance=ExtResource("12_eyny2")] position = Vector2(79, -6) -ThinkerStateMachine = NodePath("Thinker") -Sprite = NodePath("Sprites/Sprite") -Inventory = NodePath("Inventory") -StateMachine = NodePath("StateMachine") [node name="Areas" parent="." index="4"] visible = false @@ -456,3 +463,6 @@ navigation_polygon = SubResource("NavigationPolygon_al0u7") [node name="House" type="NavigationRegion2D" parent="Areas" index="1"] navigation_polygon = SubResource("NavigationPolygon_8xwo5") + +[node name="WorldEnvironment" parent="." index="7"] +environment = SubResource("Environment_usobl")