Implemented Features and Items granting effects, actions, attacks and spells

This commit is contained in:
Thaum
2015-01-06 12:25:58 +00:00
parent c55f2c51ab
commit 2d70119ee0
48 changed files with 625 additions and 442 deletions

View File

@@ -1,10 +0,0 @@
<template name="containerTable">
<div>
<h3>{{name}}</h3>
<table>
{{#each items}}
{{> itemRow}}
{{/each}}
</table>
</div>
</template>

View File

@@ -1,5 +0,0 @@
Template.containerTable.helpers({
items: function(){
return Items.find({container: this._id});
}
});

View File

@@ -1,6 +1,20 @@
<template name="inventory">
<div class="flexItem floatBox">
<h2>Inventory</h2>
{{> inventoryTables}}
<paper-shadow class="equipment">
Armor: {{#if equippedArmor}}{{equippedArmor}}{{else}}None{{/if}}
</paper-shadow>
<div class="containers">
{{#each containers}}
<paper-shadow>
<h3>{{name}}</h3>
<table>
{{#each items}}
<tr class={{#if isSelected}}selected{{/if}}>
<td>{{#if stackable}}{{quantity}}{{/if}}</td>
<td>{{pluralName}}</td>
</tr>
{{/each}}
</table>
</paper-shadow>
{{/each}}
</div>
</template>

View File

@@ -1,5 +0,0 @@
<template name="inventoryTables">
{{#each containers}}
{{> containerTable}}
{{/each}}
</template>

View File

@@ -1,5 +0,0 @@
Template.inventoryTables.helpers({
containers: function(){
return Containers.find({owner: this._id});
}
});

View File

@@ -1,3 +0,0 @@
tr.selected{
background-color: #4182BC;
}

View File

@@ -1,6 +0,0 @@
<template name="itemRow">
<tr class={{#if isSelected}}selected{{/if}}>
<td>{{#if stackable}}{{quantity}}{{/if}}</td>
<td>{{pluralName}}</td>
</tr>
</template>

View File

@@ -1,15 +0,0 @@
Template.itemRow.helpers({
isSelected: function(){
return Session.get('selectedItemRow')=== this._id;
}
});
Template.itemRow.events({
"click": function(e){
if(Session.get('selectedItemRow')=== this._id){
Session.set('selectedItemRow', null);
} else{
Session.set('selectedItemRow', this._id);
}
}
});