Skip to content

Commit

Permalink
Merge pull request #49 from AngryBeaver/3.1.2
Browse files Browse the repository at this point in the history
fix collision with better roll table
  • Loading branch information
AngryBeaver authored Apr 9, 2023
2 parents 8059d3e + b799e35 commit 6e3c29e
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 19 deletions.
6 changes: 5 additions & 1 deletion changelog.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
# Changelog
## 3.1.x folders
## 3.1.2
- fix collision to better roll tables
## 3.1.1
- css bug in some browsers
## 3.1.0
- add folder structure
- ui redesign beavers recipe compendium add responsiveness
Expand All @@ -11,7 +16,6 @@
- fix more then two tests
- ui redesign crafting tab on actor
- ui redesign chatMessage
- todo create tutorial video

## 3.0.x progress tracking and multiple tests
## 3.0.2
Expand Down
2 changes: 1 addition & 1 deletion module.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"title": "Beaver's Crafting Module",
"description": "A Crafting Module for DnD",
"id": "beavers-crafting",
"version": "3.1.1",
"version": "3.1.2",
"authors": [
{
"name": "angryBeaver",
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "beavers-crafting",
"title": "Beaver's Crafting",
"version": "3.1.1",
"version": "3.1.2",
"description": "Crafting",
"devDir": "C:\\Users\\Riess\\AppData\\Local\\FoundryVTT\\Data\\modules",
"#devDir": "C:\\data\\Data\\modules",
Expand Down
12 changes: 4 additions & 8 deletions src/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -120,12 +120,8 @@ Hooks.once("beavers-system-interface.ready", async function(){
});

//fucking stupid handlebars !!!
Handlebars.registerHelper('hasKey', function (param1, key, options) {
if (param1[key]) {
return options.fn(this);
}
return options.inverse(this);
});
Handlebars.registerHelper('isEmpty', function (object, options) {
return Object.keys(object).length === 0;
Handlebars.registerHelper('beavers-isEmpty', function (value, options) {
return value === undefined ||
(value instanceof Object && Object.keys(value).length === 0) ||
(value instanceof Array && value.length === 0)
});
16 changes: 8 additions & 8 deletions templates/beavers-recipe.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@
</div>
<div class="flexrow" style="flex-basis:auto">
{{#if chatData}}
{{#if (not isEmpty chatData.components.required)}}
{{#if (not (beavers-isEmpty chatData.components.required))}}
<div class="flexcol" style="min-width:200px">
<div class="header">
{{localize "beaversCrafting.crafting-app.required"}}
Expand All @@ -75,7 +75,7 @@
</div>
</div>
{{/if}}
{{#if (not isEmpty chatData.components.consumed)}}
{{#if (not (beavers-isEmpty chatData.components.consumed))}}
<div class="flexcol" style="min-width:200px">
<div class="header">
{{localize "beaversCrafting.crafting-app.cost"}}
Expand All @@ -90,7 +90,7 @@
</div>
</div>
{{/if}}
{{#if (not isEmpty chatData.components.produced)}}
{{#if (not (beavers-isEmpty chatData.components.produced))}}
<div class="flexcol" style="min-width:200px">
<div class="header">
{{localize "beaversCrafting.crafting-app.result"}}
Expand All @@ -106,7 +106,7 @@
</div>
{{/if}}
{{else}}
{{#if (not (isEmpty recipe.attendants))}}
{{#if (not (beavers-isEmpty recipe.attendants))}}
<div class="flexcol" style="min-width:200px">
<div class="header">
{{localize "beaversCrafting.crafting-app.required"}}
Expand All @@ -121,19 +121,19 @@
</div>
</div>
{{/if}}
{{#if (or currencyComponent (not (isEmpty recipe.ingredients)))}}
{{#if (or currencyComponent (not (beavers-isEmpty recipe.ingredients)))}}
<div class="flexcol" style="min-width:200px">
<div class="header">
{{localize "beaversCrafting.crafting-app.cost"}}
</div>
<div class="flexcol ingredients section">
{{#if currencyComponent}}
{{>beavers-recipe-component component=currencyComponent status=precast.currencies.status}}
{{#if (not (isEmpty recipe.ingredients))}}
{{#if (not (beavers-isEmpty recipe.ingredients))}}
<div class="beavers-seperator"></div>
{{/if}}
{{/if}}
{{#if (not (isEmpty recipe.ingredients))}}
{{#if (not (beavers-isEmpty recipe.ingredients))}}
{{#each recipe.ingredients}}
{{>beavers-recipe-component component=this key=@key clickable=../displayIngredients status=(lookup ../precast.ingredients @key)}}
{{#unless @last}}
Expand All @@ -144,7 +144,7 @@
</div>
</div>
{{/if}}
{{#if (not (isEmpty recipe.results))}}
{{#if (not (beavers-isEmpty recipe.results))}}
<div class="flexcol" style="min-width:200px">
<div class="header">
{{localize "beaversCrafting.crafting-app.result"}}
Expand Down

0 comments on commit 6e3c29e

Please sign in to comment.