From 78b522d57a9ebc691e075523910d7cdaa06b6493 Mon Sep 17 00:00:00 2001 From: historia <[not public]> Date: Wed, 1 Jul 2026 18:36:21 -0400 Subject: feat: shop system removed from talk system, added per-item restock and variable pricing --- internal/config/config.go | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'internal/config') 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: "", -- cgit v1.2.3