Replicated the weapon flying tick setup using resources
All checks were successful
Create tag and build when new code gets to main / BumpTag (push) Successful in 26s
Create tag and build when new code gets to main / Export (push) Successful in 5m42s

This commit is contained in:
2026-04-07 16:32:26 +02:00
parent cc7cb90041
commit 1d856fd937
145 changed files with 12943 additions and 109 deletions

View File

@@ -14,6 +14,7 @@ using Gamesmiths.Forge.Godot.Core;
using Gamesmiths.Forge.Godot.Nodes;
using Gamesmiths.Forge.Godot.Resources;
using Gamesmiths.Forge.Godot.Resources.Abilities;
using Gamesmiths.Forge.Statescript;
using Gamesmiths.Forge.Tags;
using Godot;
using GodotStateCharts;
@@ -24,6 +25,7 @@ using Movementtests.scenes.player_controller.components.weapon;
using Movementtests.systems.damage;
using Movementtests.tools;
using Movementtests.tools.calculators;
using Node = Godot.Node;
namespace Movementtests.systems;
@@ -54,7 +56,8 @@ public partial class WeaponSystem : RigidBody3D, IDamageDealer, IForgeEntity
public EffectsManager EffectsManager { get; set; } = null!;
public EntityAbilities Abilities { get; set; } = null!;
public EventManager Events { get; set; } = null!;
public Variables SharedVariables { get; }
private StateChart _weaponState = null!;
public StateChartState InHandState = null!;
public StateChartState FlyingState = null!;
@@ -162,7 +165,7 @@ public partial class WeaponSystem : RigidBody3D, IDamageDealer, IForgeEntity
Events = new();
// TODO: Waiting on bug resolve
// _weaponFlyingAbility = Abilities.GrantAbilityPermanently(FlyingTickAbility.GetAbilityData(), 1, LevelComparison.None, this);
_weaponFlyingAbility = Abilities.GrantAbilityPermanently(FlyingTickAbility.GetAbilityData(), 1, LevelComparison.None, this);
foreach (var ability in WeaponAbilities)
{
@@ -257,7 +260,7 @@ public partial class WeaponSystem : RigidBody3D, IDamageDealer, IForgeEntity
Events.Subscribe(WeaponStoppedFlyingEventTag, data =>
{
// TODO: Waiting on bug resolve
// _weaponFlyingAbility.Cancel();
_weaponFlyingAbility.Cancel();
});
}

View File

@@ -7,6 +7,7 @@
[ext_resource type="Script" uid="uid://couw105c3bde4" path="res://addons/godot_state_charts/state_chart.gd" id="3_5owyf"]
[ext_resource type="Resource" uid="uid://busdbvfi3jiic" path="res://scenes/player_controller/resources/forge/exploding_sword_weapon_left.tres" id="3_7bruw"]
[ext_resource type="ArrayMesh" uid="uid://cho5fixitrbds" path="res://assets/meshes/swords/resources/sword23.tres" id="3_svc06"]
[ext_resource type="Resource" uid="uid://bl0mng4kl1xy8" path="res://scenes/player_controller/resources/forge/exploding_sword_weapon_flight.tres" id="4_2wsgo"]
[ext_resource type="Resource" uid="uid://btnnpqann3ktp" path="res://scenes/player_controller/resources/forge/weapon_flying_tick_ability.tres" id="4_7bruw"]
[ext_resource type="Script" uid="uid://ccovd5i0wr3kk" path="res://addons/forge/editor/attributes/AttributeValues.cs" id="4_q6xv7"]
[ext_resource type="Script" uid="uid://jk2jm1g6q853" path="res://addons/godot_state_charts/compound_state.gd" id="4_svc06"]
@@ -59,7 +60,7 @@ continuous_cd = true
contact_monitor = true
max_contacts_reported = 1
script = ExtResource("1_csqwk")
WeaponAbilities = [ExtResource("2_pgbtr"), ExtResource("3_7bruw")]
WeaponAbilities = [ExtResource("2_pgbtr"), ExtResource("3_7bruw"), ExtResource("4_2wsgo")]
FlyingTickAbility = ExtResource("4_7bruw")
RDamage = SubResource("Resource_jpdh0")