diff options
| author | historia <[not public]> | 2026-07-01 18:36:21 -0400 |
|---|---|---|
| committer | historia <[not public]> | 2026-07-01 18:36:21 -0400 |
| commit | 78b522d57a9ebc691e075523910d7cdaa06b6493 (patch) | |
| tree | b2a68397e0cecc5abb56e5ae451c05a9435cc5fe /internal/config | |
| parent | e6b4cb9f5816c6ee239233bc85f74ee446a161c2 (diff) | |
| download | thehouseoficarus-78b522d57a9ebc691e075523910d7cdaa06b6493.tar.gz | |
feat: shop system removed from talk system, added per-item restock and variable pricing
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: "", |
