aboutsummaryrefslogtreecommitdiffstats
path: root/inc/Item.inc
diff options
context:
space:
mode:
authorpiernov <piernov@piernov.org>2016-04-27 20:53:43 +0200
committerpiernov <piernov@piernov.org>2016-04-27 20:53:43 +0200
commit807e528d6a1ae40ab118f711fe2e8c2bb7df915a (patch)
tree1d4fbde95ff281d5bb628dcc545401146e26ff15 /inc/Item.inc
parent2b0a84a41eeb90094d42c3c516bf99837d08a745 (diff)
parentcaf62cfe0e439fc13f7c297954c4aeb21112a2ec (diff)
downloadcandybox-807e528d6a1ae40ab118f711fe2e8c2bb7df915a.tar.gz
candybox-807e528d6a1ae40ab118f711fe2e8c2bb7df915a.tar.bz2
candybox-807e528d6a1ae40ab118f711fe2e8c2bb7df915a.tar.xz
candybox-807e528d6a1ae40ab118f711fe2e8c2bb7df915a.zip
Merge branch 'feat/savegame' into piernov
Diffstat (limited to 'inc/Item.inc')
-rw-r--r--inc/Item.inc8
1 files changed, 8 insertions, 0 deletions
diff --git a/inc/Item.inc b/inc/Item.inc
index bf77818..bef6d00 100644
--- a/inc/Item.inc
+++ b/inc/Item.inc
@@ -12,6 +12,14 @@ class Item {
$this->icon = $icon;
$this->desc = $desc;
}
+
+ function addToXML($root) {
+ $item = $root->addChild("item");
+ $item->addChild("name", $this->name);
+ $item->addChild("cost", $this->cost);
+ $item->addChild("icon", $this->icon);
+ $item->addChild("desc", $this->desc);
+ }
}
?>