started inventory
This commit is contained in:
parent
d60185278b
commit
500746b0c7
0
mojotrollz/api/char/css/inventory.css
Normal file
0
mojotrollz/api/char/css/inventory.css
Normal file
15
mojotrollz/api/char/inventory.php
Normal file
15
mojotrollz/api/char/inventory.php
Normal file
@ -0,0 +1,15 @@
|
||||
<?php
|
||||
class inventory {
|
||||
public static function generate($x,$y,$items=null){
|
||||
$vars = array();
|
||||
$vars['items'] = '';
|
||||
for($j = 1; $j <= $y; $j++){
|
||||
$vars['items'] .= '<div>';
|
||||
for($i = 1; $i <= $x; $i++){
|
||||
$vars['items'] .= \SYSTEM\PAGE\replace::replaceFile(SYSTEM\SERVERPATH(new PAPI(),'char/tpl/inventory_item.tpl'), array());
|
||||
}
|
||||
$vars['items'] .= '</div>';
|
||||
}
|
||||
return \SYSTEM\PAGE\replace::replaceFile(SYSTEM\SERVERPATH(new PAPI(),'char/tpl/inventory.tpl'), $vars);
|
||||
}
|
||||
}
|
||||
3
mojotrollz/api/char/tpl/inventory.tpl
Normal file
3
mojotrollz/api/char/tpl/inventory.tpl
Normal file
@ -0,0 +1,3 @@
|
||||
<div style="float:left; width: 240px; height: 432px; margin-top: 5px; margin-left: 5px; border: solid back 1px; background: url(${INV_PICS}Ui-paperdoll-slot-empty2.png);">
|
||||
${items}
|
||||
</div>
|
||||
4
mojotrollz/api/char/tpl/inventory_item.tpl
Normal file
4
mojotrollz/api/char/tpl/inventory_item.tpl
Normal file
@ -0,0 +1,4 @@
|
||||
<div class="item" id="${id}" style="float: left;">
|
||||
<img src="./api.php?call=files&cat=skilltree&id=spacer.gif" class="item_icon" alt="" id="${id}i">
|
||||
<div class="item_count" id="${id}c" count="${count}">${count}</div>
|
||||
</div>
|
||||
@ -1,22 +1,5 @@
|
||||
${equipment}
|
||||
<div style="float:left; width: 240px; height: 432px; margin-top: 5px; margin-left: 5px; border: solid back 1px; background: url(${INV_PICS}Ui-paperdoll-slot-empty2.png);">
|
||||
<img class="item" src="${INV_PICS}help_questionmark.png" width="48px" style=""/>
|
||||
<img class="item" src="${INV_PICS}help_questionmark.png" width="48px" style=""/>
|
||||
<img class="item" src="${INV_PICS}help_questionmark.png" width="48px" style=""/>
|
||||
<img class="item" src="${INV_PICS}help_questionmark.png" width="48px" style=""/>
|
||||
<img class="item" src="${INV_PICS}help_questionmark.png" width="48px" style=""/>
|
||||
<img class="item" src="${INV_PICS}help_questionmark.png" width="48px" style=""/>
|
||||
<img class="item" src="${INV_PICS}help_questionmark.png" width="48px" style=""/>
|
||||
<img class="item" src="${INV_PICS}help_questionmark.png" width="48px" style=""/>
|
||||
<img class="item" src="${INV_PICS}help_questionmark.png" width="48px" style=""/>
|
||||
<img class="item" src="${INV_PICS}help_questionmark.png" width="48px" style=""/>
|
||||
<img class="item" src="${INV_PICS}help_questionmark.png" width="48px" style=""/>
|
||||
<img class="item" src="${INV_PICS}help_questionmark.png" width="48px" style=""/>
|
||||
<img class="item" src="${INV_PICS}help_questionmark.png" width="48px" style=""/>
|
||||
<img class="item" src="${INV_PICS}help_questionmark.png" width="48px" style=""/>
|
||||
<img class="item" src="${INV_PICS}help_questionmark.png" width="48px" style=""/>
|
||||
<img class="item" src="${INV_PICS}help_questionmark.png" width="48px" style=""/>
|
||||
</div>
|
||||
${inventory}
|
||||
<div style="padding: 5px; float: left;">
|
||||
<table>
|
||||
${visual_skin}
|
||||
|
||||
@ -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']);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user