From: melchior Date: Wed, 11 Nov 2020 22:42:49 +0000 (-0500) Subject: Apparently 'fixed' Air Block type filters (non-solid plants) X-Git-Tag: V0.1.6~20 X-Git-Url: http://git.osdn.net/view?p=automap%2Fautomap.git;a=commitdiff_plain;h=983e2ab853a3288297ed32d6fb46b8655041c009 Apparently 'fixed' Air Block type filters (non-solid plants) --- diff --git a/Automap/Subsystems/AutomapSystem.cs b/Automap/Subsystems/AutomapSystem.cs index e83bc1a..f61fef5 100644 --- a/Automap/Subsystems/AutomapSystem.cs +++ b/Automap/Subsystems/AutomapSystem.cs @@ -328,10 +328,16 @@ namespace Automap this.BlockID_Designators = new Dictionary(); this.Entity_Designators = new Dictionary(); this.RockIdCodes = Helpers.ArbitrarytBlockIdHunter(ClientAPI, new AssetLocation(GlobalConstants.DefaultDomain, "rock-"), EnumBlockMaterial.Stone); - this.AiryIdCodes = Helpers.ArbitrarytBlockIdHunter(ClientAPI, new AssetLocation(GlobalConstants.DefaultDomain, "tallgrass-"), EnumBlockMaterial.Plant); - //Add special marker types for BlockID's of "Interest", overwrite colour, and method + var airBlocksQuery = from airyBlock in ClientAPI.World.Blocks + where airyBlock.MatterState == EnumMatterState.Solid + where airyBlock.BlockMaterial == EnumBlockMaterial.Plant || airyBlock.BlockMaterial == EnumBlockMaterial.Leaves + where airyBlock.CollisionBoxes == null || airyBlock.CollisionBoxes.Length == 0 + select airyBlock; + //^^ 'Solid' phase - 'Plant' Blocks without any boundg box ? Except water... + this.AiryIdCodes = airBlocksQuery.ToDictionary(aBlk => aBlk.BlockId, aBlk => aBlk.Code.Path); + //Add special marker types for BlockID's of "Interest", overwrite colour, and method Reload_POI_Designators(); }