diff options
author | piernov <piernov@piernov.org> | 2016-04-27 20:53:43 +0200 |
---|---|---|
committer | piernov <piernov@piernov.org> | 2016-04-27 20:53:43 +0200 |
commit | 807e528d6a1ae40ab118f711fe2e8c2bb7df915a (patch) | |
tree | 1d4fbde95ff281d5bb628dcc545401146e26ff15 /inc/Item.inc | |
parent | 2b0a84a41eeb90094d42c3c516bf99837d08a745 (diff) | |
parent | caf62cfe0e439fc13f7c297954c4aeb21112a2ec (diff) | |
download | candybox-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.inc | 8 |
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); + } } ?> |