Added hidden rule for environment deconstruction / Increased impact reactor liquid capacity
This commit is contained in:
@@ -2433,6 +2433,7 @@ public class Blocks{
|
||||
itemDuration = 140f;
|
||||
ambientSound = Sounds.pulse;
|
||||
ambientSoundVolume = 0.07f;
|
||||
liquidCapacity = 60f;
|
||||
|
||||
consumePower(25f);
|
||||
consumeItem(Items.blastCompound);
|
||||
|
||||
@@ -105,6 +105,8 @@ public class Rules{
|
||||
public boolean coreDestroyClear = false;
|
||||
/** If true, banned blocks are hidden from the build menu. */
|
||||
public boolean hideBannedBlocks = false;
|
||||
/** If true, most blocks (including environmental walls) can be deconstructed. This is only meant to be used internally in sandbox/test maps. */
|
||||
public boolean allowEnvironmentDeconstruct = false;
|
||||
/** If true, bannedBlocks becomes a whitelist. */
|
||||
public boolean blockWhitelist = false;
|
||||
/** If true, bannedUnits becomes a whitelist. */
|
||||
|
||||
@@ -281,9 +281,9 @@ public class Build{
|
||||
return false;
|
||||
}
|
||||
|
||||
/** Returns whether the tile at this position is breakable by this team */
|
||||
/** @return whether the tile at this position is breakable by this team */
|
||||
public static boolean validBreak(Team team, int x, int y){
|
||||
Tile tile = world.tile(x, y);
|
||||
return tile != null && tile.block().canBreak(tile) && tile.breakable() && tile.interactable(team);
|
||||
return tile != null && tile.block() != Blocks.air && (tile.block().canBreak(tile) && (tile.breakable() || state.rules.allowEnvironmentDeconstruct)) && tile.interactable(team);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user