Beispiel #1
0
 /**
  * Constructor. Handles requests for this page.
  *
  * @return Bengine_Game_Controller_Mission
  */
 protected function init()
 {
     Core::getTPL()->addHTMLHeaderFile("fleet.js", "js");
     Core::getLanguage()->load(array("info", "mission"));
     if (!Core::getUser()->get("umode") && $this->isPost()) {
         if ($this->getParam("stargatejump")) {
             $this->starGateJump(Core::getRequest()->getPOST());
         }
         if ($this->getParam("execjump")) {
             $this->executeJump($this->getParam("moonid"));
         }
         if ($this->getParam("retreat")) {
             $this->retreatFleet($this->getParam("id"));
         }
         if ($this->getParam("formation")) {
             $this->formation($this->getParam("id"));
         }
         if ($this->getParam("invite")) {
             $this->invite($this->getParam("id"), $this->getParam("name"), $this->getParam("username"));
         }
         if ($this->getParam("step2")) {
             $this->selectCoordinates($this->getParam("galaxy"), $this->getParam("system"), $this->getParam("position"), $this->getParam("targetType"), $this->getParam("code"), Core::getRequest()->getPOST());
         }
         if ($this->getParam("step3")) {
             $this->selectMission($this->getParam("galaxy"), $this->getParam("system"), $this->getParam("position"), $this->getParam("targetType"), $this->getParam("speed"), $this->getParam("code"), $this->getParam("formation"));
         }
         if ($this->getParam("step4")) {
             $this->sendFleet($this->getParam("mode"), $this->getParam("metal"), $this->getParam("silicon"), $this->getParam("hydrogen"), $this->getParam("holdingtime"));
         }
     }
     return parent::init();
 }
Beispiel #2
0
 /**
  * Handles the moderator class.
  *
  * @return void
  */
 protected function init()
 {
     Core::getUser()->checkPermissions("CAN_MODERATE_USER");
     Core::getLanguage()->load(array("Prefs", "Statistics", "Registration"));
     $this->userid = Core::getRequest()->getPOST("userid") ? Core::getRequest()->getPOST("userid") : Core::getRequest()->getGET("1");
     parent::init();
 }
Beispiel #3
0
 /**
  * Main method to display a sun system.
  *
  * @return Bengine_Game_Controller_Galaxy
  */
 protected function init()
 {
     Core::getLanguage()->load(array("Galaxy", "Statistics"));
     $this->missileRange = Game::getRocketRange();
     $this->viewConsumption = (int) Core::getOptions()->get("GALAXY_VIEW_CONSUMPTION");
     if (Core::getRequest()->getGET("1") && Core::getRequest()->getGET("2")) {
         $this->setCoordinatesByGet(Core::getRequest()->getGET("1"), Core::getRequest()->getGET("2"));
     }
     return parent::init();
 }
Beispiel #4
0
 /**
  * Constructor: Handles post and get actions.
  *
  * @return Bengine_Game_Controller_Alliance
  */
 protected function init()
 {
     Core::getLanguage()->load("Alliance");
     // Set alliance id for the current session.
     $this->aid = Core::getUser()->get("aid");
     if (Core::getRequest()->getGET("1") && in_array($this->getParam("action"), $this->aidActions)) {
         $this->aid = Core::getRequest()->getGET("1");
     } else {
         if (Core::getRequest()->getPOST("aid")) {
             $this->aid = Core::getRequest()->getPOST("aid");
         }
     }
     return parent::init();
 }
Beispiel #5
0
 /**
  * Shows account and planet overview.
  *
  * @return Bengine_Game_Controller_Index
  */
 protected function init()
 {
     Core::getLanguage()->load(array("Main", "info", "Galaxy", "buildings"));
     return parent::init();
 }
Beispiel #6
0
 /**
  * Shows overview on resource production and options.
  *
  * @return Bengine_Game_Controller_Resource
  */
 protected function init()
 {
     Core::getLanguage()->load("Resource,info,buildings");
     $this->loadBuildingData();
     return parent::init();
 }
Beispiel #7
0
 /**
  * Shows edit form.
  *
  * @return Bengine_Game_Controller_Construction_Edit
  */
 protected function init()
 {
     Core::getUser()->checkPermissions("CAN_EDIT_CONSTRUCTIONS");
     Core::getLanguage()->load("Administrator");
     return parent::init();
 }
 /**
  * Shows the fleet events of the stated planet.
  * Firstly, check for validation (Range, consumption, ...)
  *
  * @return Bengine_Game_Controller_MonitorPlanet
  */
 protected function init()
 {
     $this->planetid = Core::getRequest()->getGET("1");
     $this->planetData = Game::getModel("game/planet")->load($this->planetid);
     return parent::init();
 }
Beispiel #9
0
 /**
  * Constructor: Displays message folders.
  *
  * @return Bengine_Game_Controller_MSG
  */
 protected function init()
 {
     Core::getLanguage()->load(array("Message"));
     return parent::init();
 }
Beispiel #10
0
 /**
  * Constructor: loads language group.
  *
  * @return Bengine_Game_Controller_Statistics
  */
 protected function init()
 {
     Core::getLang()->load(array("Statistics", "info", "buildings"));
     return parent::init();
 }
Beispiel #11
0
 /**
  * Constructor: Shows informations about an unit.
  *
  * @return Bengine_Game_Controller_Unit
  */
 protected function init()
 {
     Core::getLanguage()->load(array("Administrator", "UnitInfo", "buildings", "info"));
     $this->id = $this->getParam("1");
     return parent::init();
 }
Beispiel #12
0
 /**
  * Loads basic language groups.
  *
  * @return Bengine_Game_Controller_MSG
  */
 protected function init()
 {
     Core::getLanguage()->load(array("Statistics", "Galaxy", "Profile"));
     return parent::init();
 }
 /**
  * Shows the preferences form.
  *
  * @return Bengine_Game_Controller_Preferences
  */
 protected function init()
 {
     Core::getLanguage()->load(array("Prefs"));
     Hook::event("ShowUserPreferences");
     return parent::init();
 }