This commit is contained in:
2026-07-09 21:33:33 +02:00
commit 84a2a365f3
2364 changed files with 950134 additions and 0 deletions
@@ -0,0 +1,26 @@
using System.Text;
using Schema;
using UnityEngine;
using VOID.Generic.Objects.Unit;
namespace VOID.Generic.AI.Schema.Conditionals
{
[DarkIcon("Conditionals/d_IsNull")]
[LightIcon("Conditionals/IsNull")]
[Category(SchemaCategory.ThisUnit)]
public class IsPatrolDefined : Conditional
{
public override bool Evaluate(object nodeMemory, SchemaAgent agent)
{
return (agent as UnitObjectSchemaAgent)?.unitAI.patrol.Count > 1;
}
public override GUIContent GetConditionalContent()
{
var sb = new StringBuilder();
if (invert) sb.Append("<color=red>NOT</color> ");
sb.Append($"<color=red>{nameof(UnitObjectSenses)}</color> has at least two <color=red>patrol</color> points");
return new GUIContent(sb.ToString());
}
}
}