Skip to content

Commit

Permalink
Merge pull request #93 from AngryBeaver/dr
Browse files Browse the repository at this point in the history
improved isCrafted flag
  • Loading branch information
AngryBeaver authored Dec 15, 2023
2 parents 4428656 + 074bae1 commit 33733cf
Show file tree
Hide file tree
Showing 22 changed files with 448 additions and 101 deletions.
15 changes: 15 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,21 @@ Every Character will now have access to 50+ recipes to brew potions.

## Latest features:
have a look at the changelog.md
### 3.3.x isCrafted flag
This module now tracks a isCrafted flag on items.
It will only be usefull if you want a crafting system that needs to differentiate between crafted and non crafted items.
E.g. you want to create recipes that will only work with crafted daggers not bought daggers.
Per default this setting is disabled. You can enable it in the settings to either full mode or partial mode.
- In full mode a crafted item is never a normal item. e.g. you need to explicitly make recipes that works with crafted and non crafted items.
- In partial mode you can create recipes that needs crafted items only but all recipes without crafted items would also accept crafted items.
You will use non crafted items before crafted ones.


- new flags: "beavers-crafting.isCrafted"
- removed flags: "beavers-crafting.status"
When this feature is enabled crafted items will be marked with an icon.
-
![img.png](pictures/craftedIcon.png)
### 3.0.x progress tracking and multiple tests
This module now enables tracking of your progress through a series of tests.
While you can track your crafting this features enables a new purpose of this module.
Expand Down
4 changes: 4 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
# Changelog
## 3.3.x crafted flag
- add support for recipes that are based on crafted items.
- remove beavers-crafting.status flag
- add beavers-crafting.isCrafted flag
## 3.2.x simple or
## 3.2.4
- fix anyOf: has not used bsa-x implementation was broken on some systems.
Expand Down
17 changes: 17 additions & 0 deletions css/crafting.css
Original file line number Diff line number Diff line change
Expand Up @@ -678,4 +678,21 @@ actor-sheet
.beavers-crafting.actor-tab .addCrafting:hover {
outline: none;
box-shadow: 0 0 5px var(--color-shadow-primary);
}

.beavers-fontsize-svg-img {
width: 1em !important;
height: 1em !important;
position: relative;
margin: auto !important;
border:0px !important;
flex:0 !important;
}

.beavers-fontsize-svg-img.editable {
cursor:pointer;
}

.beavers-fontsize-svg-img.editable:hover {
box-shadow: 0 0 10px var(--color-shadow-primary),inset 0 0 5px var(--color-shadow-primary);
}
145 changes: 145 additions & 0 deletions icons/blueDiamond.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
79 changes: 79 additions & 0 deletions icons/diamond.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions lang/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,10 @@
"instantly": "instantly",
"interaction": "interaction"
}
},
"separateItems": {
"name": "Separate crafted Items",
"hint": "Here you can set if a crafted item is different then non crafted. When set to full your crafted items are different to uncrafted once (e.g. you can create special recipes that require crafted items). Partial will try to detect what you mean but will and can not always be correct (e.g. when you drag a crafted dagger into your recipe it requires a crafted dagger when you drag a normal dagger it can use a crafted or non crafted dagger)."
}
},
"tool-config": {
Expand Down
6 changes: 3 additions & 3 deletions 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 Module for not only Crafting. But also Tracking any activities, Skill challenges, Quest and Progress, Faction reputation and more",
"id": "beavers-crafting",
"version": "3.2.4",
"version": "3.3.0",
"authors": [
{
"name": "angryBeaver",
Expand Down Expand Up @@ -44,8 +44,8 @@
"type": "module",
"manifest": "https://github.com/AngryBeaver/beavers-system-interface/releases/latest/download/module.json",
"compatibility": {
"minimum" : "2.1.2",
"verified": "2.1.2"
"minimum" : "2.1.6",
"verified": "2.1.6"
}
}
],
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.2.4",
"version": "3.3.0",
"description": "Crafting",
"#devDir": "C:\\Users\\Riess\\AppData\\Local\\FoundryVTT\\Data\\modules",
"#devDir": "C:\\data\\Data\\modules",
Expand All @@ -26,7 +26,7 @@
"printWidth": 120
},
"devDependencies": {
"beavers-system-interface": "^2.1.2",
"beavers-system-interface": "^2.1.6",
"@ethaks/fvtt-quench": "^0.6.0",
"@league-of-foundry-developers/foundry-vtt-types": "^0.8.8-9",
"@types/jest": "^27.4.1",
Expand Down
Binary file added pictures/craftedIcon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion src/AnyOf.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ export class AnyOf {
const result = await this.executeMacro(item);
const componentItem = beaversSystemInterface.componentFromEntity(item);
if(result.value){
const same = resultList.filter(component => componentItem.isSame(component))
const same = resultList.filter(component => component.isSame(componentItem))
if(same.length > 0){
same[0].quantity = same[0].quantity + componentItem.quantity;
}else{
Expand Down
Loading

0 comments on commit 33733cf

Please sign in to comment.