Renamed TeamData blocks -> plans

This commit is contained in:
Anuken
2022-05-07 10:57:21 -04:00
parent 8f2e1163dd
commit 7885a46cd5
10 changed files with 24 additions and 24 deletions

View File

@@ -290,16 +290,16 @@ abstract class BuildingComp implements Posc, Teamc, Healthc, Buildingc, Timerc,
if(checkPrevious){
//remove existing blocks that have been placed here.
//painful O(n) iteration + copy
for(int i = 0; i < data.blocks.size; i++){
BlockPlan b = data.blocks.get(i);
for(int i = 0; i < data.plans.size; i++){
BlockPlan b = data.plans.get(i);
if(b.x == tile.x && b.y == tile.y){
data.blocks.removeIndex(i);
data.plans.removeIndex(i);
break;
}
}
}
data.blocks.addFirst(new BlockPlan(tile.x, tile.y, (short)rotation, toAdd.id, overrideConfig == null ? config() : overrideConfig));
data.plans.addFirst(new BlockPlan(tile.x, tile.y, (short)rotation, toAdd.id, overrideConfig == null ? config() : overrideConfig));
}
public @Nullable Tile findClosestEdge(Position to, Boolf<Tile> solid){