2 using System.Collections.Generic;
5 using Vintagestory.API.Client;
6 using Vintagestory.API.Common;
7 using Vintagestory.API.MathTools;
8 using Vintagestory.GameContent;
12 public static class DefaultDesignators
14 public static Designator Roads =
16 new AssetLocation("game", "stonepath"),
18 EnumBlockMaterial.Gravel
21 public static Designator GroundSigns =
23 new AssetLocation("game", "sign-ground"),
25 EnumBlockMaterial.Wood,
29 public static Designator WallSigns =
31 new AssetLocation("game", "sign-wall"),
33 EnumBlockMaterial.Wood,
37 public static Designator PostSigns =
39 new AssetLocation("game", "signpost"),
41 EnumBlockMaterial.Wood,
45 public static Designator Translocators =
47 new AssetLocation("game", "statictranslocator-normal"),
49 EnumBlockMaterial.Metal
53 internal static void DecodeSign(ICoreClientAPI clientAPI, PointsOfInterest poi, BlockPos posn, Block block)
55 clientAPI.Logger.VerboseDebug("Sign Designator Invoked!");
56 //sign Text into a POI field...
57 BlockEntitySign signEntity = clientAPI.World.BlockAccessor.GetBlockEntity(posn) as BlockEntitySign;
59 if (signEntity != null && !String.IsNullOrEmpty(signEntity.text))
64 Location = posn.Copy( ),
65 Notes = signEntity.text,
66 Timestamp = DateTimeOffset.UtcNow,
75 internal static void DecodePostSign(ICoreClientAPI clientAPI, PointsOfInterest poi, BlockPos posn, Block block)
77 clientAPI.Logger.VerboseDebug("Post-sign Designator Invoked!");
78 //sign post Text into a POI field...
79 BlockEntitySignPost signEntity = clientAPI.World.BlockAccessor.GetBlockEntity(posn) as BlockEntitySignPost;
81 if (signEntity != null && signEntity.textByCardinalDirection?.Length > 0 ) {
85 Location = posn.Copy( ),
86 Notes = string.Join(",", signEntity.textByCardinalDirection),
87 Timestamp = DateTimeOffset.UtcNow,