added forge addon
All checks were successful
Create tag and build when new code gets to main / BumpTag (push) Successful in 21s
Create tag and build when new code gets to main / Test (push) Successful in 6m56s
Create tag and build when new code gets to main / Export (push) Successful in 9m3s

This commit is contained in:
2026-02-08 15:16:01 +01:00
parent 2b74c9e70c
commit c4be97e0de
163 changed files with 6975 additions and 141 deletions

View File

@@ -0,0 +1,21 @@
// Copyright © Gamesmiths Guild.
using Gamesmiths.Forge.Effects.Components;
using Gamesmiths.Forge.Godot.Core;
using Gamesmiths.Forge.Godot.Resources.Magnitudes;
using Godot;
namespace Gamesmiths.Forge.Godot.Resources.Components;
[Tool]
[GlobalClass]
public partial class ChanceToApplyEffect : ForgeEffectComponent
{
[Export]
public ForgeScalableFloat Chance { get; set; } = new(1);
public override IEffectComponent GetComponent()
{
return new ChanceToApplyEffectComponent(new ForgeRandom(), Chance.GetScalableFloat());
}
}

View File

@@ -0,0 +1 @@
uid://c10ov6sgvcunw

View File

@@ -0,0 +1,14 @@
// Copyright © Gamesmiths Guild.
using Gamesmiths.Forge.Effects.Components;
using Godot;
namespace Gamesmiths.Forge.Godot.Resources.Components;
[Tool]
[GlobalClass]
[Icon("uid://bcx7anhepqfmd")]
public abstract partial class ForgeEffectComponent : Resource
{
public abstract IEffectComponent GetComponent();
}

View File

@@ -0,0 +1 @@
uid://cpcrmq51kgbpu

View File

@@ -0,0 +1,51 @@
// Copyright © Gamesmiths Guild.
using System.Diagnostics;
using Gamesmiths.Forge.Abilities;
using Gamesmiths.Forge.Core;
using Gamesmiths.Forge.Effects.Components;
using Gamesmiths.Forge.Godot.Resources.Abilities;
using Gamesmiths.Forge.Godot.Resources.Magnitudes;
using Godot;
namespace ForgeGodot.Addons.Forge.Resources.Components;
[Tool]
[GlobalClass]
public partial class ForgeGrantAbilityConfig : Resource
{
[Export]
public ForgeAbilityData? AbilityData { get; set; }
[Export]
public ForgeScalableInt AbilityLevel { get; set; } = new(1);
[Export]
public AbilityDeactivationPolicy RemovalPolicy { get; set; } = AbilityDeactivationPolicy.CancelImmediately;
[Export]
public AbilityDeactivationPolicy InhibitionPolicy { get; set; } = AbilityDeactivationPolicy.CancelImmediately;
[Export]
public bool TryActivateOnGrant { get; set; }
[Export]
public bool TryActivateOnEnable { get; set; }
[Export]
public LevelComparison LevelOverridePolicy { get; set; } = LevelComparison.None;
public GrantAbilityConfig GetGrantAbilityConfig()
{
Debug.Assert(AbilityData is not null, $"{nameof(AbilityData)} reference is missing.");
return new GrantAbilityConfig(
AbilityData.GetAbilityData(),
AbilityLevel.GetScalableInt(),
RemovalPolicy,
InhibitionPolicy,
TryActivateOnGrant,
TryActivateOnEnable,
LevelOverridePolicy);
}
}

View File

@@ -0,0 +1 @@
uid://72kj3n4lm1em

View File

@@ -0,0 +1 @@
uid://b665wpo0okpml

View File

@@ -0,0 +1,28 @@
// Copyright © Gamesmiths Guild.
using System.Collections.Generic;
using ForgeGodot.Addons.Forge.Resources.Components;
using Gamesmiths.Forge.Effects.Components;
using Godot;
namespace Gamesmiths.Forge.Godot.Resources.Components;
[Tool]
[GlobalClass]
public partial class GrantAbility : ForgeEffectComponent
{
[Export]
public ForgeGrantAbilityConfig[] GrantAbilityConfigs { get; set; } = [];
public override IEffectComponent GetComponent()
{
List<GrantAbilityConfig> configs = [];
foreach (ForgeGrantAbilityConfig config in GrantAbilityConfigs)
{
configs.Add(config.GetGrantAbilityConfig());
}
return new GrantAbilityEffectComponent([.. configs]);
}
}

View File

@@ -0,0 +1 @@
uid://b3wo2uge4ddnj

View File

@@ -0,0 +1,21 @@
// Copyright © Gamesmiths Guild.
using Gamesmiths.Forge.Effects.Components;
using Godot;
namespace Gamesmiths.Forge.Godot.Resources.Components;
[Tool]
[GlobalClass]
public partial class ModifierTags : ForgeEffectComponent
{
[Export]
public ForgeTagContainer? TagsToAdd { get; set; }
public override IEffectComponent GetComponent()
{
TagsToAdd ??= new();
return new ModifierTagsEffectComponent(TagsToAdd.GetTagContainer());
}
}

View File

@@ -0,0 +1 @@
uid://dngf30hxy5go4

View File

@@ -0,0 +1,84 @@
// Copyright © Gamesmiths Guild.
using Gamesmiths.Forge.Effects.Components;
using Gamesmiths.Forge.Tags;
using Godot;
namespace Gamesmiths.Forge.Godot.Resources.Components;
[Tool]
[GlobalClass]
public partial class TargetTagRequirements : ForgeEffectComponent
{
[ExportGroup("Application Requirements")]
[Export]
public ForgeTagContainer? ApplicationRequiredTags { get; set; }
[Export]
public ForgeTagContainer? ApplicationIgnoredTags { get; set; }
[Export]
public QueryExpression? ApplicationTagQuery { get; set; }
[ExportGroup("Removal Requirements")]
[Export]
public ForgeTagContainer? RemovalRequiredTags { get; set; }
[Export]
public ForgeTagContainer? RemovalIgnoredTags { get; set; }
[Export]
public QueryExpression? RemovalTagQuery { get; set; }
[ExportGroup("Ongoing Requirements")]
[Export]
public ForgeTagContainer? OngoingRequiredTags { get; set; }
[Export]
public ForgeTagContainer? OngoingIgnoredTags { get; set; }
[Export]
public QueryExpression? OngoingTagQuery { get; set; }
public override IEffectComponent GetComponent()
{
ApplicationRequiredTags ??= new();
ApplicationIgnoredTags ??= new();
RemovalRequiredTags ??= new();
RemovalIgnoredTags ??= new();
OngoingRequiredTags ??= new();
OngoingIgnoredTags ??= new();
var applicationQuery = new TagQuery();
if (ApplicationTagQuery is not null)
{
applicationQuery.Build(ApplicationTagQuery.GetQueryExpression());
}
var removalQuery = new TagQuery();
if (RemovalTagQuery is not null)
{
removalQuery.Build(RemovalTagQuery.GetQueryExpression());
}
var ongoingQuery = new TagQuery();
if (OngoingTagQuery is not null)
{
ongoingQuery.Build(OngoingTagQuery.GetQueryExpression());
}
return new TargetTagRequirementsEffectComponent(
new TagRequirements(
ApplicationRequiredTags.GetTagContainer(),
ApplicationIgnoredTags.GetTagContainer(),
applicationQuery),
new TagRequirements(
RemovalRequiredTags.GetTagContainer(),
RemovalIgnoredTags.GetTagContainer(),
removalQuery),
new TagRequirements(
OngoingRequiredTags.GetTagContainer(),
OngoingIgnoredTags.GetTagContainer(),
ongoingQuery));
}
}

View File

@@ -0,0 +1 @@
uid://b0eq12mjqfage