Add OpenDoorActionResource and integrate into TriggerActionFactory

This commit is contained in:
2025-10-30 02:35:36 +01:00
parent 2c126cd7ea
commit 214d541c2b
4 changed files with 15 additions and 4 deletions

View File

@@ -14,6 +14,7 @@ public class TriggerActionFactory
UnlockDoorActionResource unlock => new UnlockDoorAction(unlock.TargetWorldId),
SpawnEntityActionResource spawn => new SpawnEntityAction(spawn.ArchetypeId, spawn.SpawnerWorldId),
DebugMessageActionResource debug => new DebugMessageAction(debug.Message),
OpenDoorActionResource open => new OpenDoorAction(open.TargetWorldId),
_ => throw new ArgumentOutOfRangeException(nameof(resource),
$"TriggerAction type {resource.GetType().Name} not recognized")
};

View File

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

View File

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