@@ -52,82 +52,82 @@ |
||
52 | 52 | $gc = $this; |
53 | 53 | |
54 | 54 | // Default db |
55 | - $gc->db = function ($c) { |
|
55 | + $gc->db = function($c) { |
|
56 | 56 | classSupernova::$db = $db = new \db_mysql($c); |
57 | 57 | |
58 | 58 | return $db; |
59 | 59 | }; |
60 | 60 | |
61 | - $gc->debug = function ($c) { |
|
61 | + $gc->debug = function($c) { |
|
62 | 62 | return new \debug(); |
63 | 63 | }; |
64 | 64 | |
65 | - $gc->types = function ($c) { |
|
65 | + $gc->types = function($c) { |
|
66 | 66 | return new \Common\Types(); |
67 | 67 | }; |
68 | 68 | |
69 | - $gc->cache = function ($c) { |
|
69 | + $gc->cache = function($c) { |
|
70 | 70 | return new \classCache(classSupernova::$cache_prefix); |
71 | 71 | }; |
72 | 72 | |
73 | - $gc->config = function ($c) { |
|
73 | + $gc->config = function($c) { |
|
74 | 74 | return new \classConfig(classSupernova::$cache_prefix); |
75 | 75 | }; |
76 | 76 | |
77 | - $gc->localePlayer = function (GlobalContainer $c) { |
|
77 | + $gc->localePlayer = function(GlobalContainer $c) { |
|
78 | 78 | return new \classLocale($c->config->server_locale_log_usage); |
79 | 79 | }; |
80 | 80 | |
81 | - $gc->dbGlobalRowOperator = function (GlobalContainer $c) { |
|
81 | + $gc->dbGlobalRowOperator = function(GlobalContainer $c) { |
|
82 | 82 | return new \DbRowDirectOperator($c->db); |
83 | 83 | }; |
84 | 84 | |
85 | - $gc->query = $gc->factory(function (GlobalContainer $c) { |
|
85 | + $gc->query = $gc->factory(function(GlobalContainer $c) { |
|
86 | 86 | return new \DbQueryConstructor($c->db); |
87 | 87 | }); |
88 | 88 | |
89 | - $gc->cacheOperator = function (GlobalContainer $gc) { |
|
89 | + $gc->cacheOperator = function(GlobalContainer $gc) { |
|
90 | 90 | return new \SnDbCachedOperator($gc); |
91 | 91 | }; |
92 | 92 | |
93 | 93 | $gc->snCacheClass = 'SnCache'; |
94 | - $gc->snCache = function (GlobalContainer $gc) { |
|
94 | + $gc->snCache = function(GlobalContainer $gc) { |
|
95 | 95 | return $gc->db->snCache; |
96 | 96 | }; |
97 | 97 | |
98 | 98 | $gc->buddyClass = 'Buddy\BuddyModel'; |
99 | - $gc->buddyModel = function (GlobalContainer $c) { |
|
99 | + $gc->buddyModel = function(GlobalContainer $c) { |
|
100 | 100 | return new $c->buddyClass($c); |
101 | 101 | }; |
102 | 102 | |
103 | - $gc->unitModel = function (GlobalContainer $c) { |
|
103 | + $gc->unitModel = function(GlobalContainer $c) { |
|
104 | 104 | return new \V2Unit\V2UnitModel($c); |
105 | 105 | }; |
106 | - $gc->unitList = $this->factory(function (GlobalContainer $c) { |
|
106 | + $gc->unitList = $this->factory(function(GlobalContainer $c) { |
|
107 | 107 | return new \V2Unit\V2UnitList($c); |
108 | 108 | }); |
109 | 109 | |
110 | - $gc->fleetModel = function (GlobalContainer $c) { |
|
110 | + $gc->fleetModel = function(GlobalContainer $c) { |
|
111 | 111 | return new V2FleetModel($c); |
112 | 112 | }; |
113 | 113 | |
114 | - $gc->planetRenderer = function (GlobalContainer $c) { |
|
114 | + $gc->planetRenderer = function(GlobalContainer $c) { |
|
115 | 115 | return new PlanetRenderer($c); |
116 | 116 | }; |
117 | 117 | |
118 | - $gc->fleetRenderer = function (GlobalContainer $c) { |
|
118 | + $gc->fleetRenderer = function(GlobalContainer $c) { |
|
119 | 119 | return new \FleetRenderer($c); |
120 | 120 | }; |
121 | 121 | |
122 | - $gc->groupFleet = function (GlobalContainer $c) { |
|
122 | + $gc->groupFleet = function(GlobalContainer $c) { |
|
123 | 123 | return sn_get_groups('fleet'); |
124 | 124 | }; |
125 | 125 | |
126 | - $gc->groupFleetAndMissiles = function (GlobalContainer $c) { |
|
126 | + $gc->groupFleetAndMissiles = function(GlobalContainer $c) { |
|
127 | 127 | return sn_get_groups(array('fleet', GROUP_STR_MISSILES)); |
128 | 128 | }; |
129 | 129 | |
130 | - $gc->groupRecyclers = function (GlobalContainer $c) { |
|
130 | + $gc->groupRecyclers = function(GlobalContainer $c) { |
|
131 | 131 | return sn_get_groups('flt_recyclers'); |
132 | 132 | }; |
133 | 133 |
@@ -47,7 +47,7 @@ |
||
47 | 47 | public function renderFleet(Fleet $fleet, $missionStartTimeStamp = SN_TIME_NOW, $timeMissionJob = 0) { |
48 | 48 | $unitList = $fleet->getUnitList(); |
49 | 49 | if ($unitList->unitsCount() <= 0) { |
50 | - message(classLocale::$lang['fl_err_no_ships'], classLocale::$lang['fl_error'], 'fleet' . DOT_PHP_EX, 5); |
|
50 | + message(classLocale::$lang['fl_err_no_ships'], classLocale::$lang['fl_error'], 'fleet'.DOT_PHP_EX, 5); |
|
51 | 51 | } |
52 | 52 | |
53 | 53 | $timeToReturn = $fleet->travelData['duration'] * 2 + $timeMissionJob; |