- Move shared arena-mode abstractions into GameCore - Adapt fight countdowns and APIs to the shared model - Add SteamWar issue audit workflow and SQL language settings
1.4 KiB
1.4 KiB
GameCore
GameCore is the Kotlin runtime library shared by SteamWar game-mode plugins. Its implementation is based on FightSystem, the most exhaustive game mode, and contains the mechanics that do not depend on a specific arena:
- restartable Bukkit countdown scheduling, FightSystem milestone behavior, message/sound/level presentation policy, and shared skip behavior;
- generic team contracts, team lookup, readiness, and opposite-team handling;
- reusable winner/draw results and score/last-remaining evaluation;
- the complete state-dependent lifecycle (one-shots, tasks, listeners, commands, and countdowns);
- the FightSystem arena modes and typed JVM runtime properties;
- observable, generic game-state transitions.
GameCore intentionally does not define a game-state enum. Each consumer supplies
its own enum to GameStateMachine<S> and the generic state-dependent classes, so
each game mode controls its valid states while sharing the lifecycle behavior.
enum class State { WAITING, RUNNING, END }
val lifecycle = GameStateMachine(State.WAITING)
StateDependentListener(
lifecycle,
true,
setOf(State.RUNNING),
plugin,
ingameListener,
)
FightSystem, MissileWars, TNTLeague, and TowerRun retain their own messages, inventories, listeners, schematics, and concrete win rules. They depend on the GameCore plugin at runtime; GameCore itself depends on KotlinCore.