Files
tbd-station-14/Content.Server/NPC/HTN/Preconditions/KeyExistsPrecondition.cs
metalgearsloth 0286b88388 NPC refactor (#10122)
Co-authored-by: metalgearsloth <metalgearsloth@gmail.com>
2022-09-06 00:28:23 +10:00

12 lines
300 B
C#

namespace Content.Server.NPC.HTN.Preconditions;
public sealed class KeyExistsPrecondition : HTNPrecondition
{
[DataField("key", required: true)] public string Key = string.Empty;
public override bool IsMet(NPCBlackboard blackboard)
{
return blackboard.ContainsKey(Key);
}
}