We could not synchronize checks via GitHub's checks API since Scrutinizer's GitHub App is not installed for this repository.
@@ -40,7 +40,7 @@ discard block |
||
40 | 40 | /** |
41 | 41 | * Access properties of structures that this planet type can build. |
42 | 42 | */ |
43 | - public function structureTypes($structureID=false) { |
|
43 | + public function structureTypes($structureID = false) { |
|
44 | 44 | if (!isset($this->structures)) { |
45 | 45 | foreach (static::STRUCTURES as $ID => $Info) { |
46 | 46 | $this->structures[$ID] = new SmrPlanetStructureType($ID, $Info); |
@@ -77,12 +77,12 @@ discard block |
||
77 | 77 | 'exp_gain' => 540, |
78 | 78 | ], |
79 | 79 | ]; |
80 | - public function name() { return "Terran Planet"; } |
|
81 | - public function imageLink() { return "images/planet1.png"; } |
|
82 | - public function description() { return "A lush world, with forests, seas, sweeping meadows, and indigenous lifeforms."; } |
|
80 | + public function name() { return "Terran Planet"; } |
|
81 | + public function imageLink() { return "images/planet1.png"; } |
|
82 | + public function description() { return "A lush world, with forests, seas, sweeping meadows, and indigenous lifeforms."; } |
|
83 | 83 | public function maxAttackers() { return 10; } |
84 | - public function maxLanded() { return self::MAX_LANDED_UNLIMITED; } |
|
85 | - public function menuOptions() { return self::DEFAULT_MENU_OPTIONS; } |
|
84 | + public function maxLanded() { return self::MAX_LANDED_UNLIMITED; } |
|
85 | + public function menuOptions() { return self::DEFAULT_MENU_OPTIONS; } |
|
86 | 86 | } |
87 | 87 | |
88 | 88 | class AridPlanet extends SmrPlanetType { |
@@ -106,12 +106,12 @@ discard block |
||
106 | 106 | 'exp_gain' => 180, |
107 | 107 | ], |
108 | 108 | ]; |
109 | - public function name() { return "Arid Planet"; } |
|
110 | - public function imageLink() { return "images/planet2.png"; } |
|
111 | - public function description() { return "A world mostly devoid of surface water, but capable of supporting life."; } |
|
109 | + public function name() { return "Arid Planet"; } |
|
110 | + public function imageLink() { return "images/planet2.png"; } |
|
111 | + public function description() { return "A world mostly devoid of surface water, but capable of supporting life."; } |
|
112 | 112 | public function maxAttackers() { return 5; } |
113 | - public function maxLanded() { return 5; } |
|
114 | - public function menuOptions() { return ['CONSTRUCTION', 'DEFENSE', 'STOCKPILE', 'OWNERSHIP']; } |
|
113 | + public function maxLanded() { return 5; } |
|
114 | + public function menuOptions() { return ['CONSTRUCTION', 'DEFENSE', 'STOCKPILE', 'OWNERSHIP']; } |
|
115 | 115 | } |
116 | 116 | |
117 | 117 | class DwarfPlanet extends SmrPlanetType { |
@@ -135,12 +135,12 @@ discard block |
||
135 | 135 | 'exp_gain' => 540, |
136 | 136 | ], |
137 | 137 | ]; |
138 | - public function name() { return "Dwarf Planet"; } |
|
139 | - public function imageLink() { return "images/planet3.png"; } |
|
140 | - public function description() { return "A smaller than usual planet, with no native life present."; } |
|
138 | + public function name() { return "Dwarf Planet"; } |
|
139 | + public function imageLink() { return "images/planet3.png"; } |
|
140 | + public function description() { return "A smaller than usual planet, with no native life present."; } |
|
141 | 141 | public function maxAttackers() { return 5; } |
142 | - public function maxLanded() { return self::MAX_LANDED_UNLIMITED; } |
|
143 | - public function menuOptions() { return self::DEFAULT_MENU_OPTIONS; } |
|
142 | + public function maxLanded() { return self::MAX_LANDED_UNLIMITED; } |
|
143 | + public function menuOptions() { return self::DEFAULT_MENU_OPTIONS; } |
|
144 | 144 | } |
145 | 145 | |
146 | 146 | class ProtoPlanet extends SmrPlanetType { |
@@ -170,12 +170,12 @@ discard block |
||
170 | 170 | 'exp_gain' => 540, |
171 | 171 | ], |
172 | 172 | ]; |
173 | - public function name() { return "Protoplanet"; } |
|
174 | - public function imageLink() { return "images/planet5.png"; } |
|
175 | - public function description() { return "A developing planet, not yet able to support the infrastructure of advanced technologies."; } |
|
173 | + public function name() { return "Protoplanet"; } |
|
174 | + public function imageLink() { return "images/planet5.png"; } |
|
175 | + public function description() { return "A developing planet, not yet able to support the infrastructure of advanced technologies."; } |
|
176 | 176 | public function maxAttackers() { return 5; } |
177 | - public function maxLanded() { return 5; } |
|
178 | - public function menuOptions() { return self::DEFAULT_MENU_OPTIONS; } |
|
177 | + public function maxLanded() { return 5; } |
|
178 | + public function menuOptions() { return self::DEFAULT_MENU_OPTIONS; } |
|
179 | 179 | } |
180 | 180 | |
181 | 181 | class DefenseWorld extends SmrPlanetType { |
@@ -205,10 +205,10 @@ discard block |
||
205 | 205 | 'exp_gain' => 9, |
206 | 206 | ], |
207 | 207 | ]; |
208 | - public function name() { return "Defense World"; } |
|
209 | - public function imageLink() { return "images/planet4.png"; } |
|
210 | - public function description() { return "A fully armed and operational battle station loaded with excessive firepower."; } |
|
208 | + public function name() { return "Defense World"; } |
|
209 | + public function imageLink() { return "images/planet4.png"; } |
|
210 | + public function description() { return "A fully armed and operational battle station loaded with excessive firepower."; } |
|
211 | 211 | public function maxAttackers() { return 10; } |
212 | - public function maxLanded() { return self::MAX_LANDED_UNLIMITED; } |
|
213 | - public function menuOptions() { return self::DEFAULT_MENU_OPTIONS; } |
|
212 | + public function maxLanded() { return self::MAX_LANDED_UNLIMITED; } |
|
213 | + public function menuOptions() { return self::DEFAULT_MENU_OPTIONS; } |
|
214 | 214 | } |
@@ -960,7 +960,7 @@ |
||
960 | 960 | |
961 | 961 | public function calculateExperiencePercent($idealPrice, $offerPrice, $bargainPrice, $transactionType) { |
962 | 962 | if (($transactionType == 'Sell' && $bargainPrice < $offerPrice) || |
963 | - ($transactionType == 'Buy' && $bargainPrice > $offerPrice)) { |
|
963 | + ($transactionType == 'Buy' && $bargainPrice > $offerPrice)) { |
|
964 | 964 | return 0; |
965 | 965 | } |
966 | 966 | if ($bargainPrice == $idealPrice || $transactionType == 'Steal') { |
@@ -1180,7 +1180,7 @@ discard block |
||
1180 | 1180 | do { |
1181 | 1181 | $targetPlayer = $targetPlayers[array_rand($targetPlayers)]; |
1182 | 1182 | } while ($results['TotalShotsPerTargetPlayer'][$targetPlayer->getAccountID()] > min($results['TotalShotsPerTargetPlayer'])); |
1183 | - $results['Weapons'][$orderID] =& $weapon->shootPlayerAsPort($this, $targetPlayer); |
|
1183 | + $results['Weapons'][$orderID] = & $weapon->shootPlayerAsPort($this, $targetPlayer); |
|
1184 | 1184 | $results['TotalShotsPerTargetPlayer'][$targetPlayer->getAccountID()]++; |
1185 | 1185 | if ($results['Weapons'][$orderID]['Hit']) { |
1186 | 1186 | $results['TotalDamage'] += $results['Weapons'][$orderID]['ActualDamage']['TotalDamage']; |
@@ -1189,7 +1189,7 @@ discard block |
||
1189 | 1189 | } |
1190 | 1190 | if ($this->hasCDs()) { |
1191 | 1191 | $thisCDs = new SmrCombatDrones($this->getGameID(), $this->getCDs(), true); |
1192 | - $results['Drones'] =& $thisCDs->shootPlayerAsPort($this, $targetPlayers[array_rand($targetPlayers)]); |
|
1192 | + $results['Drones'] = & $thisCDs->shootPlayerAsPort($this, $targetPlayers[array_rand($targetPlayers)]); |
|
1193 | 1193 | $results['TotalDamage'] += $results['Drones']['ActualDamage']['TotalDamage']; |
1194 | 1194 | $results['TotalDamagePerTargetPlayer'][$results['Drones']['TargetPlayer']->getAccountID()] += $results['Drones']['ActualDamage']['TotalDamage']; |
1195 | 1195 | } |
@@ -707,7 +707,7 @@ |
||
707 | 707 | if ($buildingTypeID === false) { |
708 | 708 | $structs = $this->typeInfo::STRUCTURES; |
709 | 709 | return array_combine(array_keys($structs), |
710 | - array_column($structs, 'max_amount')); |
|
710 | + array_column($structs, 'max_amount')); |
|
711 | 711 | } |
712 | 712 | return $this->getStructureTypes($buildingTypeID)->maxAmount(); |
713 | 713 | } |
@@ -1146,7 +1146,7 @@ discard block |
||
1146 | 1146 | $results['DeadBeforeShot'] = false; |
1147 | 1147 | $weapons = $this->getWeapons(); |
1148 | 1148 | foreach ($weapons as $orderID => $weapon) { |
1149 | - $results['Weapons'][$orderID] =& $weapon->shootPlayerAsPlanet($this, $targetPlayers[array_rand($targetPlayers)]); |
|
1149 | + $results['Weapons'][$orderID] = & $weapon->shootPlayerAsPlanet($this, $targetPlayers[array_rand($targetPlayers)]); |
|
1150 | 1150 | if ($results['Weapons'][$orderID]['Hit']) { |
1151 | 1151 | $results['TotalDamage'] += $results['Weapons'][$orderID]['ActualDamage']['TotalDamage']; |
1152 | 1152 | $results['TotalDamagePerTargetPlayer'][$results['Weapons'][$orderID]['TargetPlayer']->getAccountID()] += $results['Weapons'][$orderID]['ActualDamage']['TotalDamage']; |
@@ -1154,7 +1154,7 @@ discard block |
||
1154 | 1154 | } |
1155 | 1155 | if ($this->hasCDs()) { |
1156 | 1156 | $thisCDs = new SmrCombatDrones($this->getGameID(), $this->getCDs(), true); |
1157 | - $results['Drones'] =& $thisCDs->shootPlayerAsPlanet($this, $targetPlayers[array_rand($targetPlayers)]); |
|
1157 | + $results['Drones'] = & $thisCDs->shootPlayerAsPlanet($this, $targetPlayers[array_rand($targetPlayers)]); |
|
1158 | 1158 | $results['TotalDamage'] += $results['Drones']['ActualDamage']['TotalDamage']; |
1159 | 1159 | $results['TotalDamagePerTargetPlayer'][$results['Drones']['TargetPlayer']->getAccountID()] += $results['Drones']['ActualDamage']['TotalDamage']; |
1160 | 1160 | } |
@@ -197,7 +197,7 @@ |
||
197 | 197 | while ($this->db->nextRecord()) { |
198 | 198 | try { |
199 | 199 | $otherPlayer = SmrPlayer::getPlayer($this->db->getInt('from_account_id'), |
200 | - $this->getGameID(), $forceUpdate); |
|
200 | + $this->getGameID(), $forceUpdate); |
|
201 | 201 | } catch (PlayerNotFoundException $e) { |
202 | 202 | // Skip players that have not joined this game |
203 | 203 | continue; |
@@ -207,7 +207,7 @@ discard block |
||
207 | 207 | /** |
208 | 208 | * Insert a new player into the database. Returns the new player object. |
209 | 209 | */ |
210 | - public static function createPlayer($accountID, $gameID, $playerName, $raceID, $isNewbie, $npc=false) { |
|
210 | + public static function createPlayer($accountID, $gameID, $playerName, $raceID, $isNewbie, $npc = false) { |
|
211 | 211 | // Put the player in a sector with an HQ |
212 | 212 | $startSectorID = self::getHome($gameID, $raceID); |
213 | 213 | |
@@ -1163,13 +1163,13 @@ discard block |
||
1163 | 1163 | $this->db->query('SELECT type,amount FROM player_hof WHERE ' . $this->SQL); |
1164 | 1164 | $this->HOF = array(); |
1165 | 1165 | while ($this->db->nextRecord()) { |
1166 | - $hof =& $this->HOF; |
|
1166 | + $hof = & $this->HOF; |
|
1167 | 1167 | $typeList = explode(':', $this->db->getField('type')); |
1168 | 1168 | foreach ($typeList as $type) { |
1169 | 1169 | if (!isset($hof[$type])) { |
1170 | 1170 | $hof[$type] = array(); |
1171 | 1171 | } |
1172 | - $hof =& $hof[$type]; |
|
1172 | + $hof = & $hof[$type]; |
|
1173 | 1173 | } |
1174 | 1174 | $hof = $this->db->getFloat('amount'); |
1175 | 1175 | } |
@@ -1611,7 +1611,7 @@ discard block |
||
1611 | 1611 | create_error('The saved sector must be in the box!'); |
1612 | 1612 | } |
1613 | 1613 | |
1614 | - $storedDestinations =& $this->getStoredDestinations(); |
|
1614 | + $storedDestinations = & $this->getStoredDestinations(); |
|
1615 | 1615 | foreach ($storedDestinations as &$sd) { |
1616 | 1616 | if ($sd['SectorID'] == $sectorID) { |
1617 | 1617 | $sd['OffsetTop'] = $offsetTop; |
@@ -53,8 +53,9 @@ discard block |
||
53 | 53 | } |
54 | 54 | |
55 | 55 | public function setAllianceID($ID) { |
56 | - if($this->allianceID == $ID) |
|
57 | - return; |
|
56 | + if($this->allianceID == $ID) { |
|
57 | + return; |
|
58 | + } |
|
58 | 59 | $this->allianceID=$ID; |
59 | 60 | } |
60 | 61 | |
@@ -93,8 +94,7 @@ discard block |
||
93 | 94 | if($db->nextRecord()) { |
94 | 95 | $return = unserialize($db->getField('info')); |
95 | 96 | return $return; |
96 | - } |
|
97 | - else { |
|
97 | + } else { |
|
98 | 98 | $return = new DummyPlayer(); |
99 | 99 | return $return; |
100 | 100 | } |
@@ -1,31 +1,31 @@ discard block |
||
1 | 1 | <?php declare(strict_types=1); |
2 | 2 | |
3 | 3 | class DummyPlayer extends AbstractSmrPlayer { |
4 | - public function __construct($gameID=0,$playerName='Dummy',$raceID=1,$experience=1000,$alignment=100,$allianceID=0,$shipTypeID=60) { |
|
4 | + public function __construct($gameID = 0, $playerName = 'Dummy', $raceID = 1, $experience = 1000, $alignment = 100, $allianceID = 0, $shipTypeID = 60) { |
|
5 | 5 | parent::__construct(); |
6 | 6 | $this->accountID = 0; |
7 | - $this->gameID = (int) $gameID; |
|
8 | - $this->playerName = (string) $playerName; |
|
7 | + $this->gameID = (int)$gameID; |
|
8 | + $this->playerName = (string)$playerName; |
|
9 | 9 | $this->playerID = 0; |
10 | 10 | $this->sectorID = 0; |
11 | - $this->lastSectorID = 0; |
|
11 | + $this->lastSectorID = 0; |
|
12 | 12 | $this->turns = 1000; |
13 | - $this->newbieTurns = 0; |
|
13 | + $this->newbieTurns = 0; |
|
14 | 14 | $this->lastNewsUpdate = 0; |
15 | 15 | $this->dead = false; |
16 | 16 | $this->landedOnPlanet = false; |
17 | - $this->lastActive = 0; |
|
18 | - $this->lastCPLAction = 0; |
|
19 | - $this->raceID = (int) $raceID; |
|
20 | - $this->credits = 0; |
|
21 | - $this->experience = (int) $experience; |
|
22 | - $this->alignment = (int) $alignment; |
|
23 | - $this->militaryPayment = 0; |
|
24 | - $this->allianceID = (int) $allianceID; |
|
25 | - $this->shipID = (int) $shipTypeID; |
|
17 | + $this->lastActive = 0; |
|
18 | + $this->lastCPLAction = 0; |
|
19 | + $this->raceID = (int)$raceID; |
|
20 | + $this->credits = 0; |
|
21 | + $this->experience = (int)$experience; |
|
22 | + $this->alignment = (int)$alignment; |
|
23 | + $this->militaryPayment = 0; |
|
24 | + $this->allianceID = (int)$allianceID; |
|
25 | + $this->shipID = (int)$shipTypeID; |
|
26 | 26 | $this->kills = 0; |
27 | 27 | $this->deaths = 0; |
28 | - $this->lastPort = 0; |
|
28 | + $this->lastPort = 0; |
|
29 | 29 | $this->bank = 0; |
30 | 30 | $this->zoom = 0; |
31 | 31 | |
@@ -53,9 +53,9 @@ discard block |
||
53 | 53 | } |
54 | 54 | |
55 | 55 | public function setAllianceID($ID) { |
56 | - if($this->allianceID == $ID) |
|
56 | + if ($this->allianceID == $ID) |
|
57 | 57 | return; |
58 | - $this->allianceID=$ID; |
|
58 | + $this->allianceID = $ID; |
|
59 | 59 | } |
60 | 60 | |
61 | 61 | public function &killPlayerByPlayer(AbstractSmrPlayer $killer) { |
@@ -81,7 +81,7 @@ discard block |
||
81 | 81 | $db = new SmrMySqlDatabase(); |
82 | 82 | $db->query('REPLACE INTO cached_dummys ' . |
83 | 83 | '(type, id, info) ' . |
84 | - 'VALUES (\'DummyPlayer\', '.$db->escapeString($this->getPlayerName()).', '.$db->escapeString($cache).')'); |
|
84 | + 'VALUES (\'DummyPlayer\', ' . $db->escapeString($this->getPlayerName()) . ', ' . $db->escapeString($cache) . ')'); |
|
85 | 85 | unserialize($cache); |
86 | 86 | } |
87 | 87 | |
@@ -90,7 +90,7 @@ discard block |
||
90 | 90 | $db->query('SELECT info FROM cached_dummys |
91 | 91 | WHERE type = \'DummyPlayer\' |
92 | 92 | AND id = ' . $db->escapeString($name) . ' LIMIT 1'); |
93 | - if($db->nextRecord()) { |
|
93 | + if ($db->nextRecord()) { |
|
94 | 94 | $return = unserialize($db->getField('info')); |
95 | 95 | return $return; |
96 | 96 | } |
@@ -105,7 +105,7 @@ discard block |
||
105 | 105 | $db->query('SELECT id FROM cached_dummys |
106 | 106 | WHERE type = \'DummyPlayer\''); |
107 | 107 | $dummyNames = array(); |
108 | - while($db->nextRecord()) { |
|
108 | + while ($db->nextRecord()) { |
|
109 | 109 | $dummyNames[] = $db->getField('id'); |
110 | 110 | } |
111 | 111 | return $dummyNames; |
@@ -19,8 +19,8 @@ discard block |
||
19 | 19 | $shareFrom[$fromAccountId] = array( |
20 | 20 | 'Player ID' => $otherPlayer == null ? '-' : $otherPlayer->getPlayerID(), |
21 | 21 | 'Player Name' => $otherPlayer == null ? |
22 | - '<b>Account</b>: ' . SmrAccount::getAccount($fromAccountId)->getHofDisplayName() : |
|
23 | - $otherPlayer->getPlayerName(), |
|
22 | + '<b>Account</b>: ' . SmrAccount::getAccount($fromAccountId)->getHofDisplayName() : |
|
23 | + $otherPlayer->getPlayerName(), |
|
24 | 24 | 'All Games' => $gameId == 0 ? '<span class="green">YES</span>' : '<span class="red">NO</span>', |
25 | 25 | 'Game ID' => $gameId, |
26 | 26 | ); |
@@ -40,8 +40,8 @@ discard block |
||
40 | 40 | $shareTo[$toAccountId] = array( |
41 | 41 | 'Player ID' => $otherPlayer == null ? '-' : $otherPlayer->getPlayerID(), |
42 | 42 | 'Player Name' => $otherPlayer == null ? |
43 | - '<b>Account</b>: ' . SmrAccount::getAccount($toAccountId)->getHofDisplayName() : |
|
44 | - $otherPlayer->getPlayerName(), |
|
43 | + '<b>Account</b>: ' . SmrAccount::getAccount($toAccountId)->getHofDisplayName() : |
|
44 | + $otherPlayer->getPlayerName(), |
|
45 | 45 | 'All Games' => $gameId == 0 ? '<span class="green">YES</span>' : '<span class="red">NO</span>', |
46 | 46 | 'Game ID' => $gameId, |
47 | 47 | ); |
@@ -19,8 +19,7 @@ discard block |
||
19 | 19 | $shareFrom[$fromAccountId] = array( |
20 | 20 | 'Player ID' => $otherPlayer == null ? '-' : $otherPlayer->getPlayerID(), |
21 | 21 | 'Player Name' => $otherPlayer == null ? |
22 | - '<b>Account</b>: ' . SmrAccount::getAccount($fromAccountId)->getHofDisplayName() : |
|
23 | - $otherPlayer->getPlayerName(), |
|
22 | + '<b>Account</b>: ' . SmrAccount::getAccount($fromAccountId)->getHofDisplayName() : $otherPlayer->getPlayerName(), |
|
24 | 23 | 'All Games' => $gameId == 0 ? '<span class="green">YES</span>' : '<span class="red">NO</span>', |
25 | 24 | 'Game ID' => $gameId, |
26 | 25 | ); |
@@ -40,8 +39,7 @@ discard block |
||
40 | 39 | $shareTo[$toAccountId] = array( |
41 | 40 | 'Player ID' => $otherPlayer == null ? '-' : $otherPlayer->getPlayerID(), |
42 | 41 | 'Player Name' => $otherPlayer == null ? |
43 | - '<b>Account</b>: ' . SmrAccount::getAccount($toAccountId)->getHofDisplayName() : |
|
44 | - $otherPlayer->getPlayerName(), |
|
42 | + '<b>Account</b>: ' . SmrAccount::getAccount($toAccountId)->getHofDisplayName() : $otherPlayer->getPlayerName(), |
|
45 | 43 | 'All Games' => $gameId == 0 ? '<span class="green">YES</span>' : '<span class="red">NO</span>', |
46 | 44 | 'Game ID' => $gameId, |
47 | 45 | ); |
@@ -857,14 +857,14 @@ |
||
857 | 857 | |
858 | 858 | public function isFederal() { |
859 | 859 | return $this->getShipTypeID() == SHIP_TYPE_FEDERAL_DISCOVERY || |
860 | - $this->getShipTypeID() == SHIP_TYPE_FEDERAL_WARRANT || |
|
861 | - $this->getShipTypeID() == SHIP_TYPE_FEDERAL_ULTIMATUM; |
|
860 | + $this->getShipTypeID() == SHIP_TYPE_FEDERAL_WARRANT || |
|
861 | + $this->getShipTypeID() == SHIP_TYPE_FEDERAL_ULTIMATUM; |
|
862 | 862 | } |
863 | 863 | |
864 | 864 | public function isUnderground() { |
865 | 865 | return $this->getShipTypeID() == SHIP_TYPE_THIEF || |
866 | - $this->getShipTypeID() == SHIP_TYPE_ASSASSIN || |
|
867 | - $this->getShipTypeID() == SHIP_TYPE_DEATH_CRUISER; |
|
866 | + $this->getShipTypeID() == SHIP_TYPE_ASSASSIN || |
|
867 | + $this->getShipTypeID() == SHIP_TYPE_DEATH_CRUISER; |
|
868 | 868 | } |
869 | 869 | |
870 | 870 | public function &shootPlayer(AbstractSmrPlayer $targetPlayer) { |
@@ -301,7 +301,7 @@ discard block |
||
301 | 301 | public function setWeaponLocations(array $orderArray) { |
302 | 302 | $weapons = $this->weapons; |
303 | 303 | foreach ($orderArray as $newOrder => $oldOrder) { |
304 | - $this->weapons[$newOrder] =& $weapons[$oldOrder]; |
|
304 | + $this->weapons[$newOrder] = & $weapons[$oldOrder]; |
|
305 | 305 | } |
306 | 306 | $this->hasChangedWeapons = true; |
307 | 307 | } |
@@ -901,14 +901,14 @@ discard block |
||
901 | 901 | } |
902 | 902 | $results['DeadBeforeShot'] = false; |
903 | 903 | foreach ($this->weapons as $orderID => $weapon) { |
904 | - $results['Weapons'][$orderID] =& $weapon->shootPlayer($thisPlayer, $targetPlayers[array_rand($targetPlayers)]); |
|
904 | + $results['Weapons'][$orderID] = & $weapon->shootPlayer($thisPlayer, $targetPlayers[array_rand($targetPlayers)]); |
|
905 | 905 | if ($results['Weapons'][$orderID]['Hit']) { |
906 | 906 | $results['TotalDamage'] += $results['Weapons'][$orderID]['ActualDamage']['TotalDamage']; |
907 | 907 | } |
908 | 908 | } |
909 | 909 | if ($this->hasCDs()) { |
910 | 910 | $thisCDs = new SmrCombatDrones($this->getGameID(), $this->getCDs()); |
911 | - $results['Drones'] =& $thisCDs->shootPlayer($thisPlayer, $targetPlayers[array_rand($targetPlayers)]); |
|
911 | + $results['Drones'] = & $thisCDs->shootPlayer($thisPlayer, $targetPlayers[array_rand($targetPlayers)]); |
|
912 | 912 | $results['TotalDamage'] += $results['Drones']['ActualDamage']['TotalDamage']; |
913 | 913 | } |
914 | 914 | $thisPlayer->increaseExperience(IRound($results['TotalDamage'] * self::EXP_PER_DAMAGE_PLAYER)); |
@@ -926,7 +926,7 @@ discard block |
||
926 | 926 | } |
927 | 927 | $results['DeadBeforeShot'] = false; |
928 | 928 | foreach ($this->weapons as $orderID => $weapon) { |
929 | - $results['Weapons'][$orderID] =& $weapon->shootForces($thisPlayer, $forces); |
|
929 | + $results['Weapons'][$orderID] = & $weapon->shootForces($thisPlayer, $forces); |
|
930 | 930 | if ($results['Weapons'][$orderID]['Hit']) { |
931 | 931 | $results['TotalDamage'] += $results['Weapons'][$orderID]['ActualDamage']['TotalDamage']; |
932 | 932 | $thisPlayer->increaseHOF($results['Weapons'][$orderID]['ActualDamage']['NumMines'], array('Combat', 'Forces', 'Mines', 'Killed'), HOF_PUBLIC); |
@@ -940,7 +940,7 @@ discard block |
||
940 | 940 | } |
941 | 941 | if ($this->hasCDs()) { |
942 | 942 | $thisCDs = new SmrCombatDrones($this->getGameID(), $this->getCDs()); |
943 | - $results['Drones'] =& $thisCDs->shootForces($thisPlayer, $forces); |
|
943 | + $results['Drones'] = & $thisCDs->shootForces($thisPlayer, $forces); |
|
944 | 944 | $results['TotalDamage'] += $results['Drones']['ActualDamage']['TotalDamage']; |
945 | 945 | $thisPlayer->increaseHOF($results['Drones']['ActualDamage']['NumMines'], array('Combat', 'Forces', 'Mines', 'Killed'), HOF_PUBLIC); |
946 | 946 | $thisPlayer->increaseHOF($results['Drones']['ActualDamage']['Mines'], array('Combat', 'Forces', 'Mines', 'Damage Done'), HOF_PUBLIC); |
@@ -965,14 +965,14 @@ discard block |
||
965 | 965 | } |
966 | 966 | $results['DeadBeforeShot'] = false; |
967 | 967 | foreach ($this->weapons as $orderID => $weapon) { |
968 | - $results['Weapons'][$orderID] =& $weapon->shootPort($thisPlayer, $port); |
|
968 | + $results['Weapons'][$orderID] = & $weapon->shootPort($thisPlayer, $port); |
|
969 | 969 | if ($results['Weapons'][$orderID]['Hit']) { |
970 | 970 | $results['TotalDamage'] += $results['Weapons'][$orderID]['ActualDamage']['TotalDamage']; |
971 | 971 | } |
972 | 972 | } |
973 | 973 | if ($this->hasCDs()) { |
974 | 974 | $thisCDs = new SmrCombatDrones($this->getGameID(), $this->getCDs()); |
975 | - $results['Drones'] =& $thisCDs->shootPort($thisPlayer, $port); |
|
975 | + $results['Drones'] = & $thisCDs->shootPort($thisPlayer, $port); |
|
976 | 976 | $results['TotalDamage'] += $results['Drones']['ActualDamage']['TotalDamage']; |
977 | 977 | } |
978 | 978 | $thisPlayer->increaseExperience(IRound($results['TotalDamage'] * self::EXP_PER_DAMAGE_PORT)); |
@@ -1003,14 +1003,14 @@ discard block |
||
1003 | 1003 | } |
1004 | 1004 | $results['DeadBeforeShot'] = false; |
1005 | 1005 | foreach ($this->weapons as $orderID => $weapon) { |
1006 | - $results['Weapons'][$orderID] =& $weapon->shootPlanet($thisPlayer, $planet, $delayed); |
|
1006 | + $results['Weapons'][$orderID] = & $weapon->shootPlanet($thisPlayer, $planet, $delayed); |
|
1007 | 1007 | if ($results['Weapons'][$orderID]['Hit']) { |
1008 | 1008 | $results['TotalDamage'] += $results['Weapons'][$orderID]['ActualDamage']['TotalDamage']; |
1009 | 1009 | } |
1010 | 1010 | } |
1011 | 1011 | if ($this->hasCDs()) { |
1012 | 1012 | $thisCDs = new SmrCombatDrones($this->getGameID(), $this->getCDs()); |
1013 | - $results['Drones'] =& $thisCDs->shootPlanet($thisPlayer, $planet, $delayed); |
|
1013 | + $results['Drones'] = & $thisCDs->shootPlanet($thisPlayer, $planet, $delayed); |
|
1014 | 1014 | $results['TotalDamage'] += $results['Drones']['ActualDamage']['TotalDamage']; |
1015 | 1015 | } |
1016 | 1016 | $thisPlayer->increaseExperience(IRound($results['TotalDamage'] * self::EXP_PER_DAMAGE_PLANET)); |
@@ -17,7 +17,7 @@ discard block |
||
17 | 17 | $publishedGames = array(); |
18 | 18 | while ($db->nextRecord()) { |
19 | 19 | $publishedGames[] = array('game_name' => $db->getField('game_name'), |
20 | - 'game_id' => $db->getInt('game_id')); |
|
20 | + 'game_id' => $db->getInt('game_id')); |
|
21 | 21 | } |
22 | 22 | $template->assign('PublishedGames', $publishedGames); |
23 | 23 | |
@@ -31,7 +31,7 @@ discard block |
||
31 | 31 | $container['back'] = true; |
32 | 32 | |
33 | 33 | $pastEditions[] = array('title' => $db->getField('title'), |
34 | - 'online_since' => $db->getInt('online_since'), |
|
35 | - 'href' => SmrSession::getNewHREF($container)); |
|
34 | + 'online_since' => $db->getInt('online_since'), |
|
35 | + 'href' => SmrSession::getNewHREF($container)); |
|
36 | 36 | } |
37 | 37 | $template->assign('PastEditions', $pastEditions); |
@@ -202,7 +202,7 @@ |
||
202 | 202 | AND receiver_delete = ' . $db->escapeBoolean(false) . ' |
203 | 203 | ORDER BY send_time DESC'); |
204 | 204 | while ($db->nextRecord()) { |
205 | - $groupBox =& $messageBox['GroupedMessages'][$db->getInt('sender_id')]; |
|
205 | + $groupBox = & $messageBox['GroupedMessages'][$db->getInt('sender_id')]; |
|
206 | 206 | // Limit the number of messages in each group |
207 | 207 | if (!isset($groupBox['Messages']) || count($groupBox['Messages']) < MESSAGE_SCOUT_GROUP_LIMIT) { |
208 | 208 | displayMessage($groupBox, $db->getInt('message_id'), $db->getInt('account_id'), $db->getInt('sender_id'), stripslashes($db->getField('message_text')), $db->getInt('send_time'), $db->getBoolean('msg_read'), MSG_SCOUT); |