using System; using System.Collections.Generic; using System.Collections.ObjectModel; using System.Drawing; using Vintagestory.API.Client; using Vintagestory.API.Common; using Vintagestory.API.MathTools; namespace Automap { public delegate void BlockDesignatorAction(ICoreClientAPI clientAPI, PointsOfInterest poi, BlockPos posn, Block block); /// /// Point of Interest Rule Designator /// public class BlockDesignator { public Color OverwriteColor; public BlockDesignatorAction SpecialAction; public AssetLocation Pattern; public EnumBlockMaterial? Material; public bool Enabled { get; set; } private BlockDesignator() { throw new NotSupportedException(); } public BlockDesignator(AssetLocation pattern, Color overwriteColor, EnumBlockMaterial? material) { this.Pattern = pattern; this.OverwriteColor = overwriteColor; this.Material = material; this.Enabled = true; } public BlockDesignator(AssetLocation pattern, Color overwriteColor, EnumBlockMaterial? material, BlockDesignatorAction specialAct) { this.Pattern = pattern; this.OverwriteColor = overwriteColor; this.Material = material; this.SpecialAction = specialAct; this.Enabled = true; } public override string ToString() { return Pattern.ToShortString() + "|" + OverwriteColor.Name + "|" + Material ?? ""; } } }