Fixed #8587
This commit is contained in:
@@ -477,11 +477,15 @@ public abstract class InputHandler implements InputProcessor, GestureListener{
|
||||
if(build == null) return;
|
||||
if(net.server() && (!Units.canInteract(player, build) ||
|
||||
!netServer.admins.allowAction(player, ActionType.configure, build.tile, action -> action.config = value))){
|
||||
var packet = new TileConfigCallPacket(); //undo the config on the client
|
||||
packet.player = player;
|
||||
packet.build = build;
|
||||
packet.value = build.config();
|
||||
player.con.send(packet, true);
|
||||
|
||||
if(player.con != null){
|
||||
var packet = new TileConfigCallPacket(); //undo the config on the client
|
||||
packet.player = player;
|
||||
packet.build = build;
|
||||
packet.value = build.config();
|
||||
player.con.send(packet, true);
|
||||
}
|
||||
|
||||
throw new ValidateException(player, "Player cannot configure a tile.");
|
||||
}
|
||||
build.configured(player == null || player.dead() ? null : player.unit(), value);
|
||||
|
||||
@@ -16,7 +16,6 @@ import mindustry.world.*;
|
||||
import mindustry.world.blocks.defense.*;
|
||||
import mindustry.world.blocks.payloads.*;
|
||||
import mindustry.world.blocks.power.*;
|
||||
import mindustry.world.blocks.power.PowerNode.*;
|
||||
import mindustry.world.blocks.production.*;
|
||||
import mindustry.world.meta.*;
|
||||
|
||||
@@ -173,7 +172,7 @@ public class BaseGenerator{
|
||||
|
||||
for(Tile tile : tiles){
|
||||
if(tile.isCenter() && tile.block() instanceof PowerNode && tile.team() == state.rules.waveTeam){
|
||||
tile.build.configure(new Point2[0]);
|
||||
tile.build.configureAny(new Point2[0]);
|
||||
tile.build.placed();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user