-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathconfig.php
71 lines (51 loc) · 2.17 KB
/
config.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
<?php
defined('INSIDE') OR exit('No direct script access allowed');
define('DEBUG', true);
class Config {
public static $gameConfig;
public static $dbConfig;
public static $pathConfig;
public static $debugModeEnabled;
private static $basepath;
private static $initialized = false;
static function init() {
// check, if already initialized
if (self::$initialized) {
return;
}
self::$initialized = true;
self::$basepath = dirname(dirname(__FILE__)) . '/';
self::$gameConfig = [
'game_name' => 'ugamela',
'copyright' => 'Copyright by ugamela © 2017',
'language' => 'en',
'max_galaxy' => 9,
'max_system' => 100,
'max_planet' => 15,
'base_income_metal' => 500,
'base_income_crystal' => 250,
'base_income_deuterium' => 0,
'base_income_energy' => 0,
'skinpath' => 'skins/Maya/'
];
self::$dbConfig = [
'host' => '127.0.0.1',
'port' => '3306',
'dbname' => 'ugamela_testing',
'user' => 'root',
'pass' => ''
];
self::$pathConfig = [
'core' => self::$basepath . 'core/',
'interfaces' => self::$basepath . 'core/interfaces/',
'controllers' => self::$basepath . 'core/controllers/',
'models' => self::$basepath . 'core/models/',
'views' => self::$basepath . 'core/views/',
'classes' => self::$basepath . 'core/classes/',
'data' => self::$basepath . 'core/classes/data/',
'units' => self::$basepath . 'core/classes/units/',
'language' => self::$basepath . 'core/language/',
'templates' => self::$basepath . 'core/templates/'
];
}
}