Don't configure processor when no changes are made
This commit is contained in:
@@ -45,7 +45,10 @@ public class Build{
|
||||
build.setDeconstruct(previous);
|
||||
build.prevBuild = prevBuild;
|
||||
tile.build.health = tile.build.maxHealth * prevPercent;
|
||||
if(unit != null && unit.isPlayer()) tile.build.lastAccessed = unit.getPlayer().name;
|
||||
|
||||
if(unit != null && unit.getControllerName() != null){
|
||||
tile.build.lastAccessed = unit.getControllerName();
|
||||
}
|
||||
|
||||
Core.app.post(() -> Events.fire(new BlockBuildBeginEvent(tile, team, unit, true)));
|
||||
}
|
||||
@@ -64,7 +67,7 @@ public class Build{
|
||||
|
||||
//auto-rotate the block to the correct orientation and bail out
|
||||
if(tile.team() == team && tile.block == result && tile.build != null && tile.block.quickRotate){
|
||||
if(unit != null && unit.isPlayer()) tile.build.lastAccessed = unit.getPlayer().name;
|
||||
if(unit != null && unit.getControllerName() != null) tile.build.lastAccessed = unit.getControllerName();
|
||||
tile.build.rotation = Mathf.mod(rotation, 4);
|
||||
tile.build.updateProximity();
|
||||
tile.build.noSleep();
|
||||
@@ -90,7 +93,7 @@ public class Build{
|
||||
|
||||
build.setConstruct(previous.size == sub.size ? previous : Blocks.air, result);
|
||||
build.prevBuild = prevBuild;
|
||||
if(unit != null && unit.isPlayer()) build.lastAccessed = unit.getPlayer().name;
|
||||
if(unit != null && unit.getControllerName() != null) build.lastAccessed = unit.getControllerName();
|
||||
|
||||
result.placeBegan(tile, previous);
|
||||
|
||||
|
||||
@@ -78,8 +78,8 @@ public class ConstructBlock extends Block{
|
||||
tile.build.overwrote(prev);
|
||||
}
|
||||
|
||||
if(builder != null && builder.isPlayer()){
|
||||
tile.build.lastAccessed = builder.getPlayer().name;
|
||||
if(builder != null && builder.getControllerName() != null){
|
||||
tile.build.lastAccessed = builder.getControllerName();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -477,9 +477,7 @@ public class LogicBlock extends Block{
|
||||
@Override
|
||||
public void buildConfiguration(Table table){
|
||||
table.button(Icon.pencil, Styles.clearTransi, () -> {
|
||||
Vars.ui.logic.show(code, code -> {
|
||||
configure(compress(code, relativeConnections()));
|
||||
});
|
||||
Vars.ui.logic.show(code, code -> configure(compress(code, relativeConnections())));
|
||||
}).size(40);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user