aboutsummaryrefslogtreecommitdiff
path: root/internal/game/game.go
diff options
context:
space:
mode:
Diffstat (limited to 'internal/game/game.go')
-rw-r--r--internal/game/game.go30
1 files changed, 16 insertions, 14 deletions
diff --git a/internal/game/game.go b/internal/game/game.go
index eed61f5..700877b 100644
--- a/internal/game/game.go
+++ b/internal/game/game.go
@@ -38,9 +38,10 @@ type Deps struct {
MobStore *world.MobStore
CraftIndex *CraftIndex
CourseStore *CourseStore
- Ticks *engine.Engine
- ColorConfig *config.ColorsConfig
- DataDir string
+ Ticks *engine.Engine
+ ColorConfig *config.ColorsConfig
+ ConstantColorConfig *config.ColorsConfig
+ DataDir string
}
// Game is the central orchestrator: it owns the data stores (via the embedded
@@ -75,19 +76,20 @@ type Game struct {
shutdownMu sync.Mutex
}
-func New(dataDir string, colorConfig *config.ColorsConfig, valConfig config.ValidationConfig, startingRoom int) *Game {
+func New(dataDir string, colorConfig *config.ColorsConfig, constantColorConfig *config.ColorsConfig, valConfig config.ValidationConfig, startingRoom int) *Game {
g := &Game{
Deps: Deps{
- World: world.New(dataDir),
- ObjectStore: object.NewObjectStore(dataDir),
- ItemStore: item.NewItemStore(dataDir),
- AccountStore: player.NewAccountStore(dataDir),
- MobStore: world.NewMobStore(dataDir),
- CraftIndex: NewCraftIndex(),
- CourseStore: NewCourseStore(dataDir),
- Ticks: engine.New(),
- ColorConfig: colorConfig,
- DataDir: dataDir,
+ World: world.New(dataDir),
+ ObjectStore: object.NewObjectStore(dataDir),
+ ItemStore: item.NewItemStore(dataDir),
+ AccountStore: player.NewAccountStore(dataDir),
+ MobStore: world.NewMobStore(dataDir),
+ CraftIndex: NewCraftIndex(),
+ CourseStore: NewCourseStore(dataDir),
+ Ticks: engine.New(),
+ ColorConfig: colorConfig,
+ ConstantColorConfig: constantColorConfig,
+ DataDir: dataDir,
},
GlobalFlags: NewGlobalFlagStore(),
Combat: combat.NewTracker(),