Added direct core-vault chaining

This commit is contained in:
Anuken
2019-09-12 21:14:09 -04:00
parent d0491dd68a
commit 4b26c57a20
5 changed files with 114 additions and 8 deletions

View File

@@ -207,14 +207,12 @@ public class TileEntity extends BaseEntity implements TargetTrait, HealthTrait{
if(other == null) continue;
if(other.entity == null || !(other.interactable(tile.getTeam()))) continue;
other.block().onProximityUpdate(other);
tmpTiles.add(other);
//add this tile to proximity of nearby tiles
if(!other.entity.proximity.contains(tile, true)){
other.entity.proximity.add(tile);
}
tmpTiles.add(other);
}
//using a set to prevent duplicates
@@ -224,6 +222,10 @@ public class TileEntity extends BaseEntity implements TargetTrait, HealthTrait{
block.onProximityAdded(tile);
block.onProximityUpdate(tile);
for(Tile other : tmpTiles){
other.block().onProximityUpdate(other);
}
}
public Array<Tile> proximity(){