basic forge setup and refactored for some warning
All checks were successful
Create tag and build when new code gets to main / BumpTag (push) Successful in 30s
Create tag and build when new code gets to main / Export (push) Successful in 5m10s

This commit is contained in:
2026-02-24 10:27:57 +01:00
parent 4f64139d61
commit 5da2aa31ab
14 changed files with 284 additions and 228 deletions

View File

@@ -22,12 +22,11 @@ public partial class WeaponSystem : RigidBody3D, IDamageDealer
[Export(PropertyHint.Range, "0,0.2,0.01,or_greater")]
public float StraightThrowDuration { get; set; } = 0.1f;
private StateChart _weaponState;
public StateChartState InHandState;
public StateChartState FlyingState;
public StateChartState PlantedState;
private ShapeCast3D _dashCast3D;
private StateChart _weaponState = null!;
public StateChartState InHandState = null!;
public StateChartState FlyingState = null!;
public StateChartState PlantedState = null!;
private ShapeCast3D _dashCast3D = null!;
private Transform3D _startTransform;
private Vector3 _startMeshRotation;
@@ -35,11 +34,11 @@ public partial class WeaponSystem : RigidBody3D, IDamageDealer
private Vector3 _throwDirection;
public Vector3 PlantLocation { get; set; }
public Vector3 PlantNormal { get; set; }
public Node PlantObject { get; set; }
public MeshInstance3D WeaponLocationIndicator { get; set; }
public StandardMaterial3D WeaponLocationIndicatorMaterial { get; set; }
public MeshInstance3D WeaponMesh { get; set; }
public Node? PlantObject { get; set; }
public MeshInstance3D WeaponLocationIndicator { get; set; } = null!;
public StandardMaterial3D WeaponLocationIndicatorMaterial { get; set; } = null!;
public MeshInstance3D WeaponMesh { get; set; } = null!;
public void Init()
{
@@ -50,7 +49,7 @@ public partial class WeaponSystem : RigidBody3D, IDamageDealer
WeaponLocationIndicator = GetNode<MeshInstance3D>("WeaponLocationIndicator");
WeaponLocationIndicator.Visible = false;
WeaponLocationIndicatorMaterial = WeaponLocationIndicator.GetActiveMaterial(0) as StandardMaterial3D;
WeaponLocationIndicatorMaterial = (WeaponLocationIndicator.GetActiveMaterial(0) as StandardMaterial3D)!;
WeaponMesh = GetNode<MeshInstance3D>("Weapon");
_startMeshRotation = WeaponMesh.Rotation;
@@ -100,7 +99,6 @@ public partial class WeaponSystem : RigidBody3D, IDamageDealer
var tween = GetTree().CreateTween();
tween.SetParallel(true);
tween.TweenProperty(this, "global_position", end, StraightThrowDuration);
if (hasHit)
{