#1470 some fixes on stuctural API
--HG-- branch : gsoc2012-achievements
This commit is contained in:
parent
ad0bbe922f
commit
964ce26025
1 changed files with 20 additions and 6 deletions
|
@ -12,6 +12,7 @@
|
|||
require_once($_CONF['app_achievements_path']."class/Tieable_inter.php");
|
||||
require_once($_CONF['app_achievements_path']."class/NodeIterator_class.php");
|
||||
require_once($_CONF['app_achievements_path']."class/Node_trait.php");
|
||||
require_once($_CONF['app_achievements_path']."class/InDev_trait.php");
|
||||
|
||||
require_once($_CONF['app_achievements_path']."class/AchMenu_class.php");
|
||||
require_once($_CONF['app_achievements_path']."class/AchMenuNode_class.php");
|
||||
|
@ -21,7 +22,7 @@
|
|||
require_once($_CONF['app_achievements_path']."class/AchPerk_class.php");
|
||||
require_once($_CONF['app_achievements_path']."class/AchObjective_class.php");
|
||||
|
||||
class RUser() {
|
||||
class RUser {
|
||||
function RUser() { }
|
||||
|
||||
function getLang() {
|
||||
|
@ -31,6 +32,18 @@
|
|||
function getID() {
|
||||
return 0;
|
||||
}
|
||||
|
||||
function getCult() {
|
||||
return "%";
|
||||
}
|
||||
|
||||
function getCiv() {
|
||||
return "%";
|
||||
}
|
||||
|
||||
function getRace() {
|
||||
return "%";
|
||||
}
|
||||
}
|
||||
|
||||
$_USER = new RUser();
|
||||
|
@ -45,7 +58,7 @@
|
|||
function print_cat(&$iter3) {
|
||||
while($iter3->hasNext()) {
|
||||
$curr3 = $iter3->getNext();
|
||||
echo "<achievement id='".$curr3->getID()."' parent='".$curr3->getParentID()."' image='".$_CONF['image_url']."pic/icon/".$curr3->getImage()."'><name><![CDATA[".$curr3->getName()."]]></name>";
|
||||
echo "<achievement id='".$curr3->getID()."' parent='".$curr3->getParentID()."' image='".$_CONF['image_url']."pic/icon/".$curr3->getImage()."'><name><![CDATA[".$curr3->getName()."]]></name><ties>";
|
||||
if($curr3->getTieRace() != null) {
|
||||
echo "<tie type='race'>".$curr3->getTieRace()."</tie>";
|
||||
}
|
||||
|
@ -55,14 +68,15 @@
|
|||
if($curr3->getTieCiv() != null) {
|
||||
echo "<tie type='civilization'>".$curr3->getTieCiv()."</tie>";
|
||||
}
|
||||
echo "</ties>";
|
||||
$iter4 = $curr3->getIterator();
|
||||
while($iter4->hasNext()) {
|
||||
$curr4 = $iter4->getNext();
|
||||
echo "<perk id='".$curr4->getID()."' parent='".$curr4->getParentID()."' value='".$curr4->getValueOpen()."'><name><![CDATA[".$curr4->getName()."]]></name>";
|
||||
echo "<perk id='".$curr4->getID()."' parent='".$curr4->getParentID()."' value='".$curr4->getValue()."'><name><![CDATA[".$curr4->getDisplayName()."]]></name>";
|
||||
$iter5 = $curr4->getIterator();
|
||||
while($iter5->hasNext()) {
|
||||
$curr5 = $iter5->getNext();
|
||||
echo "<objective id='".$curr5->getID()."' type='".$curr5->getDisplay()."' value='".$curr5->getValue()."' meta='".$_CONF['image_url']."pic/icon/".$curr5->getMetaImage()."'><name><![CDATA[".$curr5->getName()."]]></name></objective>";
|
||||
echo "<objective id='".$curr5->getID()."' type='".$curr5->getDisplay()."' value='".$curr5->getValue()."' meta='".$_CONF['image_url']."pic/icon/".$curr5->getMetaImage()."'><name><![CDATA[".$curr5->getDisplayName()."]]></name></objective>";
|
||||
}
|
||||
echo "</perk>";
|
||||
}
|
||||
|
@ -83,13 +97,13 @@
|
|||
echo "<category id='".$curr2->getID()."' order='".$curr2->getOrder()."' image='".$_CONF['image_url']."pic/menu/".$curr2->getImage()."'><name><![CDATA[".$curr2->getName()."]]></name>";
|
||||
$cat = new AchCategory($curr2->getID(),null,null);
|
||||
$iter3 = $cat->getIterator();
|
||||
prin_cat($iter3);
|
||||
print_cat($iter3);
|
||||
echo "</category>";
|
||||
}
|
||||
|
||||
$cat = new AchCategory($curr->getID(),null,null);
|
||||
$iter3 = $cat->getIterator();
|
||||
prin_cat($iter3);
|
||||
print_cat($iter3);
|
||||
echo "</category>";
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue