From 5dd97ad8fd053ffd0521cfa2e550324c2c33ea29 Mon Sep 17 00:00:00 2001 From: slawkens Date: Sun, 19 Apr 2026 16:29:20 +0200 Subject: [PATCH] Add more configs for ots-info site [skip ci] --- system/src/Server/TOML/Config.php | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/system/src/Server/TOML/Config.php b/system/src/Server/TOML/Config.php index c29d78e8..46f76576 100644 --- a/system/src/Server/TOML/Config.php +++ b/system/src/Server/TOML/Config.php @@ -15,7 +15,7 @@ class Config $files = glob($path . '*.toml'); // filter files we don't need - $ignore = ['account_manager', 'gameplay', 'groups', 'mounts', 'object_pools', 'outfits', 'scripts']; + $ignore = ['account_manager', 'groups', 'mounts', 'object_pools', 'outfits', 'scripts']; $files = array_filter($files, function ($file) use ($ignore) { foreach ($ignore as $item) { if (str_contains($file, $item)) { @@ -41,10 +41,24 @@ class Config } } + $this->init(); + } + + private function init(): void + { $this->config['serverName'] = $this->config['server']['identity']['name'] ?? 'Unknown'; $this->config['freePremium'] = $this->config['server']['accounts']['free_premium'] ?? false; $this->config['ip'] = $this->config['server']['network']['ip'] ?? '127.0.0.1'; $this->config['worldType'] = $this->config['server']['world']['type'] ?? 'unknown'; + $this->config['houseRentPeriod'] = $this->config['server']['houses']['rent_period'] ?? 'never'; + $this->config['pzLocked'] = $this->config['combat']['skull']['pz_locked'] ?? 60 * 1000; + $this->config['url'] = $this->config['server']['identity']['url'] ?? 'http://localhost'; + $this->config['protectionLevel'] = $this->config['server']['pvp']['protection_level'] ?? 0; + $this->config['rateExp'] = $this->config['rates']['rates']['experience'] ?? 1; + $this->config['rateMagic'] = $this->config['rates']['rates']['magic'] ?? 1; + $this->config['rateSkill'] = $this->config['rates']['rates']['skill'] ?? 1; + $this->config['rateLoot'] = $this->config['rates']['rates']['loot'] ?? 1; + $this->config['rateSpawn'] = $this->config['rates']['rates']['spawn'] ?? 1; } public function get(): array {