using System; using Cirno.Scripts; using Godot; using Godot.Collections; namespace Cirno._3D.TrenchBroom.EntityScripts.Triggers; public interface ITargetable { string TargetName { get; set; } void ApplyTargetProperties(Dictionary props) { TargetName = props["targetname"].AsString(); } } public interface ITargeting { string Target { get; set; } void ApplyTargetingProperties(Dictionary props) { Target = props["target"].AsString(); } } public interface IActivationType { ActivationType ActivationType { get; set; } void ApplyActivationTypeProperties(Dictionary props) { if (props.TryGetValue("activationtype", out var type)) { var t = Enum.TryParse(type.AsString(), true, out ActivationType activationType); if (t) { ActivationType = activationType; } } } }