Merge branch 'main' into exposed
# Conflicts: # CommonCore/SQL/src/de/steamwar/sql/GameModeConfig.java # CommonCore/SQL/src/de/steamwar/sql/Punishment.java
This commit is contained in:
@@ -35,19 +35,11 @@ import java.util.stream.Collectors;
|
||||
public final class GameModeConfig<M, W> {
|
||||
|
||||
public static final Function<String, String> ToString = Function.identity();
|
||||
public static final Function<File, String> ToStaticWarGear = GameModeConfig::constWarGear;
|
||||
public static final Function<File, String> ToInternalName = GameModeConfig::internalName;
|
||||
public static final Function<File, String> ToStaticWarGear = __ -> "WarGear";
|
||||
public static final Function<File, String> ToInternalName = file -> file != null ? file.getName().replace(".yml", "") : "WarGear";
|
||||
public static final SimpleDateFormat DATE_FORMAT = new SimpleDateFormat("dd.MM.yyyy HH:mm");
|
||||
private static final Random random = new Random();
|
||||
|
||||
private static String constWarGear(File f) {
|
||||
return "WarGear";
|
||||
}
|
||||
|
||||
private static String internalName(File f) {
|
||||
return f.getName().replace(".yml", "");
|
||||
}
|
||||
|
||||
private static final Map<String, GameModeConfig<?, String>> byFileName;
|
||||
private static final Map<String, GameModeConfig<?, String>> byGameName;
|
||||
private static final Map<SchematicType, GameModeConfig<?, String>> bySchematicType;
|
||||
@@ -109,6 +101,14 @@ public final class GameModeConfig<M, W> {
|
||||
*/
|
||||
public final List<String> CheckQuestions;
|
||||
|
||||
/**
|
||||
* The allowed checkers to check this schematic type denoted by a list of SteamWar ids.
|
||||
* The people need the {@link UserPerm#CHECK} to be able to check though.
|
||||
*
|
||||
* @implSpec {@code []} by default -> denoting every person with {@link UserPerm#CHECK} can check it
|
||||
*/
|
||||
public final List<Integer> Checkers;
|
||||
|
||||
/**
|
||||
* Bundle for countdowns during the fight
|
||||
*/
|
||||
@@ -202,6 +202,7 @@ public final class GameModeConfig<M, W> {
|
||||
}
|
||||
|
||||
CheckQuestions = loader.getStringList("CheckQuestions");
|
||||
Checkers = loader.getIntList("Checkers");
|
||||
Times = new TimesConfig(loader.with("Times"));
|
||||
// Arena would be here to be in config order but needs Schematic.Size and EnterStages loaded afterwards
|
||||
Schematic = new SchematicConfig<>(loader.with("Schematic"));
|
||||
|
||||
Reference in New Issue
Block a user