From f844ca7f8cf9bb87fa27e0c7be5b2396c5e4552e Mon Sep 17 00:00:00 2001 From: Nathan Chapman Date: Sun, 1 Jun 2025 08:49:10 -0600 Subject: [PATCH] Finish equipping shields and weapons --- src/scenes/characters/enemy.tscn | 71 +++++++++++++++--------------- src/scenes/characters/rig.tscn | 75 +++++++++++++++----------------- src/scenes/levels/level.tscn | 27 ++++++------ src/scripts/ui/inventory.gd | 9 ++++ 4 files changed, 95 insertions(+), 87 deletions(-) diff --git a/src/scenes/characters/enemy.tscn b/src/scenes/characters/enemy.tscn index a686081..afb7ca6 100644 --- a/src/scenes/characters/enemy.tscn +++ b/src/scenes/characters/enemy.tscn @@ -1,4 +1,4 @@ -[gd_scene load_steps=10 format=3 uid="uid://cwvrti8hmxj0k"] +[gd_scene load_steps=11 format=3 uid="uid://cwvrti8hmxj0k"] [ext_resource type="Script" uid="uid://p38hhb8jwgor" path="res://src/scripts/characters/enemy.gd" id="1_jr6vw"] [ext_resource type="PackedScene" uid="uid://c7ahf78h5s3kx" path="res://assets/models/character/gear/tall_shield.glb" id="2_fwei0"] @@ -6,6 +6,7 @@ [ext_resource type="PackedScene" uid="uid://csdumqcs3kutf" path="res://assets/models/character/gear/short_shield.glb" id="3_aygwl"] [ext_resource type="PackedScene" uid="uid://bo62qyfwylypa" path="res://src/scenes/characters/area_attack.tscn" id="3_ljmr7"] [ext_resource type="PackedScene" uid="uid://dw8f5oy13cdtx" path="res://src/scenes/characters/health_component.tscn" id="3_r8u7w"] +[ext_resource type="PackedScene" uid="uid://dh2cs460xvwjp" path="res://assets/models/character/gear/broken_sword.glb" id="6_aygwl"] [sub_resource type="CapsuleShape3D" id="CapsuleShape3D_r8u7w"] @@ -35,37 +36,37 @@ shape = SubResource("CapsuleShape3D_r8u7w") transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, -1, 0) [node name="Skeleton3D" parent="Rig/CharacterRig/GameRig" index="0"] -bones/0/position = Vector3(1.40206e-14, 0.90176, -0.0481735) -bones/2/rotation = Quaternion(0.0011868, -0.000366997, 0.0032136, 0.999994) -bones/3/rotation = Quaternion(-0.0937346, -0.000344235, 0.00852184, 0.995561) -bones/4/rotation = Quaternion(0.274604, 1.46355e-08, 9.28348e-08, 0.961558) -bones/6/rotation = Quaternion(-0.159266, -1.17636e-07, -1.93005e-08, 0.987236) -bones/7/position = Vector3(-3.82952e-08, 0.901759, -0.0481735) -bones/8/position = Vector3(-6.97086e-08, 0.901759, -0.0481735) -bones/9/position = Vector3(0.131144, 0.967964, -0.0351291) -bones/9/rotation = Quaternion(0.993431, 0.0206683, -0.0310457, 0.108181) -bones/11/rotation = Quaternion(0.412523, -0.000699498, 0.000316914, 0.910947) -bones/13/rotation = Quaternion(-0.748268, 0.0118733, 0.024389, 0.662842) -bones/15/position = Vector3(-0.131144, 0.967964, -0.0351291) -bones/15/rotation = Quaternion(0.974038, -0.00562268, 0.0274329, 0.224644) -bones/17/rotation = Quaternion(0.437087, 0.00324925, -0.00157933, 0.899412) -bones/19/rotation = Quaternion(-0.685055, -0.0281759, -0.000958456, 0.727946) -bones/21/position = Vector3(0.0251286, 1.43174, 0.0441303) -bones/21/rotation = Quaternion(-0.484887, -0.261474, -0.4062, 0.729052) -bones/22/position = Vector3(0.189621, 1.46938, -0.0188074) -bones/22/rotation = Quaternion(0.0394837, -0.161279, 0.974917, -0.148212) -bones/23/rotation = Quaternion(7.99183e-08, -0.0243984, 5.0198e-08, 0.999702) -bones/24/rotation = Quaternion(0.318314, -0.024412, -0.0197153, 0.947466) -bones/46/position = Vector3(-0.0113635, 1.43174, 0.0441303) -bones/46/rotation = Quaternion(-0.497034, 0.236242, 0.389182, 0.738705) -bones/47/position = Vector3(-0.171093, 1.46991, -0.029743) -bones/47/rotation = Quaternion(-0.0524934, -0.140746, 0.974701, 0.16551) -bones/48/rotation = Quaternion(5.08087e-08, 0.029026, 4.47243e-08, 0.999579) -bones/49/rotation = Quaternion(0.354079, 0.0290274, 0.0289192, 0.934318) -bones/71/position = Vector3(0.127191, 1.35109, -0.025674) -bones/71/rotation = Quaternion(1.9673e-08, 0.60773, 0.794143, -4.62182e-08) -bones/72/position = Vector3(-0.113426, 1.35109, -0.025674) -bones/72/rotation = Quaternion(1.9673e-08, 0.60773, 0.794143, -4.62182e-08) +bones/0/position = Vector3(4.44089e-15, 0.910953, -0.0481736) +bones/2/rotation = Quaternion(0.00715016, -0.000270345, 0.00321101, 0.999969) +bones/3/rotation = Quaternion(-0.0883515, -0.000274197, 0.00852491, 0.996053) +bones/4/rotation = Quaternion(0.269789, 1.43987e-08, 9.16453e-08, 0.96292) +bones/6/rotation = Quaternion(-0.165313, -1.17569e-07, -1.97069e-08, 0.986241) +bones/7/position = Vector3(-3.02053e-08, 0.910953, -0.0481735) +bones/8/position = Vector3(-5.54676e-08, 0.910953, -0.0481735) +bones/9/position = Vector3(0.131144, 0.977157, -0.0351291) +bones/9/rotation = Quaternion(0.994319, 0.0202095, -0.0312668, 0.0997189) +bones/11/rotation = Quaternion(0.393204, -0.000694492, 0.000297126, 0.919451) +bones/13/rotation = Quaternion(-0.74009, 0.011843, 0.024358, 0.671962) +bones/15/position = Vector3(-0.131144, 0.977157, -0.0351291) +bones/15/rotation = Quaternion(0.975987, -0.00524444, 0.0276951, 0.215996) +bones/17/rotation = Quaternion(0.41958, 0.00314561, -0.00145412, 0.907712) +bones/19/rotation = Quaternion(-0.677426, -0.0281345, -0.00149649, 0.735051) +bones/21/position = Vector3(0.0251286, 1.44036, 0.0474137) +bones/21/rotation = Quaternion(-0.46932, -0.267709, -0.417628, 0.730519) +bones/22/position = Vector3(0.191593, 1.4794, -0.00923866) +bones/22/rotation = Quaternion(0.0197668, -0.164243, 0.975516, -0.144921) +bones/23/rotation = Quaternion(7.1093e-08, -0.0403403, 2.07269e-08, 0.999186) +bones/24/rotation = Quaternion(0.354444, -0.0404196, -0.0221276, 0.933941) +bones/46/position = Vector3(-0.0113635, 1.44036, 0.0474137) +bones/46/rotation = Quaternion(-0.468803, 0.266677, 0.417532, 0.731282) +bones/47/position = Vector3(-0.177709, 1.47954, -0.00948774) +bones/47/rotation = Quaternion(-0.00744272, -0.148237, 0.976085, 0.158837) +bones/48/rotation = Quaternion(-1.46507e-07, 0.0591718, -1.3974e-07, 0.998248) +bones/49/rotation = Quaternion(0.39551, 0.0593204, 0.0277605, 0.916124) +bones/71/position = Vector3(0.127191, 1.3616, -0.0243553) +bones/71/rotation = Quaternion(2.03481e-08, 0.597841, 0.801615, -4.58317e-08) +bones/72/position = Vector3(-0.113426, 1.3616, -0.0243553) +bones/72/rotation = Quaternion(2.03481e-08, 0.597841, 0.801615, -4.58316e-08) [node name="Knight_02" parent="Rig/CharacterRig/GameRig/Skeleton3D" index="1"] visible = false @@ -74,10 +75,12 @@ visible = false visible = true [node name="RightHandBone" parent="Rig" index="2"] -transform = Transform3D(-0.962334, -0.270836, -0.0236807, 0.234346, -0.870518, 0.432759, -0.137821, 0.410909, 0.901199, -0.344918, 0.993298, -0.00762536) +transform = Transform3D(-0.962406, -0.270594, -0.023532, 0.220109, -0.827734, 0.516149, -0.159145, 0.491565, 0.856175, -0.351473, 1.01394, 0.0326189) + +[node name="broken_sword" parent="Rig/RightHandBone/WeaponSlot" index="0" instance=ExtResource("6_aygwl")] [node name="LeftHandBone" parent="Rig" index="3"] -transform = Transform3D(-0.970516, 0.239103, 0.0304961, -0.217247, -0.922497, 0.319068, 0.104423, 0.303035, 0.947241, 0.34643, 0.979218, -0.0333129) +transform = Transform3D(-0.970516, 0.239097, 0.0305111, -0.208084, -0.894985, 0.394591, 0.121653, 0.376608, 0.91835, 0.348401, 0.996406, -0.00542178) [node name="PlayerDetectorAttack" type="ShapeCast3D" parent="Rig"] transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 1) diff --git a/src/scenes/characters/rig.tscn b/src/scenes/characters/rig.tscn index cd8dcfc..40d2d2b 100644 --- a/src/scenes/characters/rig.tscn +++ b/src/scenes/characters/rig.tscn @@ -1,9 +1,7 @@ -[gd_scene load_steps=22 format=3 uid="uid://ckwydalda0teo"] +[gd_scene load_steps=20 format=3 uid="uid://ckwydalda0teo"] [ext_resource type="Script" uid="uid://ckjbqjere1jpf" path="res://src/scripts/characters/rig.gd" id="1_n80wy"] [ext_resource type="PackedScene" uid="uid://xivf38sp0l78" path="res://assets/models/character/character_rig.glb" id="2_ow4sk"] -[ext_resource type="PackedScene" uid="uid://bnkhiay2id2kl" path="res://assets/models/character/gear/longsword.glb" id="3_dka8l"] -[ext_resource type="PackedScene" uid="uid://c7ahf78h5s3kx" path="res://assets/models/character/gear/tall_shield.glb" id="4_i4vhj"] [sub_resource type="AnimationNodeAnimation" id="AnimationNodeAnimation_isuva"] animation = &"Dash" @@ -83,53 +81,53 @@ script = ExtResource("1_n80wy") [node name="CharacterRig" parent="." instance=ExtResource("2_ow4sk")] [node name="Skeleton3D" parent="CharacterRig/GameRig" index="0"] -bones/0/position = Vector3(4.44089e-15, 0.911233, -0.0481736) +bones/0/position = Vector3(3.37508e-15, 0.892508, -0.0481736) bones/0/rotation = Quaternion(0.12582, 1.18262e-07, 1.49989e-08, 0.992053) bones/1/rotation = Quaternion(-0.0566577, -0.00072973, -0.0117082, 0.998325) bones/2/position = Vector3(3.20474e-09, 0.146689, -1.95578e-08) -bones/2/rotation = Quaternion(0.00731323, -0.000267702, 0.00321092, 0.999968) +bones/2/rotation = Quaternion(-0.00410794, -0.000452809, 0.00321553, 0.999986) bones/3/position = Vector3(-2.01263e-09, 0.202058, -2.51457e-08) -bones/3/rotation = Quaternion(-0.0881702, -0.000271837, 0.00852504, 0.996069) +bones/3/rotation = Quaternion(-0.0990228, -0.000412976, 0.00851834, 0.995049) bones/4/position = Vector3(3.02934e-10, 0.0925562, 3.91155e-08) -bones/4/rotation = Quaternion(0.269551, 1.43871e-08, 9.15867e-08, 0.962986) +bones/4/rotation = Quaternion(0.2786, 1.44138e-08, 9.52674e-08, 0.960407) bones/5/rotation = Quaternion(-0.0948564, -2.80691e-14, -2.26155e-08, 0.995491) -bones/6/rotation = Quaternion(-0.165611, -1.17563e-07, -1.97424e-08, 0.986191) -bones/7/position = Vector3(-4.38519e-08, 0.911233, -0.0481734) +bones/6/rotation = Quaternion(-0.153933, -1.1762e-07, -1.94217e-08, 0.988081) +bones/7/position = Vector3(-2.81172e-08, 0.892507, -0.0481735) bones/7/rotation = Quaternion(-0.0863677, -0.751104, -0.383052, 0.530711) -bones/8/position = Vector3(-3.68681e-08, 0.911233, -0.0481735) +bones/8/position = Vector3(-5.62248e-08, 0.892507, -0.0481735) bones/8/rotation = Quaternion(-0.0863677, 0.751104, 0.383052, 0.530711) -bones/9/position = Vector3(0.131144, 0.977437, -0.0351291) -bones/9/rotation = Quaternion(0.994353, 0.0201915, -0.0312755, 0.0993843) +bones/9/position = Vector3(0.131144, 0.958712, -0.0351291) +bones/9/rotation = Quaternion(0.992536, 0.0211118, -0.0308373, 0.116081) bones/10/position = Vector3(-2.36129e-08, 0.26601, -2.14789e-08) bones/10/rotation = Quaternion(-3.13921e-08, -0.000695086, 1.20449e-08, 1) bones/11/position = Vector3(-4.6306e-08, 0.26601, 2.42145e-08) -bones/11/rotation = Quaternion(0.392666, -0.000694321, 0.000296553, 0.919681) +bones/11/rotation = Quaternion(0.430903, -0.000700591, 0.000334683, 0.902398) bones/12/position = Vector3(3.05151e-08, 0.22603, 5.03768e-08) bones/12/rotation = Quaternion(-8.19226e-09, -0.00710644, 4.16102e-08, 0.999975) bones/13/position = Vector3(-2.95495e-08, 0.22603, 2.68392e-09) -bones/13/rotation = Quaternion(-0.739767, 0.0118418, 0.0243569, 0.672317) +bones/13/rotation = Quaternion(-0.756224, 0.0119025, 0.0244295, 0.653749) bones/14/position = Vector3(-3.05481e-08, 0.139877, 1.64787e-08) bones/14/rotation = Quaternion(-9.66743e-05, 0.967474, -0.252972, -0.000383447) -bones/15/position = Vector3(-0.131144, 0.977437, -0.0351291) -bones/15/rotation = Quaternion(0.976047, -0.00523272, 0.0277032, 0.215728) +bones/15/position = Vector3(-0.131144, 0.958712, -0.0351291) +bones/15/rotation = Quaternion(0.972222, -0.00596415, 0.0271954, 0.232401) bones/16/position = Vector3(-1.10042e-08, 0.265705, -3.31989e-08) bones/16/rotation = Quaternion(-3.43227e-08, 0.00314323, 8.33075e-10, 0.999995) bones/17/position = Vector3(1.83545e-08, 0.265705, 6.98543e-10) -bones/17/rotation = Quaternion(0.419096, 0.00314277, -0.00145078, 0.907936) +bones/17/rotation = Quaternion(0.454277, 0.00335078, -0.0017088, 0.890853) bones/18/position = Vector3(1.2807e-08, 0.225719, -8.28774e-09) bones/18/rotation = Quaternion(-2.29017e-08, -0.00785732, 3.30149e-08, 0.999969) bones/19/position = Vector3(-1.27748e-08, 0.225719, 1.12004e-08) -bones/19/rotation = Quaternion(-0.677213, -0.0281333, -0.00151136, 0.735248) +bones/19/rotation = Quaternion(-0.691852, -0.0282119, -0.000471194, 0.721488) bones/20/position = Vector3(-1.30142e-08, 0.139877, -2.77457e-09) bones/20/rotation = Quaternion(-9.96472e-05, 0.967461, -0.253021, -0.000383039) -bones/21/position = Vector3(0.0251286, 1.44069, 0.0475399) -bones/21/rotation = Quaternion(-0.468898, -0.267874, -0.417939, 0.730551) -bones/22/position = Vector3(0.191644, 1.47967, -0.00897597) -bones/22/rotation = Quaternion(0.0192294, -0.164322, 0.975527, -0.144831) +bones/21/position = Vector3(0.0251286, 1.42354, 0.0410183) +bones/21/rotation = Quaternion(-0.500953, -0.254768, -0.394473, 0.727001) +bones/22/position = Vector3(0.187513, 1.45911, -0.0282358) +bones/22/rotation = Quaternion(0.0596921, -0.158171, 0.973889, -0.151524) bones/23/position = Vector3(-5.41331e-09, 0.143946, -2.98023e-08) -bones/23/rotation = Quaternion(6.45653e-08, -0.0407757, -6.74542e-08, 0.999168) +bones/23/rotation = Quaternion(6.73217e-08, -0.00859443, -4.00158e-08, 0.999963) bones/24/position = Vector3(-6.33301e-08, 0.143946, 4.3873e-08) -bones/24/rotation = Quaternion(0.355288, -0.0407963, -0.0221793, 0.933603) +bones/24/rotation = Quaternion(0.28033, -0.00783227, -0.0168139, 0.959725) bones/25/position = Vector3(1.30385e-08, 0.127601, 6.51926e-09) bones/25/rotation = Quaternion(1.49943e-07, -1.20606e-07, 9.91859e-08, 1) bones/26/position = Vector3(2.06034e-08, 0.127601, 2.42761e-08) @@ -154,14 +152,14 @@ bones/42/rotation = Quaternion(-0.120913, 0.799109, 0.0358921, 0.587807) bones/43/rotation = Quaternion(0.498693, -0.0202705, -0.0256953, 0.866161) bones/44/rotation = Quaternion(0.715385, 0.035306, 0.0573145, 0.695481) bones/45/rotation = Quaternion(-0.129059, 0.728936, -0.0250259, 0.67184) -bones/46/position = Vector3(-0.0113635, 1.44069, 0.0475399) -bones/46/rotation = Quaternion(-0.468138, 0.267383, 0.418196, 0.731071) -bones/47/position = Vector3(-0.177868, 1.47979, -0.00892575) -bones/47/rotation = Quaternion(-0.00637871, -0.14841, 0.976092, 0.158675) +bones/46/position = Vector3(-0.0113635, 1.42354, 0.0410183) +bones/46/rotation = Quaternion(-0.526037, 0.203889, 0.359467, 0.743302) +bones/47/position = Vector3(-0.162646, 1.45879, -0.0501346) +bones/47/rotation = Quaternion(-0.0988031, -0.132713, 0.9711, 0.172018) bones/48/position = Vector3(1.88476e-07, 0.143946, 1.02445e-08) -bones/48/rotation = Quaternion(-1.95822e-07, 0.059992, -1.87386e-07, 0.998199) +bones/48/rotation = Quaternion(5.81737e-08, -0.00256509, 7.29782e-08, 0.999997) bones/49/position = Vector3(6.5191e-09, 0.143946, -1.95094e-08) -bones/49/rotation = Quaternion(0.396474, 0.06003, 0.0277139, 0.915662) +bones/49/rotation = Quaternion(0.310354, -0.00256461, 0.0285704, 0.950188) bones/50/position = Vector3(-1.48779e-07, 0.1276, 5.9139e-08) bones/50/rotation = Quaternion(-8.73115e-08, 2.7474e-08, -1.28057e-07, 1) bones/51/position = Vector3(1.9461e-07, 0.127601, 6.06248e-08) @@ -187,10 +185,10 @@ bones/67/rotation = Quaternion(0.108364, -0.768224, 0.166291, 0.608635) bones/68/rotation = Quaternion(0.629954, 0.0295149, 0.0177509, 0.775869) bones/69/rotation = Quaternion(0.816678, -0.0439534, -0.0509861, 0.573155) bones/70/rotation = Quaternion(-0.12906, -0.728937, 0.0250258, 0.67184) -bones/71/position = Vector3(0.127191, 1.36188, -0.0243187) -bones/71/rotation = Quaternion(2.03741e-08, 0.597458, 0.8019, -4.58164e-08) -bones/72/position = Vector3(-0.113426, 1.36188, -0.0243187) -bones/72/rotation = Quaternion(2.03742e-08, 0.597458, 0.8019, -4.58163e-08) +bones/71/position = Vector3(0.127191, 1.34066, -0.0269514) +bones/71/rotation = Quaternion(1.89659e-08, 0.618033, 0.786152, -4.66016e-08) +bones/72/position = Vector3(-0.113426, 1.34066, -0.0269514) +bones/72/rotation = Quaternion(1.89659e-08, 0.618033, 0.786152, -4.66015e-08) [node name="Knight_01" parent="CharacterRig/GameRig/Skeleton3D" index="0"] visible = false @@ -208,19 +206,18 @@ anim_player = NodePath("../CharacterRig/AnimationPlayer") parameters/MoveSpace/blend_position = -1.0 [node name="RightHandBone" type="BoneAttachment3D" parent="."] -transform = Transform3D(-0.96236, -0.270746, -0.0236708, 0.219803, -0.826584, 0.518118, -0.159844, 0.493413, 0.854981, -0.35167, 1.01449, 0.0336347) +transform = Transform3D(-0.962344, -0.270799, -0.0237169, 0.24671, -0.9067, 0.342096, -0.114143, 0.323362, 0.939366, -0.336462, 0.972791, -0.0497499) bone_name = "DEF-hand.R" bone_idx = 51 use_external_skeleton = true external_skeleton = NodePath("../CharacterRig/GameRig/Skeleton3D") [node name="WeaponSlot" type="Node3D" parent="RightHandBone"] +unique_name_in_owner = true transform = Transform3D(0.16656, 0.0770401, -0.983017, -0.982939, 0.0918653, -0.159347, 0.078029, 0.992787, 0.0910268, -0.0211409, 0.0798348, 0.00721136) -[node name="longsword" parent="RightHandBone/WeaponSlot" instance=ExtResource("3_dka8l")] - [node name="LeftHandBone" type="BoneAttachment3D" parent="."] -transform = Transform3D(-0.970521, 0.239082, 0.0304942, -0.207845, -0.894272, 0.396332, 0.122026, 0.37831, 0.917601, 0.348448, 0.99686, -0.00473515) +transform = Transform3D(-0.970311, 0.239791, 0.0315918, -0.225623, -0.944459, 0.238938, 0.0871324, 0.224717, 0.97052, 0.344499, 0.963157, -0.0622944) bone_name = "DEF-hand.L" bone_idx = 26 use_external_skeleton = true @@ -230,8 +227,6 @@ external_skeleton = NodePath("../CharacterRig/GameRig/Skeleton3D") unique_name_in_owner = true transform = Transform3D(0.10564, 0.417333, -0.902592, -0.99124, 0.116542, -0.0621291, 0.0792616, 0.90125, 0.425989, -0.084208, -0.04557, -0.025934) -[node name="tall_shield" parent="LeftHandBone/OffHandSlot" instance=ExtResource("4_i4vhj")] - [connection signal="animation_finished" from="AnimationTree" to="." method="_on_animation_tree_animation_finished"] [editable path="CharacterRig"] diff --git a/src/scenes/levels/level.tscn b/src/scenes/levels/level.tscn index 21a0da3..8e14d07 100644 --- a/src/scenes/levels/level.tscn +++ b/src/scenes/levels/level.tscn @@ -121,7 +121,7 @@ sky_material = SubResource("PhysicalSkyMaterial_dn2un") background_mode = 2 sky = SubResource("Sky_7iny7") ambient_light_source = 3 -ambient_light_color = Color(1, 1, 1, 1) +ambient_light_color = Color(0.807338, 0.74087, 0.707563, 1) reflected_light_source = 2 tonemap_mode = 3 tonemap_white = 6.0 @@ -226,17 +226,18 @@ metadata/_edit_lock_ = true environment = SubResource("Environment_cxs0p") camera_attributes = SubResource("CameraAttributesPractical_0slur") script = ExtResource("1_1jhfv") -current_time = 12.0 +current_time = 8.24 reflected_energy = 4.0 metadata/_custom_type_script = "uid://bmywk4wvcp0lr" [node name="SunLight" type="DirectionalLight3D" parent="Sky3D"] -transform = Transform3D(0, -0.999334, -0.0365005, 0.630711, -0.0283251, 0.775501, -0.776018, -0.0230213, 0.63029, -0.0365004, 0.775501, 0.63029) +transform = Transform3D(0, -0.666868, 0.745175, 0.788383, 0.45842, 0.410247, -0.615184, 0.587484, 0.525748, 0.745175, 0.410247, 0.525748) +light_color = Color(0.99641, 0.914376, 0.873269, 1) shadow_enabled = true directional_shadow_blend_splits = true [node name="MoonLight" type="DirectionalLight3D" parent="Sky3D"] -transform = Transform3D(0, -0.563293, -0.826257, -0.588864, -0.667808, 0.455272, -0.808232, 0.486553, -0.331703, -0.826257, 0.455272, -0.331703) +transform = Transform3D(0, -0.453769, 0.891119, -0.985584, 0.150763, 0.0767706, -0.169184, -0.878273, -0.447228, 0.891119, 0.0767707, -0.447228) light_color = Color(0.572549, 0.776471, 0.956863, 1) light_energy = 0.0 shadow_enabled = true @@ -251,8 +252,8 @@ ground_color = Color(0.3, 0.3, 0.3, 1) sky_layers = 4 sky_render_priority = -128 horizon_level = 0.0 -sun_altitude = -39.1495 -sun_azimuth = -183.314 +sun_altitude = -65.7796 +sun_azimuth = -125.204 sun_disk_color = Color(0.996094, 0.541334, 0.140076, 1) sun_disk_intensity = 2.0 sun_disk_size = 0.015 @@ -260,8 +261,8 @@ sun_light_path = NodePath("../SunLight") sun_light_color = Color(1, 1, 1, 1) sun_horizon_light_color = Color(0.98, 0.523, 0.294, 1) sun_light_energy = 1.0 -moon_altitude = -136.152 -moon_azimuth = -346.24 +moon_altitude = -101.572 +moon_azimuth = -302.163 moon_color = Color(1, 1, 1, 1) moon_size = 0.07 enable_set_moon_texture = false @@ -269,7 +270,7 @@ moon_resolution = 2 moon_light_path = NodePath("../MoonLight") moon_light_color = Color(0.572549, 0.776471, 0.956863, 1) moon_light_energy = 0.3 -deep_space_euler = Vector3(1.29154, 3.14159, 1.34794) +deep_space_euler = Vector3(1.29154, 3.14159, 2.335) background_color = Color(0.709804, 0.709804, 0.709804, 0.854902) set_background_texture = false stars_field_color = Color(1, 1, 1, 1) @@ -319,12 +320,12 @@ clouds_cumulus_day_color = Color(0.823529, 0.87451, 1, 1) clouds_cumulus_horizon_light_color = Color(0.98, 0.43, 0.15, 1) clouds_cumulus_night_color = Color(0.090196, 0.094118, 0.129412, 1) clouds_cumulus_thickness = 0.0243 -clouds_cumulus_coverage = 0.337 +clouds_cumulus_coverage = 0.751 clouds_cumulus_absorption = 2.0 -clouds_cumulus_noise_freq = 2.7 +clouds_cumulus_noise_freq = 2.469 clouds_cumulus_intensity = 0.9997 clouds_cumulus_mie_intensity = 1.0 -clouds_cumulus_mie_anisotropy = 0.206 +clouds_cumulus_mie_anisotropy = 0.182 clouds_cumulus_size = 0.5 clouds_cumulus_direction = Vector3(0.25, 0.1, 0.25) clouds_cumulus_speed = 0.05 @@ -338,7 +339,7 @@ update_in_editor = false dome_path = NodePath("../Skydome") system_sync = false total_cycle_in_minutes = 15.0 -total_hours = 12.0 +total_hours = 8.24 day = 1 month = 1 year = 2025 diff --git a/src/scripts/ui/inventory.gd b/src/scripts/ui/inventory.gd index 3704b9c..0a011d5 100644 --- a/src/scripts/ui/inventory.gd +++ b/src/scripts/ui/inventory.gd @@ -82,6 +82,15 @@ func equip_item(item: ItemIcon) -> void: item.get_parent().remove_child(item) item_slot.add_child(item) + if item is WeaponIcon: + player.rig.equip_weapon(item.item_model) + # elif item is ArmorIcon: + # player.rig.equip_weapon(item.item_model) + elif item is ShieldIcon: + player.rig.equip_offhand(item.item_model) + else: + return + disconnect_item_connections(item) update_gear_stats()