18 lines
411 B
C#
18 lines
411 B
C#
|
using Godot;
|
||
|
using System;
|
||
|
using System.Linq;
|
||
|
using BITKit;
|
||
|
|
||
|
namespace BITKit;
|
||
|
public partial class TemplateCondition : ConditionComponent
|
||
|
{
|
||
|
public override Type BaseType => typeof(ConditionComponent);
|
||
|
[Export] private TemplateResource templateResource;
|
||
|
[Export] private string templateName;
|
||
|
|
||
|
public override bool OnCheck()
|
||
|
{
|
||
|
return templateResource.GetTemplates().Any(x => x.Name == templateName);
|
||
|
}
|
||
|
}
|