mirror of
https://github.com/slawkens/myaac.git
synced 2026-04-23 02:43:31 +02:00
Add more configs for ots-info site [skip ci]
This commit is contained in:
@@ -15,7 +15,7 @@ class Config
|
|||||||
$files = glob($path . '*.toml');
|
$files = glob($path . '*.toml');
|
||||||
|
|
||||||
// filter files we don't need
|
// 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) {
|
$files = array_filter($files, function ($file) use ($ignore) {
|
||||||
foreach ($ignore as $item) {
|
foreach ($ignore as $item) {
|
||||||
if (str_contains($file, $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['serverName'] = $this->config['server']['identity']['name'] ?? 'Unknown';
|
||||||
$this->config['freePremium'] = $this->config['server']['accounts']['free_premium'] ?? false;
|
$this->config['freePremium'] = $this->config['server']['accounts']['free_premium'] ?? false;
|
||||||
$this->config['ip'] = $this->config['server']['network']['ip'] ?? '127.0.0.1';
|
$this->config['ip'] = $this->config['server']['network']['ip'] ?? '127.0.0.1';
|
||||||
$this->config['worldType'] = $this->config['server']['world']['type'] ?? 'unknown';
|
$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 {
|
public function get(): array {
|
||||||
|
|||||||
Reference in New Issue
Block a user