2 using System.Collections.Generic;
3 using System.Collections.ObjectModel;
6 using Vintagestory.API.Client;
7 using Vintagestory.API.Common;
8 using Vintagestory.API.Common.Entities;
9 using Vintagestory.API.MathTools;
13 public delegate void EntityDesignatonAction(ICoreClientAPI clientAPI, EntitiesOfInterest poi, BlockPos posn, Entity entity);
16 /// Point of Interest Rule Designator
18 public class EntityDesignator
20 public Color OverwriteColor;
21 public EntityDesignatonAction SpecialAction;
22 public AssetLocation Pattern;
23 public EnumEntityState? StateCheck;//Needed?
24 public bool Enabled { get; set; }
26 private EntityDesignator()
28 throw new NotSupportedException();
31 public EntityDesignator(AssetLocation pattern, Color overwriteColor, EnumEntityState? state)
33 this.Pattern = pattern;
34 this.OverwriteColor = overwriteColor;
35 this.StateCheck = state;
39 public EntityDesignator(AssetLocation pattern, Color overwriteColor, EnumEntityState? state, EntityDesignatonAction specialAct)
41 this.Pattern = pattern;
42 this.OverwriteColor = overwriteColor;
43 this.StateCheck = state;
44 this.SpecialAction = specialAct;
48 public override string ToString()
50 return Pattern.ToShortString() + "|" + OverwriteColor.Name + "|" + StateCheck ?? "";