Updated page display
Updated signature image generator Navigation menu has been finalized Some deprectaed templates has been removed Fixed registration Fixed galaxy notices messages Signed-off-by: Gregory PLANCHAT <g.planchat@gmail.com>
This commit is contained in:
parent
ec7e40e1aa
commit
6d61e93c47
67 changed files with 10177 additions and 940 deletions
|
|
@ -0,0 +1,87 @@
|
|||
<?php
|
||||
/**
|
||||
* This file is part of Wootook
|
||||
*
|
||||
* @license http://www.gnu.org/licenses/agpl-3.0.txt
|
||||
* @see http://www.wootook.com/
|
||||
*
|
||||
* Copyright (c) 2011-Present, Grégory PLANCHAT <g.planchat@gmail.com>
|
||||
* All rights reserved.
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* --> 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 Wootook.
|
||||
*
|
||||
*/
|
||||
|
||||
/**
|
||||
*
|
||||
* Enter description here ...
|
||||
* @author Greg
|
||||
*
|
||||
*/
|
||||
class Legacies_Empire_Block_Planet_Shipyard_Queue_Item
|
||||
extends Wootook_Empire_Block_Planet_Builder_Queue_ItemAbstract
|
||||
{
|
||||
protected $_itemIdField = 'research_id';
|
||||
|
||||
public function getLevel()
|
||||
{
|
||||
return $this->getPlanet()->getElement($this->getItemId());
|
||||
}
|
||||
|
||||
public function getResourcesNeeded($level)
|
||||
{
|
||||
return $this->getPlanet()->getShipyard()->getResourcesNeeded($this->getItemId(), 1);
|
||||
}
|
||||
|
||||
public function getBuildingTime($qty)
|
||||
{
|
||||
return $this->getPlanet()->getShipyard()->getBuildingTime($this->getItemId(), $qty);
|
||||
}
|
||||
|
||||
public function getResourcesConfigForLevel($qty)
|
||||
{
|
||||
$resources = $this->getResourcesNeeded($qty);
|
||||
|
||||
$resourceConfig = array();
|
||||
foreach ($resources as $resourceId => $resourceValue) {
|
||||
$resourceConfig[$resourceId] = new Wootook_Object(array(
|
||||
'resource_id' => $resourceId,
|
||||
'value' => $resourceValue
|
||||
));
|
||||
|
||||
$amount = $this->getPlanet()->getResourceAmount($resourceId);
|
||||
if (Math::comp($amount, $resourceValue) < 0) {
|
||||
$resourceConfig[$resourceId]->setData('requirement', Math::sub($amount, $resourceValue));
|
||||
} else {
|
||||
$resourceConfig[$resourceId]->setData('overflow', Math::sub($amount, $resourceValue));
|
||||
}
|
||||
}
|
||||
return $resourceConfig;
|
||||
}
|
||||
|
||||
public function getResourcesConfigForNextLevel()
|
||||
{
|
||||
return $this->getResourcesConfigForLevel($this->getNextLevel());
|
||||
}
|
||||
|
||||
public function getBuildingTimeForNextLevel()
|
||||
{
|
||||
return $this->getBuildingTime($this->getNextLevel());
|
||||
}
|
||||
}
|
||||
|
|
@ -325,7 +325,12 @@ class Legacies_Empire_Model_Planet_Building_Shipyard_Builder
|
|||
return $this;
|
||||
}
|
||||
|
||||
$this->enqueue($shipId, $qty, $time);
|
||||
$this->enqueue(array(
|
||||
'ship_id' => $shipId,
|
||||
'qty' => $qty,
|
||||
'created_at' => $time,
|
||||
'updated_at' => $time
|
||||
));
|
||||
$this->_currentPlanet->setData('b_hangar_id', $this->serialize());
|
||||
|
||||
foreach ($remainingAmounts as $resourceId => $resourceAmount) {
|
||||
|
|
|
|||
|
|
@ -46,10 +46,10 @@ class Legacies_Officers_Model_Observer
|
|||
if ($user->getData('lvl_minier') < $level) {
|
||||
$difference = $level - $user->getData('lvl_minier');
|
||||
if ($difference == 1) {
|
||||
Wootook::getSession(Legacies_Empire_Model_User::SESSION_KEY)
|
||||
Wootook::getSession(Wootook_Empire_Model_User::SESSION_KEY)
|
||||
->addInfo('You gained 1 miner level.');
|
||||
} else {
|
||||
Wootook::getSession(Legacies_Empire_Model_User::SESSION_KEY)
|
||||
Wootook::getSession(Wootook_Empire_Model_User::SESSION_KEY)
|
||||
->addInfo('You gained %1$d miner level.', (int) $difference);
|
||||
}
|
||||
}
|
||||
|
|
@ -58,10 +58,10 @@ class Legacies_Officers_Model_Observer
|
|||
if ($user->getData('lvl_raid') < $level) {
|
||||
$difference = $level - $user->getData('lvl_raid');
|
||||
if ($difference == 1) {
|
||||
Wootook::getSession(Legacies_Empire_Model_User::SESSION_KEY)
|
||||
Wootook::getSession(Wootook_Empire_Model_User::SESSION_KEY)
|
||||
->addInfo('You gained 1 raider level.');
|
||||
} else {
|
||||
Wootook::getSession(Legacies_Empire_Model_User::SESSION_KEY)
|
||||
Wootook::getSession(Wootook_Empire_Model_User::SESSION_KEY)
|
||||
->addInfo('You gained %1$d raider level.', (int) $difference);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue