Prevent Deloyable by Topology

Prevent a deployables from being deployed based on comparing local toplogy to a list.

Example : 

TopologyBlackList:[
autoturret:{mainland, oceanside, beach, beachside, tier0},
flameturret:{mainland, oceanside, beach, beachside, tier0},
trap.bear:{mainland, oceanside, beach, beachside, tier0},    
trap.landmine:{mainland, oceanside, beach, beachside, tier0},    
guntrap:{mainland, oceanside, beach, beachside, tier0},
spikes.floor:{mainland, oceanside, beach, beachside, tier0},    
barricade.woodwire:{mainland, oceanside, beach, beachside, tier0},    
barricade.metal:{mainland, oceanside, beach, beachside, tier0}
]

The plugin would with this config, then prevent the player from placing a trap of any kind in the spawn area. 

I know it's possible, I just don't know how to get the local topology and how to feed the information to CanDeploy to prevent the deployment.

 

Hello, this is from MonumentInfo class, maybe it could help you to find what you are looking.

public bool CheckPlacement(Vector3 pos, Quaternion rot, Vector3 scale)
    {
        OBB oBB = new OBB(pos, scale, rot, this.Bounds);
        Vector3 point = oBB.GetPoint(-1f, 0f, -1f);
        Vector3 vector3 = oBB.GetPoint(-1f, 0f, 1f);
        Vector3 point1 = oBB.GetPoint(1f, 0f, -1f);
        Vector3 vector31 = oBB.GetPoint(1f, 0f, 1f);
        int topology = TerrainMeta.TopologyMap.GetTopology(point);
        int num = TerrainMeta.TopologyMap.GetTopology(vector3);
        int topology1 = TerrainMeta.TopologyMap.GetTopology(point1);
        int num1 = TerrainMeta.TopologyMap.GetTopology(vector31);
        int mask = MonumentInfo.TierToMask(this.Tier);
        int num2 = 0;
        if ((mask & topology) != 0)
        {
            num2++;
        }
        if ((mask & num) != 0)
        {
            num2++;
        }
        if ((mask & topology1) != 0)
        {
            num2++;
        }
        if ((mask & num1) != 0)
        {
            num2++;
        }
        return num2 >= 3;
    }​