diff --git a/core/src/mindustry/logic/LExecutor.java b/core/src/mindustry/logic/LExecutor.java index a779f99086..e13f2f437c 100644 --- a/core/src/mindustry/logic/LExecutor.java +++ b/core/src/mindustry/logic/LExecutor.java @@ -1450,6 +1450,22 @@ public class LExecutor{ } case ambientLight -> state.rules.ambientLight.fromDouble(exec.num(value)); case solarMultiplier -> state.rules.solarMultiplier = Math.max(exec.numf(value), 0f); + case ban -> { + Object cont = exec.obj(value); + if(cont instanceof Block b){ + state.rules.bannedBlocks.add(b); + }else if(cont instanceof UnitType u){ + state.rules.bannedUnits.add(u); + } + } + case unban -> { + Object cont = exec.obj(value); + if(cont instanceof Block b){ + state.rules.bannedBlocks.remove(b); + }else if(cont instanceof UnitType u){ + state.rules.bannedUnits.remove(u); + } + } case unitHealth, unitBuildSpeed, unitCost, unitDamage, blockHealth, blockDamage, buildSpeed, rtsMinSquad, rtsMinWeight -> { Team team = exec.team(p1); if(team != null){ diff --git a/core/src/mindustry/logic/LStatements.java b/core/src/mindustry/logic/LStatements.java index 3c57c9a254..5a57d5dc05 100644 --- a/core/src/mindustry/logic/LStatements.java +++ b/core/src/mindustry/logic/LStatements.java @@ -1392,6 +1392,11 @@ public class LStatements{ row(table); field(table, value, s -> value = s); } + case ban, unban -> { + table.add(" block/unit "); + + field(table, value, s -> value = s); + } default -> { table.add(" = "); diff --git a/core/src/mindustry/logic/LogicRule.java b/core/src/mindustry/logic/LogicRule.java index f7143e1976..0c05fcd033 100644 --- a/core/src/mindustry/logic/LogicRule.java +++ b/core/src/mindustry/logic/LogicRule.java @@ -15,6 +15,8 @@ public enum LogicRule{ lighting, ambientLight, solarMultiplier, + ban, + unban, //team specific buildSpeed,