Renamed TeamData blocks -> plans
This commit is contained in:
@@ -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){
|
||||
|
||||
Reference in New Issue
Block a user