diff --git a/src/application/code/core/Legacies/Core/Unit.php b/src/application/code/core/Legacies/Core/Unit.php new file mode 100644 index 0000000..8633e2d --- /dev/null +++ b/src/application/code/core/Legacies/Core/Unit.php @@ -0,0 +1,36 @@ +setData('locale', $preferredLocale); diff --git a/src/application/code/core/Wootook/Empire/Block/Planet/Builder/ItemAbstract.php b/src/application/code/core/Wootook/Empire/Block/Planet/Builder/ItemAbstract.php index ebf6f20..dfffacd 100644 --- a/src/application/code/core/Wootook/Empire/Block/Planet/Builder/ItemAbstract.php +++ b/src/application/code/core/Wootook/Empire/Block/Planet/Builder/ItemAbstract.php @@ -70,7 +70,7 @@ abstract class Wootook_Empire_Block_Planet_Builder_ItemAbstract public function getItemImageUrl() { - return $this->getSkinUrl($this->getLabel('image')); + return $this->getStaticUrl($this->getLabel('image')); } public function getName() diff --git a/src/application/code/core/Wootook/Player/Model/Session.php b/src/application/code/core/Wootook/Player/Model/Session.php index c4eb09a..9ae226c 100644 --- a/src/application/code/core/Wootook/Player/Model/Session.php +++ b/src/application/code/core/Wootook/Player/Model/Session.php @@ -61,16 +61,14 @@ class Wootook_Player_Model_Session is_array($cookieData)) { $adapter = $this->_player->getReadConnection(); - $select = $adapter->select(array('user' => 'users')); - $cookieData = array( - 'id' => (isset($cookieData['id']) ? intval($cookieData['id']) : 0), - 'key' => (isset($cookieData['key']) ? $adapter->quote($cookieData['key']) : null) - ); + $select = $adapter->select(array('user' => $adapter->getTable('users'))); $select ->column('id') - ->where('user.id=:id') - ->where(':key=CONCAT((@salt:=MID(:key, 0, 4)), SHA1(CONCAT(user.username, user.password, @salt)))') + ->where('id', isset($cookieData['id']) ? intval($cookieData['id']) : 0) + ->where(new Wootook_Core_Database_Sql_Placeholder_Expression( + ':key=CONCAT((@salt:=MID(:key, 0, 4)), SHA1(CONCAT(user.username, user.password, @salt)))', + array('key' => isset($cookieData['key']) ? $adapter->quote($cookieData['key']) : null))) ; try { $statement = $adapter->prepare($select); diff --git a/src/application/gamedata/legacies/default/locale/fr_FR/labels.php b/src/application/gamedata/legacies/default/locale/fr_FR/labels.php index 699aca2..550a397 100644 --- a/src/application/gamedata/legacies/default/locale/fr_FR/labels.php +++ b/src/application/gamedata/legacies/default/locale/fr_FR/labels.php @@ -5,91 +5,91 @@ Legacies_Empire::ID_BUILDING_METAL_MINE => array( 'name' => 'Mine de métal', 'description' => "
La mine de métal exploite les profondeurs géologiques à la recherche de ressources riches en métaux, puis les raffine et crée ensuite les alliages les plus solides.
Principales matières premières pour la construction de structures planétaires et de vaisseaux, les métaux permettent d'asseoir votre domination sur l'univers.
", - 'image' => 'graphics/buildings/metal-mine.png' + 'image' => 'medias/klore/images/building/metal-mine.jpg' ), Legacies_Empire::ID_BUILDING_CRISTAL_MINE => array( 'name' => 'Mine de cristal', 'description' => "La mine de cristal développe l'exploitation des minéraux entrant dans la comosition des systèmes électroniques.
Ces matériaux vous permettront d'augmenter la capacité de calculs de vos laboratoires ainsi que de ceux de vos systèmes de combat.
", - 'image' => 'graphics/buildings/cristal-mine.png' + 'image' => 'medias/klore/images/building/cristal-mine.jpg' ), Legacies_Empire::ID_BUILDING_DEUTERIUM_SYNTHETISER => array( 'name' => "Synthétiseur de deutérium", 'description' => "Le synthétiseur de deutérium permet d'exploiter les sources d'hydrogène lourd. Disponible en faible quantité sur les planètes telluriques et plus répandu sur les planètes géantes gazeuses, le deutérium et tritium composent votre principale source d'hydrogène lourd.
", - 'image' => 'graphics/buildings/deuterium-syntherizer.png' + 'image' => 'medias/klore/images/building/deuterium-syntherizer.jpg' ), Legacies_Empire::ID_BUILDING_SOLAR_PLANT => array( 'name' => 'Centrale électrique solaire', - 'description' => '', - 'image' => 'graphics/buildings/solar-plant.png' + 'description' => "La centrale électrique solaire est la source d'énergie la plus abordable.
", + 'image' => 'medias/klore/images/building/solar-plant.jpg' ), Legacies_Empire::ID_BUILDING_FUSION_REACTOR => array( 'name' => 'Réacteur à fusion nucléaire', 'description' => '', - 'image' => 'graphics/buildings/fusion-reactor.png' + 'image' => 'medias/klore/images/building/fusion-reactor.jpg' ), Legacies_Empire::ID_BUILDING_ROBOTIC_FACTORY => array( 'name' => 'Usine de robots', 'description' => '', - 'image' => 'graphics/buildings/robotic-factory.png' + 'image' => 'medias/klore/images/building/robotic-factory.jpg' ), Legacies_Empire::ID_BUILDING_NANITE_FACTORY => array( 'name' => 'Usine de nanites', 'description' => '', - 'image' => 'graphics/buildings/nanite-factory.png' + 'image' => 'medias/klore/images/building/nanite-factory.jpg' ), Legacies_Empire::ID_BUILDING_SHIPYARD => array( 'name' => 'Chantier spatial', 'description' => '', - 'image' => 'graphics/buildings/shipyard.png' + 'image' => 'medias/klore/images/building/shipyard.jpg' ), Legacies_Empire::ID_BUILDING_METAL_STORAGE => array( 'name' => 'Hangar de métal', 'description' => '', - 'image' => 'graphics/buildings/metal-storage.png' + 'image' => 'medias/klore/images/building/metal-storage.jpg' ), Legacies_Empire::ID_BUILDING_CRISTAL_STORAGE => array( 'name' => 'Hangar de cristal', 'description' => '', - 'image' => 'graphics/buildings/cristal-storage.png' + 'image' => 'medias/klore/images/building/cristal-storage.jpg' ), Legacies_Empire::ID_BUILDING_DEUTERIUM_TANK => array( 'name' => 'Réservoir de deutérium', 'description' => '', - 'image' => 'graphics/buildings/deuterium-tank.png' + 'image' => 'medias/klore/images/building/deuterium-tank.jpg' ), Legacies_Empire::ID_BUILDING_RESEARCH_LAB => array( 'name' => 'Laboratoire de recherche', 'description' => '', - 'image' => 'graphics/buildings/research-lab.png' + 'image' => 'medias/klore/images/building/research-lab.jpg' ), Legacies_Empire::ID_BUILDING_TERRAFORMER => array( 'name' => 'Terraformeur', 'description' => '', - 'image' => 'graphics/buildings/terraformer.png' + 'image' => 'medias/klore/images/building/terraformer.jpg' ), Legacies_Empire::ID_BUILDING_ALLIANCE_DEPOT => array( 'name' => 'Dépôt de ravitaillement', 'description' => '', - 'image' => 'graphics/buildings/alliance-depot.png' + 'image' => 'medias/klore/images/building/alliance-depot.jpg' ), Legacies_Empire::ID_BUILDING_MISSILE_SILO => array( 'name' => 'Silo de missiles', 'description' => '', - 'image' => 'graphics/buildings/missile-silo.png' + 'image' => 'medias/klore/images/building/missile-silo.jpg' ), // }}} @@ -99,19 +99,19 @@ Legacies_Empire::ID_BUILDING_LUNAR_BASE => array( 'name' => 'Base lunaire', 'description' => '', - 'image' => 'graphics/units/lunar-base.png' + 'image' => 'medias/klore/images/units/lunar-base.jpg' ), Legacies_Empire::ID_BUILDING_SENSOR_PHALANX => array( 'name' => 'Phalange de capteur', 'description' => '', - 'image' => 'graphics/units/sensor-phalanx.png' + 'image' => 'medias/klore/images/units/sensor-phalanx.jpg' ), Legacies_Empire::ID_BUILDING_JUMP_GATE => array( 'name' => 'Porte de saut spatial', 'description' => '', - 'image' => 'graphics/units/jump-gate.png' + 'image' => 'medias/klore/images/units/jump-gate.jpg' ), // }}} @@ -121,103 +121,103 @@ Legacies_Empire::ID_RESEARCH_ESPIONAGE_TECHNOLOGY => array( 'name' => 'Techniques d\'espionnage', 'description' => '', - 'image' => 'graphics/technology/espionnage.png' + 'image' => 'medias/klore/images/technology/espionnage.jpg' ), Legacies_Empire::ID_RESEARCH_COMPUTER_TECHNOLOGY => array( 'name' => 'Recherche informatique', 'description' => '', - 'image' => 'graphics/technology/computer.png' + 'image' => 'medias/klore/images/technology/computer.jpg' ), Legacies_Empire::ID_RESEARCH_WEAPON_TECHNOLOGY => array( 'name' => 'Technologies d\'armements', 'description' => '', - 'image' => 'graphics/technology/weaponry.png' + 'image' => 'medias/klore/images/technology/weaponry.jpg' ), Legacies_Empire::ID_RESEARCH_SHIELDING_TECHNOLOGY => array( 'name' => 'Boucliers énergétiques', 'description' => '', - 'image' => 'graphics/technology/shielding.png' + 'image' => 'medias/klore/images/technology/shielding.jpg' ), Legacies_Empire::ID_RESEARCH_ARMOUR_TECHNOLOGY => array( 'name' => 'Structures spatiales', 'description' => '', - 'image' => 'graphics/technology/armour.png' + 'image' => 'medias/klore/images/technology/armour.jpg' ), Legacies_Empire::ID_RESEARCH_ENERGY_TECHNOLOGY => array( 'name' => 'Nouvelles énergies', 'description' => '', - 'image' => 'graphics/technology/energy.png' + 'image' => 'medias/klore/images/technology/energy.jpg' ), Legacies_Empire::ID_RESEARCH_HYPERSPACE_TECHNOLOGY => array( 'name' => 'Technologie hyperespace', 'description' => '', - 'image' => 'graphics/technology/hyperspace-technology.png' + 'image' => 'medias/klore/images/technology/hyperspace-technology.jpg' ), Legacies_Empire::ID_RESEARCH_COMBUSTION_DRIVE => array( 'name' => 'Propulsion à combustion', 'description' => '', - 'image' => 'graphics/technology/combustion-drive.png' + 'image' => 'medias/klore/images/technology/combustion-drive.jpg' ), Legacies_Empire::ID_RESEARCH_IMPULSE_DRIVE => array( 'name' => 'Propulsion à impulsion', 'description' => '', - 'image' => 'graphics/technology/impulse-drive.png' + 'image' => 'medias/klore/images/technology/impulse-drive.jpg' ), Legacies_Empire::ID_RESEARCH_HYPERSPACE_DRIVE => array( 'name' => 'Propulsion hyperespace', 'description' => '', - 'image' => 'graphics/technology/hyperspace-drive.png' + 'image' => 'medias/klore/images/technology/hyperspace-drive.jpg' ), Legacies_Empire::ID_RESEARCH_LASER_TECHNOLOGY => array( 'name' => 'Propriétés laser', 'description' => '', - 'image' => 'graphics/technology/laser.png' + 'image' => 'medias/klore/images/technology/laser.jpg' ), Legacies_Empire::ID_RESEARCH_ION_TECHNOLOGY => array( 'name' => 'Propriétés des ions', 'description' => '', - 'image' => 'graphics/technology/ion.png' + 'image' => 'medias/klore/images/technology/ion.jpg' ), Legacies_Empire::ID_RESEARCH_PLASMA_TECHNOLOGY => array( 'name' => 'Propriétés des plasma', 'description' => '', - 'image' => 'graphics/technology/plasma.png' + 'image' => 'medias/klore/images/technology/plasma.jpg' ), Legacies_Empire::ID_RESEARCH_INTERGALACTIC_RESEARCH_NETWORK => array( 'name' => 'Réseau de recherche intergalactique', 'description' => '', - 'image' => 'graphics/technology/intergalactic-research-network.png' + 'image' => 'medias/klore/images/technology/intergalactic-research-network.jpg' ), Legacies_Empire::ID_RESEARCH_EXPEDITION_TECHNOLOGY => array( 'name' => 'Technologie expéditions', 'description' => '', - 'image' => 'graphics/technology/expedition.png' + 'image' => 'medias/klore/images/technology/expedition.jpg' ), Legacies_Empire::ID_RESEARCH_ORE_MINING => array( 'name' => 'Exploitation minière', 'description' => '', - 'image' => 'graphics/technology/ore-mining.png' + 'image' => 'medias/klore/images/technology/ore-mining.jpg' ), Legacies_Empire::ID_RESEARCH_GRAVITON_TECHNOLOGY => array( 'name' => 'Graviton', 'description' => '', - 'image' => 'graphics/technology/graviton.png' + 'image' => 'medias/klore/images/technology/graviton.jpg' ), // }}} @@ -228,112 +228,112 @@ 'name' => 'Transporteur T5', 'class' => 'Etalon', 'description' => '', - 'image' => 'graphics/units/light-transport.png' + 'image' => 'medias/klore/images/units/light-transport.jpg' ), Legacies_Empire::ID_SHIP_LARGE_TRANSPORT => array( 'name' => 'Transporteur T25', 'class' => 'Buffle', 'description' => '', - 'image' => 'graphics/units/large-transport.png' + 'image' => 'medias/klore/images/units/large-transport.jpg' ), Legacies_Empire::ID_SHIP_LIGHT_FIGHTER => array( 'name' => 'Chasseur C50', 'class' => 'Guêpe', 'description' => '', - 'image' => 'graphics/units/light-fighter.png' + 'image' => 'medias/klore/images/units/light-fighter.jpg' ), Legacies_Empire::ID_SHIP_HEAVY_FIGHTER => array( 'name' => 'Chasseur C150', 'class' => 'Frelon', 'description' => '', - 'image' => 'graphics/units/heavy-fighter.png' + 'image' => 'medias/klore/images/units/heavy-fighter.jpg' ), Legacies_Empire::ID_SHIP_CRUISER => array( 'name' => 'Croiseur V400', 'class' => 'Aigle', 'description' => '', - 'image' => 'graphics/units/cruiser.png' + 'image' => 'medias/klore/images/units/cruiser.jpg' ), Legacies_Empire::ID_SHIP_BATTLESHIP => array( 'name' => 'Vaisseau de bataille V1000', 'class' => 'Faucon', 'description' => '', - 'image' => 'graphics/units/battleship.png' + 'image' => 'medias/klore/images/units/battleship.jpg' ), Legacies_Empire::ID_SHIP_COLONY_SHIP => array( 'name' => 'Vaisseau de colonisation', 'class' => 'Romulus', 'description' => '', - 'image' => 'graphics/units/colony-ship.png' + 'image' => 'medias/klore/images/units/colony-ship.jpg' ), Legacies_Empire::ID_SHIP_RECYCLER => array( 'name' => 'Recycleur', 'class' => 'Goule', 'description' => '', - 'image' => 'graphics/units/recycler.png' + 'image' => 'medias/klore/images/units/recycler.jpg' ), Legacies_Empire::ID_SHIP_SPY_DRONE => array( 'name' => 'Sonde d\'espionnage', 'class' => 'Moustique', 'description' => '', - 'image' => 'graphics/units/spy-drone.png' + 'image' => 'medias/klore/images/units/spy-drone.jpg' ), Legacies_Empire::ID_SHIP_BOMBER => array( 'name' => 'Bombarider', 'class' => 'Vengeur', 'description' => '', - 'image' => 'graphics/units/terraformer.png' + 'image' => 'medias/klore/images/units/terraformer.jpg' ), Legacies_Empire::ID_SHIP_SOLAR_SATELLITE => array( 'name' => 'Satellite solaire', 'class' => 'Râ', 'description' => '', - 'image' => 'graphics/units/terraformer.png' + 'image' => 'medias/klore/images/units/terraformer.jpg' ), Legacies_Empire::ID_SHIP_DESTRUCTOR => array( 'name' => 'Vaisseau de bataille V2000', 'class' => 'Destructeur', 'description' => '', - 'image' => 'graphics/units/terraformer.png' + 'image' => 'medias/klore/images/units/terraformer.jpg' ), Legacies_Empire::ID_SHIP_DEATH_STAR => array( 'name' => 'Vaisseau mère M1', 'class' => 'Vengeur', 'description' => '', - 'image' => 'graphics/units/terraformer.png' + 'image' => 'medias/klore/images/units/terraformer.jpg' ), Legacies_Empire::ID_SHIP_BATTLECRUISER => array( 'name' => 'Vaisseau de bataille V700', 'class' => 'Dagon', 'description' => '', - 'image' => 'graphics/units/terraformer.png' + 'image' => 'medias/klore/images/units/terraformer.jpg' ), Legacies_Empire::ID_SHIP_SUPERNOVA => array( 'name' => 'Vaisseau mère M5', 'class' => 'Annihilateur', 'description' => '', - 'image' => 'graphics/units/terraformer.png' + 'image' => 'medias/klore/images/units/terraformer.jpg' ), Legacies_Empire::ID_SHIP_ORE_MININER => array( 'name' => 'Vaisseau d\'exploitation', 'class' => 'Onyx', 'description' => '', - 'image' => 'graphics/units/terraformer.png' + 'image' => 'medias/klore/images/units/terraformer.jpg' ), // }}} @@ -342,66 +342,74 @@ // {{{ Legacies_Empire::ID_DEFENSE_ROCKET_LAUNCHER => array( 'name' => 'Lance-missiles balistiques', + 'class' => 'Défenseur', 'description' => '', - 'image' => 'graphics/defenses/rocket-launcher.png' + 'image' => 'medias/klore/images/defense/rocket-launcher.jpg' ), Legacies_Empire::ID_DEFENSE_LIGHT_LASER => array( 'name' => 'Artillerie laser légère', + 'class' => 'Lux', 'description' => '', - 'image' => 'graphics/defenses/light-laser.png' + 'image' => 'medias/klore/images/defense/light-laser.jpg' ), Legacies_Empire::ID_DEFENSE_HEAVY_LASER => array( 'name' => 'Artillerie laser lourde', + 'class' => 'Seraphin', 'description' => '', - 'image' => 'graphics/defenses/heavy-laser.png' + 'image' => 'medias/klore/images/defense/heavy-laser.jpg' ), Legacies_Empire::ID_DEFENSE_ION_CANNON => array( 'name' => 'Canon à ions', + 'class' => 'Découpeur', 'description' => '', - 'image' => 'graphics/defenses/ion-canon.png' + 'image' => 'medias/klore/images/defense/ion-canon.jpg' ), Legacies_Empire::ID_DEFENSE_GAUSS_CANNON => array( 'name' => 'Canon à effet Gauss', + 'class' => 'Polaris', 'description' => '', - 'image' => 'graphics/defenses/gauss-canon.png' + 'image' => 'medias/klore/images/defense/gauss-canon.jpg' ), Legacies_Empire::ID_DEFENSE_PLASMA_TURRET => array( 'name' => 'Canon à plasma', + 'class' => 'Infernal', 'description' => '', - 'image' => 'graphics/defenses/plasma-turret.png' + 'image' => 'medias/klore/images/defense/plasma-turret.jpg' ), Legacies_Empire::ID_DEFENSE_SMALL_SHIELD_DOME => array( 'name' => 'Dôme bouclier', + 'class' => 'Sphere', 'description' => '', - 'image' => 'graphics/defenses/small-shield-dome.png' + 'image' => 'medias/klore/images/defense/small-shield-dome.jpg' ), Legacies_Empire::ID_DEFENSE_LARGE_SHIELD_DOME => array( 'name' => 'Grand bouclier planétaire', + 'class' => 'Protecteur', 'description' => '', - 'image' => 'graphics/defenses/large-shield-dome.png' - ), - - Legacies_Empire::ID_SPECIAL_ANTIBALLISTIC_MISSILE => array( - 'name' => 'Missile anti-balistique', - 'description' => '', - 'image' => 'graphics/defenses/antiballistic-missile.png' + 'image' => 'medias/klore/images/defense/large-shield-dome.jpg' ), // }}} // -// Special labels +// Special defenses labels // {{{ + Legacies_Empire::ID_SPECIAL_ANTIBALLISTIC_MISSILE => array( + 'name' => 'Missile anti-balistique', + 'description' => '', + 'image' => 'medias/klore/images/defense/antiballistic-missile.jpg' + ), + Legacies_Empire::ID_SPECIAL_INTERPLANETARY_MISSILE => array( 'name' => 'Missile stratégique', 'description' => '', - 'image' => 'graphics/defenses/interplanetary-missile.png' + 'image' => 'medias/klore/images/defense/interplanetary-missile.jpg' ) // }}} ); diff --git a/src/fleet.php b/src/fleet.php index 59b687b..e43bc39 100644 --- a/src/fleet.php +++ b/src/fleet.php @@ -31,6 +31,7 @@ define('INSIDE' , true); define('INSTALL' , false); require_once dirname(__FILE__) .'/application/bootstrap.php'; +$labels = Wootook_Empire_Helper_Config_Labels::getSingleton(); //Compteur de flotte en expéditions et nombre d'expédition maximum $maxExpedition = $user->getElement(Legacies_Empire::ID_RESEARCH_EXPEDITION_TECHNOLOGY); @@ -230,11 +231,11 @@ $ShipData = ""; $have_ships = false; foreach ($reslist['fleet'] as $n => $i) { - if ($planet[$resource[$i]] > 0) { + if ($planet->getElement($i) > 0) { $page .= "