Move arena runtime configuration into GameCore

- Replace FightSystem runtime properties with shared GameConfig
- Update dependent modules, commands, states, and tests
This commit is contained in:
2026-07-24 12:51:03 +02:00
parent f8cda32119
commit 12e085600e
45 changed files with 216 additions and 265 deletions
@@ -20,7 +20,7 @@
package de.steamwar.towerrun.config;
import de.steamwar.gamecore.ArenaMode;
import de.steamwar.gamecore.config.GameRuntimeProperties;
import de.steamwar.gamecore.GameConfig;
import de.steamwar.sql.Event;
import de.steamwar.sql.EventFight;
import de.steamwar.towerrun.TowerRun;
@@ -37,8 +37,7 @@ import java.util.stream.Collectors;
@UtilityClass
public class Config {
public static final GameRuntimeProperties RUNTIME_PROPERTIES = GameRuntimeProperties.load();
public static final ArenaMode MODE = ArenaMode.from(RUNTIME_PROPERTIES);
public static final ArenaMode MODE = GameConfig.mode;
public static final int MIN_PLAYERS;
public static final int LOBBY_TIMER;
@@ -69,7 +68,7 @@ public class Config {
GAME_ESCAPE_TIMER = config.getInt("gameEscapeTimer", 60);
DESTROYABLE_BLOCKS = EnumSet.copyOf(config.getStringList("destroyable").stream().map(Material::valueOf).collect(Collectors.toSet()));
EVENT_KAMPF_ID = RUNTIME_PROPERTIES.getFightId();
EVENT_KAMPF_ID = GameConfig.EventKampfID;
if (event()) {
EVENT_FIGHT = EventFight.byId(EVENT_KAMPF_ID);