Added hidden rule for environment deconstruction / Increased impact reactor liquid capacity

This commit is contained in:
Anuken
2024-01-20 20:45:15 -05:00
parent 367a20c891
commit 7d8aea77d8
3 changed files with 5 additions and 2 deletions

View File

@@ -2433,6 +2433,7 @@ public class Blocks{
itemDuration = 140f;
ambientSound = Sounds.pulse;
ambientSoundVolume = 0.07f;
liquidCapacity = 60f;
consumePower(25f);
consumeItem(Items.blastCompound);

View File

@@ -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. */

View File

@@ -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);
}
}