From 500746b0c7e7388946ff514c4d3be87274b81c76 Mon Sep 17 00:00:00 2001 From: rylon Date: Tue, 25 Nov 2014 01:37:56 +0100 Subject: [PATCH] started inventory --- mojotrollz/api/char/css/inventory.css | 0 mojotrollz/api/char/inventory.php | 15 +++++++++++++++ mojotrollz/api/char/tpl/inventory.tpl | 3 +++ mojotrollz/api/char/tpl/inventory_item.tpl | 4 ++++ .../wizard_visuals/tpl/wizard_visuals.tpl | 19 +------------------ .../page/wizard_visuals/wizard_visuals.php | 1 + 6 files changed, 24 insertions(+), 18 deletions(-) create mode 100644 mojotrollz/api/char/css/inventory.css create mode 100644 mojotrollz/api/char/inventory.php create mode 100644 mojotrollz/api/char/tpl/inventory.tpl create mode 100644 mojotrollz/api/char/tpl/inventory_item.tpl diff --git a/mojotrollz/api/char/css/inventory.css b/mojotrollz/api/char/css/inventory.css new file mode 100644 index 0000000..e69de29 diff --git a/mojotrollz/api/char/inventory.php b/mojotrollz/api/char/inventory.php new file mode 100644 index 0000000..f5feeb9 --- /dev/null +++ b/mojotrollz/api/char/inventory.php @@ -0,0 +1,15 @@ +'; + for($i = 1; $i <= $x; $i++){ + $vars['items'] .= \SYSTEM\PAGE\replace::replaceFile(SYSTEM\SERVERPATH(new PAPI(),'char/tpl/inventory_item.tpl'), array()); + } + $vars['items'] .= ''; + } + return \SYSTEM\PAGE\replace::replaceFile(SYSTEM\SERVERPATH(new PAPI(),'char/tpl/inventory.tpl'), $vars); + } +} \ No newline at end of file diff --git a/mojotrollz/api/char/tpl/inventory.tpl b/mojotrollz/api/char/tpl/inventory.tpl new file mode 100644 index 0000000..8f90c91 --- /dev/null +++ b/mojotrollz/api/char/tpl/inventory.tpl @@ -0,0 +1,3 @@ +
+ ${items} +
\ No newline at end of file diff --git a/mojotrollz/api/char/tpl/inventory_item.tpl b/mojotrollz/api/char/tpl/inventory_item.tpl new file mode 100644 index 0000000..bac1b03 --- /dev/null +++ b/mojotrollz/api/char/tpl/inventory_item.tpl @@ -0,0 +1,4 @@ +
+ +
${count}
+
\ No newline at end of file diff --git a/mojotrollz/page/wizard_visuals/tpl/wizard_visuals.tpl b/mojotrollz/page/wizard_visuals/tpl/wizard_visuals.tpl index 206e1e4..feedd42 100644 --- a/mojotrollz/page/wizard_visuals/tpl/wizard_visuals.tpl +++ b/mojotrollz/page/wizard_visuals/tpl/wizard_visuals.tpl @@ -1,22 +1,5 @@ ${equipment} -
- - - - - - - - - - - - - - - - -
+${inventory}
${visual_skin} diff --git a/mojotrollz/page/wizard_visuals/wizard_visuals.php b/mojotrollz/page/wizard_visuals/wizard_visuals.php index aaadcd7..1116c97 100644 --- a/mojotrollz/page/wizard_visuals/wizard_visuals.php +++ b/mojotrollz/page/wizard_visuals/wizard_visuals.php @@ -26,6 +26,7 @@ class wizard_visuals extends SYSTEM\PAGE\Page { $vars['char_equip'], $vars['char_skin_color'], $vars['char_hair'], $vars['char_hair_color'], $vars['char_face'], $vars['char_facial_hair'], $vars['char_facial_hair_color']); + $vars['inventory'] = inventory::generate(5, 9); $vars['INV_PICS'] = \SYSTEM\FILES\files::getURL('inventory'); $vars['visual_skin'] = self::select($vars['char_race'], race_visuals::VISUAL_SKIN, $vars['char_skin_color']); $vars['visual_hair'] = self::select($vars['char_race'], race_visuals::VISUAL_HAIR, $vars['char_hair']);