Skip to content

Commit

Permalink
Merge pull request #50 from AngryBeaver/3.1.3
Browse files Browse the repository at this point in the history
3.1.3
  • Loading branch information
AngryBeaver authored Apr 16, 2023
2 parents 6e3c29e + 38c027e commit fc2dc18
Show file tree
Hide file tree
Showing 9 changed files with 53 additions and 29 deletions.
19 changes: 9 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,13 @@
# Beaver's Crafting Module
![Foundry Core Compatible Version](https://img.shields.io/endpoint?url=https%3A%2F%2Ffoundryshields.com%2Fversion%3Fstyle%3Dflat%26url%3Dhttps%3A%2F%2Fgithub.com%2FAngryBeaver%2Fbeavers-crafting%2Freleases%2Flatest%2Fdownload%2Fmodule.json)
![Foundry System](https://img.shields.io/endpoint?url=https%3A%2F%2Ffoundryshields.com%2Fsystem%3FnameType%3Draw%26showVersion%3D1%26style%3Dflat%26url%3Dhttps%3A%2F%2Fraw.githubusercontent.com%2FAngryBeaver%2Fbeavers-crafting%2Fmain%2Fmodule.json)
![Download Count](https://img.shields.io/github/downloads/AngryBeaver/beavers-crafting/total?color=bright-green)

## Features
![img.gif](pictures/video.gif)
### demoVideo
https://www.youtube.com/watch?v=t3YGk8uFK0w

With this module you can create recipes to craft items. E.g. a bunch of mushrooms to brew a potion.

You can use it for:
Expand All @@ -13,16 +22,6 @@ by:
- optionally requireing features, tools, classes, backgrounds
- optionally tracking your progress by optionally testing (skills, tools, abilities) or just advanceing it.


![Foundry Core Compatible Version](https://img.shields.io/endpoint?url=https%3A%2F%2Ffoundryshields.com%2Fversion%3Fstyle%3Dflat%26url%3Dhttps%3A%2F%2Fgithub.com%2FAngryBeaver%2Fbeavers-crafting%2Freleases%2Flatest%2Fdownload%2Fmodule.json)
![Foundry System](https://img.shields.io/endpoint?url=https%3A%2F%2Ffoundryshields.com%2Fsystem%3FnameType%3Draw%26showVersion%3D1%26style%3Dflat%26url%3Dhttps%3A%2F%2Fraw.githubusercontent.com%2FAngryBeaver%2Fbeavers-crafting%2Fmain%2Fmodule.json)
![Download Count](https://img.shields.io/github/downloads/AngryBeaver/beavers-crafting/total?color=bright-green)


## Features
![img.gif](pictures/video.gif)
### demoVideo
https://www.youtube.com/watch?v=t3YGk8uFK0w
### Loot subtype Recipe
![img.png](pictures/newItem.png)
For this to work you must go to your settings and enter the name of the create Item Dialog.
Expand Down
4 changes: 4 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Changelog
## 3.1.x folders
## 3.1.3
- fix always revert currency on failed crafts.
- fix on enter open crafting tab.
- css adaption to overwrite swade incompatibility stlyes.
## 3.1.2
- fix collision to better roll tables
## 3.1.1
Expand Down
24 changes: 23 additions & 1 deletion css/crafting.css
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@
.beavers-crafting .recipe .action.result {
padding:5px;
}
.beavers-crafting.recipe .editor{
height:100%;
}


.beavers-crafting .drop-area {
/* Center the content */
Expand All @@ -18,6 +22,7 @@
border-radius: 0.25rem;
font-family: 'Gelasio';
color:white;
box-shadow: inset 0 0 10px rgb(0 0 0 / 20%), 0 0 10px rgb(0 0 0 / 20%);
}

.beavers-crafting.chat .header {
Expand Down Expand Up @@ -486,6 +491,8 @@ beavers-recipe
color: dimgrey;
flex:0;
min-width:200px;
width: inherit;
margin: inherit;
}

.beavers-crafting .beavers-recipe .section {
Expand Down Expand Up @@ -527,13 +534,18 @@ beavers-recipe
line-height:20px;
color: dimgrey;
flex:0;
width: inherit;
margin: inherit;
}

/**
todo check this
*/
.beavers-crafting .header input {
font-size: 14px;line-height: 14px;text-align: center;
font-size: 14px;
line-height: 14px;
text-align: center;
height: inherit;
}

.beavers-crafting .recipe .section {
Expand Down Expand Up @@ -630,4 +642,14 @@ actor-sheet
.beavers-crafting.actor-tab .addCrafting {
font-size:12px;
line-height:12px;
background: rgba(0, 0, 0, 0.1);
border: 2px groove #eeede0;
padding:1px 5px;
text-align:center;
cursor:pointer;
}

.beavers-crafting.actor-tab .addCrafting:hover {
outline: none;
box-shadow: 0 0 5px var(--color-shadow-primary);
}
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.2",
"version": "3.1.3",
"authors": [
{
"name": "angryBeaver",
Expand Down
18 changes: 9 additions & 9 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions 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.2",
"version": "3.1.3",
"description": "Crafting",
"devDir": "C:\\Users\\Riess\\AppData\\Local\\FoundryVTT\\Data\\modules",
"#devDir": "C:\\data\\Data\\modules",
Expand All @@ -24,7 +24,7 @@
"printWidth": 120
},
"devDependencies": {
"beavers-system-interface": "^1.1.0",
"beavers-system-interface": "^2.1.0",
"@ethaks/fvtt-quench": "^0.6.0",
"@league-of-foundry-developers/foundry-vtt-types": "^0.8.8-9",
"@types/jest": "^27.4.1",
Expand Down
2 changes: 1 addition & 1 deletion src/Crafting.ts
Original file line number Diff line number Diff line change
Expand Up @@ -355,7 +355,7 @@ export class Crafting implements CraftingData {
}
}
if (this.result._currencyResult !== undefined) {
if (!this.recipe.skill?.consume && this.result.hasError()) {
if (!this.recipe.tests?.consume && this.result.hasError()) {
this.result.revertPayedCurrency();
}
}
Expand Down
5 changes: 2 additions & 3 deletions src/apps/RecipeSheet.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,13 +50,12 @@ export class RecipeSheet {
if(html[0].localName !== "div") {
html = $(html[0].parentElement.parentElement);
}
let exists = html.find(".sheet-body .beavers-crafting");
let exists = html.find(".beavers-crafting.recipe");
if(exists.length != 0){
return;
}
this.recipeElement = $('<div class="beavers-crafting recipe"></div>');
html.find(".sheet-body").empty();
html.find(".sheet-body").append(this.recipeElement);
beaversSystemInterface.itemSheetReplaceContent(this.app,html,this.recipeElement);
this.recipe = Recipe.fromItem(this.item);
this.render();
}
Expand Down
4 changes: 2 additions & 2 deletions templates/actor-sheet-tab.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@
style="flex-wrap:nowrap;margin:5px;">
<div> </div>
<div class="attribute" style="min-width:60px;margin:5px">
<button class="addCrafting">
<div class="addCrafting">
<i class="fas fa-plus"></i>
{{localize "beaversCrafting.actorSheet.table.add" }}
</button>
</div>
</div>
</div>
{{#each craftingFolder}}
Expand Down

0 comments on commit fc2dc18

Please sign in to comment.