diff options
Diffstat (limited to 'internal/config')
| -rw-r--r-- | internal/config/config.go | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/internal/config/config.go b/internal/config/config.go index 9505cbb..9afc2d1 100644 --- a/internal/config/config.go +++ b/internal/config/config.go @@ -10,6 +10,7 @@ type Config struct { TickLength int `yaml:"tick_length"` StartingRoom int `yaml:"starting_room"` StartupValidation ValidationConfig `yaml:"startup_validation"` + GameConstants GameConstants `yaml:"game_constants"` DefaultColors ColorsConfig `yaml:"default_colors"` TLS TLSConfig `yaml:"tls"` Telnet TelnetConfig `yaml:"telnet"` @@ -20,6 +21,14 @@ type Config struct { AdminHTTPS AdminHTTPSConfig `yaml:"admin_https"` } +// GameConstants holds tunable game-wide numbers that would otherwise be +// hardcoded in the engine. +type GameConstants struct { + // ShopDefaultRestock is the fallback restock interval (in ticks) for a shop + // item that does not set its own restock_ticks. + ShopDefaultRestock float64 `yaml:"shop_default_restock"` +} + type ColorsConfig map[string]string func DefaultColors() ColorsConfig { @@ -118,6 +127,9 @@ func Default() *Config { RootRooms: []int{1}, IgnoreUnreachable: []int{}, }, + GameConstants: GameConstants{ + ShopDefaultRestock: 1000, + }, DefaultColors: DefaultColors(), TLS: TLSConfig{ CertFile: "", |
