forked from SteamWar/SteamWar
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:
@@ -20,7 +20,7 @@
|
||||
package de.steamwar.tntleague.config
|
||||
|
||||
import de.steamwar.gamecore.ArenaMode
|
||||
import de.steamwar.gamecore.config.GameRuntimeProperties
|
||||
import de.steamwar.gamecore.GameConfig
|
||||
import de.steamwar.message.SubMessage
|
||||
import de.steamwar.sql.Event
|
||||
import de.steamwar.sql.EventFight
|
||||
@@ -34,19 +34,17 @@ import org.bukkit.inventory.meta.Damageable
|
||||
import org.bukkit.inventory.meta.ItemMeta
|
||||
import java.util.*
|
||||
|
||||
private val runtimeProperties = GameRuntimeProperties.load()
|
||||
|
||||
data class TNTLeagueConfig(
|
||||
val startDelay: Int = 10,
|
||||
val gameTime: Int = 60 * 20,
|
||||
|
||||
val prices: Map<Material, Price>,
|
||||
|
||||
val blueLeader: UUID? = runtimeProperties.blueLeader,
|
||||
val redLeader: UUID? = runtimeProperties.redLeader,
|
||||
val blueLeader: UUID? = GameConfig.BlueLeader,
|
||||
val redLeader: UUID? = GameConfig.RedLeader,
|
||||
|
||||
val eventFightId: Int? = runtimeProperties.fightId.takeIf { it != 0 },
|
||||
val arenaMode: ArenaMode = ArenaMode.from(runtimeProperties),
|
||||
val eventFightId: Int? = GameConfig.EventKampfID.takeIf { it != 0 },
|
||||
val arenaMode: ArenaMode = GameConfig.mode,
|
||||
) {
|
||||
lateinit var eventFight: EventFight
|
||||
lateinit var event: Event
|
||||
|
||||
Reference in New Issue
Block a user