Refactored to 2 namespaces: Wootook & Legacies

Signed-off-by: Gregory PLANCHAT <g.planchat@gmail.com>
This commit is contained in:
Gregory PLANCHAT 2011-10-04 19:57:00 +02:00
commit ec7e40e1aa
1004 changed files with 4808 additions and 2971 deletions

View file

@ -1,11 +1,11 @@
<?php
/**
* This file is part of XNova:Legacies
* This file is part of Wootook
*
* @license http://www.gnu.org/licenses/gpl-3.0.txt
* @see http://www.xnova-ng.org/
* @see http://www.wootook.com/
*
* Copyright (c) 2009-Present, XNova Support Team <http://www.xnova-ng.org>
* Copyright (c) 2009-Present, Wootook Support Team <http://www.xnova-ng.org>
* All rights reserved.
*
* This program is free software: you can redistribute it and/or modify
@ -24,16 +24,16 @@
* --> NOTICE <--
* This file is part of the core development branch, changing its contents will
* make you unable to use the automatic updates manager. Please refer to the
* documentation for further information about customizing XNova.
* documentation for further information about customizing Wootook.
*
*/
define('INSIDE' , true);
define('INSTALL' , false);
require_once dirname(__FILE__) .'/common.php';
require_once dirname(__FILE__) .'/application/bootstrap.php';
includeLang('fleet');
$session = Legacies::getSession('fleet');
$session = Wootook::getSession('fleet');
$galaxy = isset($_POST['galaxy']) ? intval($_POST['galaxy']) : 0;
$system = isset($_POST['system']) ? intval($_POST['system']) : 0;
@ -46,10 +46,10 @@ $coords = array(
'system' => $system,
'position' => $planet
);
$destination = Legacies_Empire_Model_Planet::factoryFromCoords($coords, $planettype);
$destination = Wootook_Empire_Model_Planet::factoryFromCoords($coords, $planettype);
$session['planet_destination'] = $destination->getId();
$user = Legacies_Empire_Model_User::getSingleton();
$user = Wootook_Empire_Model_User::getSingleton();
$planetrow = $user->getCurrentPlanet();
$YourPlanet = false;
@ -69,15 +69,15 @@ $missionTypes = array();
if ($position == (MAX_PLANET_IN_SYSTEM + 1)) {
$missionTypes[Legacies_Empire::ID_MISSION_EXPEDITION] = $lang['type_mission'][Legacies_Empire::ID_MISSION_EXPEDITION];
} else {
if ($planettype == Legacies_Empire_Model_Planet::TYPE_DEBRIS) {
if ($planettype == Wootook_Empire_Model_Planet::TYPE_DEBRIS) {
if (isset($fleetArray[Legacies_Empire::ID_SHIP_RECYCLER]) && $fleetArray[Legacies_Empire::ID_SHIP_RECYCLER] > 0) {
$missionTypes[Legacies_Empire::ID_MISSION_RECYCLE] = $lang['type_mission'][Legacies_Empire::ID_MISSION_RECYCLE];
}
} else if ($planettype == Legacies_Empire_Model_Planet::TYPE_PLANET) {
} else if ($planettype == Wootook_Empire_Model_Planet::TYPE_PLANET) {
if (isset($fleetArray[Legacies_Empire::ID_SHIP_COLONY_SHIP]) && $fleetArray[Legacies_Empire::ID_SHIP_COLONY_SHIP] > 0 && !$UsedPlanet) {
$missionTypes[Legacies_Empire::ID_MISSION_SETTLE_COLONY] = $lang['type_mission'][7];
}
} else if ($planettype == Legacies_Empire_Model_Planet::TYPE_MOON) {
} else if ($planettype == Wootook_Empire_Model_Planet::TYPE_MOON) {
if (((isset($fleetArray[Legacies_Empire::ID_SHIP_DEATH_STAR]) && $fleetArray[Legacies_Empire::ID_SHIP_DEATH_STAR] > 0) ||
(isset($fleetArray[Legacies_Empire::ID_SHIP_SUPERNOVA]) && $fleetArray[Legacies_Empire::ID_SHIP_SUPERNOVA] > 0)) &&
!$YourPlanet && $UsedPlanet) {
@ -85,7 +85,7 @@ if ($position == (MAX_PLANET_IN_SYSTEM + 1)) {
}
}
if (in_array($planettype, array(Legacies_Empire_Model_Planet::TYPE_MOON, Legacies_Empire_Model_Planet::TYPE_PLANET))) {
if (in_array($planettype, array(Wootook_Empire_Model_Planet::TYPE_MOON, Wootook_Empire_Model_Planet::TYPE_PLANET))) {
if (isset($fleetArray[Legacies_Empire::ID_SHIP_SPY_DRONE]) && $fleetArray[Legacies_Empire::ID_SHIP_SPY_DRONE] > 0 && !$YourPlanet) {
$missionTypes[Legacies_Empire::ID_MISSION_SPY] = $lang['type_mission'][Legacies_Empire::ID_MISSION_SPY];
}