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
# Allow leaving the arena area as spectator
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:
# The size of the schematics
@ -104,6 +106,7 @@ WinConditions: # defaults to none if missing
# - WHITELIST_PERCENT
# - RELATIVE_PERCENT
# - POINTS
# - POINTS_AIRSHIP
# - WATER_TECH_KO
# - TIME_TECH_KO

Datei anzeigen

@ -75,6 +75,7 @@ public class Config {
public static final boolean GroundWalkable;
public static final boolean DisableSnowMelt;
public static final boolean ArenaLeaveable;
public static final boolean AllowMissiles;
//schematic parameter
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()));
EnterStages = Collections.unmodifiableList(config.getIntegerList("EnterStages"));
AllowMissiles = config.getBoolean("Arena.AllowMissiles", !EnterStages.isEmpty());
KitFile = config.getString("Kits.File", "kits.yml");
MemberDefault = config.getString("Kits.MemberDefault", "default");

Datei anzeigen

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