public virtual Path getPathToMakeTheseBlocksAvaiable( IslandPathingProfile startProfile, BlockLoc startLoc, IslandPathingProfile endProfile, List <BlockLoc> blockLocs, int heightOfEntity, out BlockLoc blockMadeAvailable) { blockMadeAvailable = new BlockLoc(); HashSet <BlockLoc> goals = new HashSet <BlockLoc>(); foreach (BlockLoc blockLocToAccess in blockLocs) { HashSet <BlockLoc> toAdd = endProfile.getFootLocsThatHaveAccessToBlock(blockLocToAccess); foreach (BlockLoc addToGoals in toAdd) { goals.Add(addToGoals); } } List <BlockLoc> path = getPathWithStartAndEndGroupValidation(startProfile, startLoc, endProfile, goals, heightOfEntity); foreach (BlockLoc blockToAcces in blockLocs) { if (path != null) { if (endProfile.getFootLocsThatHaveAccessToBlock(blockToAcces).Contains(path.Last())) { blockMadeAvailable = blockToAcces; } } } return(new Path(path)); }
public bool vehiclePlacedHereCouldBeBoarded(BlockLoc vehicleLoc) { IslandPathingProfile profile = getPathingProfile(); if (profile.getFootLocsThatHaveAccessToBlock(vehicleLoc).Count != 0) { if (profile.getStandableFootLocsThatHaveAccessToBlock(vehicleLoc, 2).Count != 0) { return(true); } } return(false); }