iFactory.Godot/Mods/工业数据采集与分析应用分享/Scripts/Quest/TemplateCondition.cs

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);
}
}