removed obsolete interfaces for health and damage
All checks were successful
Create tag and build when new code gets to main / BumpTag (push) Successful in 27s
Create tag and build when new code gets to main / Export (push) Successful in 5m25s

This commit is contained in:
2026-05-05 11:51:35 +02:00
parent 33f55d04f3
commit 68e36742af
41 changed files with 37 additions and 703 deletions

View File

@@ -30,7 +30,7 @@ namespace Movementtests.systems;
[GlobalClass, Icon("res://assets/ui/IconGodotNode/node_3D/icon_sword.png"), Meta(typeof(IAutoNode))]
public partial class WeaponSystem : RigidBody3D, IDamageDealer, IForgeEntity
public partial class WeaponSystem : RigidBody3D, IForgeEntity
{
public override void _Notification(int what) => this.Notify(what);
@@ -66,9 +66,9 @@ public partial class WeaponSystem : RigidBody3D, IDamageDealer, IForgeEntity
#region Forge
private Dictionary<ForgeAbilityBehavior, ActiveEffectHandle> _grantedWeaponStartedFlyingAbilities = new ();
private Dictionary<ForgeAbilityBehavior, ActiveEffectHandle> _grantedWeaponStoppedFlyingAbilities = new ();
private Dictionary<ForgeAbilityBehavior, ActiveEffectHandle> _grantedWeaponFlyingTickAbilities = new ();
private readonly Dictionary<ForgeAbilityBehavior, ActiveEffectHandle> _grantedWeaponStartedFlyingAbilities = new();
private readonly Dictionary<ForgeAbilityBehavior, ActiveEffectHandle> _grantedWeaponStoppedFlyingAbilities = new();
private readonly Dictionary<ForgeAbilityBehavior, ActiveEffectHandle> _grantedWeaponFlyingTickAbilities = new();
public Tag WeaponFlyingTickEventTag;
public Tag WeaponStartedFlyingEventTag;
@@ -92,8 +92,6 @@ public partial class WeaponSystem : RigidBody3D, IDamageDealer, IForgeEntity
#region Inspector
[Export] public ForgeAbilityData? FlyingTickAbility { get; set; }
[Export]
public RDamage RDamage { get; set; }
[Export(PropertyHint.Range, "0,2,0.01,or_greater")]
public float ThrowForce { get; set; } = 1f;
[Export(PropertyHint.Range, "0,0.2,0.01,or_greater")]
@@ -140,9 +138,9 @@ public partial class WeaponSystem : RigidBody3D, IDamageDealer, IForgeEntity
#region Publics
public StateChartState InHandState = null!;
public StateChartState FlyingState = null!;
public StateChartState PlantedState = null!;
public StateChartState InHandState = null!;
public StateChartState FlyingState = null!;
public StateChartState PlantedState = null!;
public Vector3 PlantLocation { get; set; }
public Vector3 PlantNormal { get; set; }
@@ -420,10 +418,10 @@ public partial class WeaponSystem : RigidBody3D, IDamageDealer, IForgeEntity
if (enemy is IForgeEntity victim) _plantedEntity = victim;
else _plantedEntity = null;
if (enemy is IDamageable damageable)
{
damageable.TakeDamage(new DamageRecord(GlobalPosition, RDamage));
}
// if (enemy is IDamageable damageable)
// {
// damageable.TakeDamage(new DamageRecord(GlobalPosition, RDamage));
// }
}
public void RethrowWeapon()

View File

@@ -2,7 +2,6 @@
[ext_resource type="Script" uid="uid://iii3wfto4t5b" path="res://scenes/player_controller/components/weapon/WeaponSystem.cs" id="1_csqwk"]
[ext_resource type="Script" uid="uid://cw525n4mjqgw0" path="res://addons/forge/resources/ForgeTagContainer.cs" id="2_l1xlx"]
[ext_resource type="Script" uid="uid://jitubgv6judn" path="res://scenes/components/damage/RDamage.cs" id="2_m0v1h"]
[ext_resource type="Script" uid="uid://cxihb42t2mfqi" path="res://addons/forge/nodes/ForgeAttributeSet.cs" id="3_3xjpi"]
[ext_resource type="Script" uid="uid://couw105c3bde4" path="res://addons/godot_state_charts/state_chart.gd" id="3_5owyf"]
[ext_resource type="ArrayMesh" uid="uid://cho5fixitrbds" path="res://assets/meshes/swords/resources/sword23.tres" id="3_svc06"]
@@ -13,16 +12,6 @@
[ext_resource type="Script" uid="uid://cytafq8i1y8qm" path="res://addons/godot_state_charts/atomic_state.gd" id="5_m0v1h"]
[ext_resource type="Script" uid="uid://cf1nsco3w0mf6" path="res://addons/godot_state_charts/transition.gd" id="6_jpdh0"]
[sub_resource type="Resource" id="Resource_06gln"]
script = ExtResource("2_l1xlx")
ContainerTags = Array[String](["weapon"])
metadata/_custom_type_script = "uid://cw525n4mjqgw0"
[sub_resource type="Resource" id="Resource_jpdh0"]
script = ExtResource("2_m0v1h")
DamageDealt = 2.0
metadata/_custom_type_script = "uid://jitubgv6judn"
[sub_resource type="Resource" id="Resource_7bruw"]
script = ExtResource("2_l1xlx")
ContainerTags = Array[String](["weapon"])
@@ -69,9 +58,7 @@ continuous_cd = true
contact_monitor = true
max_contacts_reported = 1
script = ExtResource("1_csqwk")
BaseTags = SubResource("Resource_06gln")
FlyingTickAbility = ExtResource("4_7bruw")
RDamage = SubResource("Resource_jpdh0")
[node name="ForgeEntityNode" type="Node3D" parent="." unique_id=1798885192]
script = ExtResource("5_7bruw")