Merging changes from private branch

This commit is contained in:
Anuken
2025-04-04 11:47:35 -04:00
parent cf5c6d0905
commit b7dbe54d76
161 changed files with 2484 additions and 1137 deletions

View File

@@ -23,6 +23,7 @@ import static mindustry.Vars.*;
public class Tile implements Position, QuadTreeObject, Displayable{
private static final TileChangeEvent tileChange = new TileChangeEvent();
private static final TilePreChangeEvent preChange = new TilePreChangeEvent();
private static final TileFloorChangeEvent floorChange = new TileFloorChangeEvent();
private static final ObjectSet<Building> tileSet = new ObjectSet<>();
/** Extra data for very specific blocks. */
@@ -223,6 +224,8 @@ public class Tile implements Position, QuadTreeObject, Displayable{
recacheWall();
}
if(type.forceTeam != null) team = type.forceTeam;
preChanged();
this.block = type;
@@ -282,6 +285,7 @@ public class Tile implements Position, QuadTreeObject, Displayable{
/** This resets the overlay! */
public void setFloor(Floor type){
var prev = this.floor;
this.floor = type;
this.overlay = (Floor)Blocks.air;
@@ -293,9 +297,13 @@ public class Tile implements Position, QuadTreeObject, Displayable{
if(build != null){
build.onProximityUpdate();
}
if(!world.isGenerating() && pathfinder != null){
if(!world.isGenerating() && pathfinder != null && !state.isEditor()){
pathfinder.updateTile(this);
}
if(!world.isGenerating() && prev != type){
Events.fire(floorChange.set(this, prev, type));
}
}
public boolean isEditorTile(){