SteamWar/FightSystem
Archiviert
13
1

Merge pull request 'Update Config' (#352) from FixMissiles into master
Alle Prüfungen waren erfolgreich
SteamWarCI Build successful

Reviewed-on: #352
Reviewed-by: Lixfel <lixfel@steamwar.de>
Dieser Commit ist enthalten in:
Lixfel 2022-06-07 15:24:10 +02:00
Commit c921228b20
3 geänderte Dateien mit 7 neuen und 2 gelöschten Zeilen

Datei anzeigen

@ -45,6 +45,8 @@ Arena:
DisableSnowMelt: false # defaults to false if missing DisableSnowMelt: false # defaults to false if missing
# Allow leaving the arena area as spectator # Allow leaving the arena area as spectator
Leaveable: false # defaults to false if missing Leaveable: false # defaults to false if missing
# Allow missiles to fly to the enemy and not stop at the schem border.
AllowMissiles: false # defaults to true if EnterStages are present otherwise 'false'
Schematic: Schematic:
# The size of the schematics # The size of the schematics
@ -104,6 +106,7 @@ WinConditions: # defaults to none if missing
# - WHITELIST_PERCENT # - WHITELIST_PERCENT
# - RELATIVE_PERCENT # - RELATIVE_PERCENT
# - POINTS # - POINTS
# - POINTS_AIRSHIP
# - WATER_TECH_KO # - WATER_TECH_KO
# - TIME_TECH_KO # - TIME_TECH_KO

Datei anzeigen

@ -75,6 +75,7 @@ public class Config {
public static final boolean GroundWalkable; public static final boolean GroundWalkable;
public static final boolean DisableSnowMelt; public static final boolean DisableSnowMelt;
public static final boolean ArenaLeaveable; public static final boolean ArenaLeaveable;
public static final boolean AllowMissiles;
//schematic parameter //schematic parameter
public static final boolean RanksEnabled; public static final boolean RanksEnabled;
@ -194,6 +195,7 @@ public class Config {
PercentBlocks = Collections.unmodifiableSet(config.getStringList("WinConditionParams.Blocks").stream().map(Material::valueOf).collect(Collectors.toSet())); PercentBlocks = Collections.unmodifiableSet(config.getStringList("WinConditionParams.Blocks").stream().map(Material::valueOf).collect(Collectors.toSet()));
EnterStages = Collections.unmodifiableList(config.getIntegerList("EnterStages")); EnterStages = Collections.unmodifiableList(config.getIntegerList("EnterStages"));
AllowMissiles = config.getBoolean("Arena.AllowMissiles", !EnterStages.isEmpty());
KitFile = config.getString("Kits.File", "kits.yml"); KitFile = config.getString("Kits.File", "kits.yml");
MemberDefault = config.getString("Kits.MemberDefault", "default"); MemberDefault = config.getString("Kits.MemberDefault", "default");

Datei anzeigen

@ -36,8 +36,8 @@ public class PistonListener implements Listener {
public PistonListener() { public PistonListener() {
//Wenn Entern aktiv ist, sollen Raketen etc. entern können //Wenn Entern aktiv ist, sollen Raketen etc. entern können
if(!ArenaMode.Check.contains(Config.mode)) { if(!ArenaMode.Check.contains(Config.mode)) {
new StateDependentListener(Config.EnterStages.isEmpty(), FightState.All, this); new StateDependentListener(!Config.AllowMissiles, FightState.All, this);
new StateDependentListener(!Config.EnterStages.isEmpty(), FightState.Setup, this); new StateDependentListener(Config.AllowMissiles, FightState.Setup, this);
} }
} }