forked from SteamWar/SteamWar
migrate to per material config
This commit is contained in:
@@ -411,7 +411,7 @@ public final class GameModeConfig<M, W> {
|
||||
}
|
||||
|
||||
@ToString
|
||||
public static final class ArenaConfig {
|
||||
public static final class ArenaConfig<M, W> {
|
||||
|
||||
public final boolean loaded;
|
||||
|
||||
@@ -461,18 +461,11 @@ public final class GameModeConfig<M, W> {
|
||||
public final boolean DisableSnowMelt;
|
||||
|
||||
/**
|
||||
* Disable ice forming
|
||||
* Disable the forming of certain blocks
|
||||
*
|
||||
* @implSpec {@code false} by default
|
||||
* @implSpec {@code empty} by default
|
||||
*/
|
||||
public final boolean DisableIceForm;
|
||||
|
||||
/**
|
||||
* Disable block generators such as cobblestone, stone, obsidian and basalt
|
||||
*
|
||||
* @implSpec {@code false} by default
|
||||
*/
|
||||
public final boolean DisableBlockGenerators;
|
||||
public final Set<M> BlockedFormedBlocks;
|
||||
|
||||
/**
|
||||
* Allow leaving the arena area as spectator
|
||||
@@ -495,7 +488,7 @@ public final class GameModeConfig<M, W> {
|
||||
*/
|
||||
public final boolean NoFloor;
|
||||
|
||||
private ArenaConfig(YMLWrapper loader, SchematicConfig.SizeConfig Size, List<Integer> EnterStages) {
|
||||
private ArenaConfig(YMLWrapper<M,W> loader, SchematicConfig.SizeConfig Size, List<Integer> EnterStages) {
|
||||
loaded = loader.canLoad();
|
||||
WaterDepth = loader.getInt("WaterDepth", 0);
|
||||
WaterDamage = loader.getBoolean("WaterDamage", true);
|
||||
@@ -504,8 +497,11 @@ public final class GameModeConfig<M, W> {
|
||||
BorderFromSchematic = loader.getInt("BorderFromSchematic", 21);
|
||||
GroundWalkable = loader.getBoolean("GroundWalkable", true);
|
||||
DisableSnowMelt = loader.getBoolean("DisableSnowMelt", false);
|
||||
DisableIceForm = loader.getBoolean("DisableIceForm", false);
|
||||
DisableBlockGenerators = loader.getBoolean("DisableBlockGenerators", false);
|
||||
Set<M> blockedFormedBlocks = new HashSet<>(loader.getMaterialList("BlockedFormedBlocks"));
|
||||
if (loader.getBoolean("DisableIceForm", false)) {
|
||||
blockedFormedBlocks.add(loader.materialMapper.apply("ICE"));
|
||||
}
|
||||
BlockedFormedBlocks = Collections.unmodifiableSet(blockedFormedBlocks);
|
||||
Leaveable = loader.getBoolean("Leaveable", false);
|
||||
AllowMissiles = loader.getBoolean("AllowMissiles", !EnterStages.isEmpty());
|
||||
NoFloor = loader.getBoolean("NoFloor", false);
|
||||
|
||||
Reference in New Issue
Block a user