Add TriggerActionFactory and related resources for button and logic sequence components

This commit is contained in:
2025-10-30 02:21:27 +01:00
parent f2ff758dcb
commit 2c126cd7ea
22 changed files with 250 additions and 13 deletions

View File

@@ -0,0 +1,15 @@
using Godot;
using Godot.Collections;
namespace CryptonymThunder.Code.Resources;
[GlobalClass]
public partial class ButtonComponentResource : Resource
{
[Export] public string ChannelId { get; set; } = "default_channel";
[Export] public bool IsToggle { get; set; } = false;
[Export] public bool IsOneTimeUse { get; set; } = false;
[ExportGroup("Requirements")]
[Export] public Array<InteractionRequirementResource> Requirements { get; set; } = [];
}

View File

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

View File

@@ -0,0 +1,9 @@
using Godot;
namespace CryptonymThunder.Code.Resources;
[GlobalClass]
public partial class DebugMessageActionResource : TriggerActionResource
{
[Export(PropertyHint.MultilineText)] public string Message { get; set; } = "Trigger Fired!";
}

View File

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

View File

@@ -0,0 +1,12 @@
using Godot;
using Godot.Collections;
namespace CryptonymThunder.Code.Resources;
[GlobalClass]
public partial class LogicSequenceComponentResource : Resource
{
[Export] public Array<string> RequiredChannels { get; set; } = [];
[Export] public Array<TriggerActionResource> OnCompleteActions { get; set; } = [];
[Export] public bool IsOneTimeTrigger { get; set; } = true;
}

View File

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

View File

@@ -0,0 +1,10 @@
using Godot;
namespace CryptonymThunder.Code.Resources;
[GlobalClass]
public partial class SpawnEntityActionResource : TriggerActionResource
{
[Export] public string ArchetypeId { get; set; } = "enemy_grunt";
[Export] public string SpawnerWorldId { get; set; } = "spawner_location_1";
}

View File

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

View File

@@ -0,0 +1,8 @@
using Godot;
namespace CryptonymThunder.Code.Resources;
public partial class TriggerActionResource : Resource
{
}

View File

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

View File

@@ -0,0 +1,9 @@
using Godot;
namespace CryptonymThunder.Code.Resources;
[GlobalClass]
public partial class UnlockDoorActionResource : TriggerActionResource
{
[Export] public string TargetWorldId { get; set; } = "door_to_unlock";
}

View File

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

View File

@@ -0,0 +1,9 @@
using Godot;
namespace CryptonymThunder.Code.Resources;
[GlobalClass]
public partial class WorldIdComponentResource : Resource
{
[Export] public string WorldId { get; set; } = "unique_id_01";
}

View File

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