Skip to content

Commit

Permalink
5.2.3
Browse files Browse the repository at this point in the history
  • Loading branch information
Plushtoast committed Dec 2, 2023
1 parent 41c3498 commit 9184aed
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 11 deletions.
5 changes: 1 addition & 4 deletions Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Keep in mind, that the official <a href="https://www.f-shop.de/virtual-tabletops

## Installation

Use the module manifest url
Use the module manifest url

```
https://raw.githubusercontent.com/Plushtoast/dsa5-optolith/main/module.json
Expand All @@ -26,10 +26,7 @@ https://raw.githubusercontent.com/Plushtoast/dsa5-optolith/main/module.json

![grafik](https://github.com/Plushtoast/dsa5-optolith/assets/44941845/b648131b-4359-458a-8a71-e7ba1506ce1d)


## Notes

This tool searches the library for existing available abilities. It won't create any new abilities!
Name matchings for detection will be adjusted to offical Foundry TDE modules (in progress).


4 changes: 2 additions & 2 deletions module.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{
"title": "The Dark Eye 5th Ed. - Optolith Connector",
"description": "Import heros created with the famous <a href=\"https://optolith.app\" target=\"_blank\">Optolith</a> character generator into Foundry VTT.",
"version": "5.2.2",
"version": "5.2.3",
"url": "https://github.com/Plushtoast/dsa5-optolith",
"manifest": "https://raw.githubusercontent.com/Plushtoast/dsa5-optolith/main/module.json",
"download": "https://github.com/Plushtoast/dsa5-optolith/releases/download/5.2.2/dsa5-optolith-5.2.2.zip",
"download": "https://github.com/Plushtoast/dsa5-optolith/releases/download/5.2.3/dsa5-optolith-5.2.3.zip",
"languages": [{
"lang": "de",
"name": "Deutsch",
Expand Down
2 changes: 1 addition & 1 deletion modules/data/ids/de/odata.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion modules/data/ids/en/odata.json

Large diffs are not rendered by default.

20 changes: 17 additions & 3 deletions modules/parser.js
Original file line number Diff line number Diff line change
Expand Up @@ -351,13 +351,27 @@ export default class OptolithParser extends Application {
2: "rangeweapon",
3: "ammunition",
4: "armor",
21: "poison",
20: "consumable",
21: "poison",
22: "plant"
}[item.gr] || "equipment"

const find = (await game.dsa5.itemLibrary.findCompendiumItem(item.name, type))
.find(x => x.type == type)
let find

if(item.isTemplateLocked) {
let baseName = oData["equipment"][item.template]

if(baseName) {
find = (await game.dsa5.itemLibrary.findCompendiumItem(baseName, type))
.find(x => x.type == type)
} else {
find = (await game.dsa5.itemLibrary.findCompendiumItem(item.name, type))
.find(x => x.type == type)
}
} else {
find = (await game.dsa5.itemLibrary.findCompendiumItem(item.name, type))
.find(x => x.type == type)
}

if(find) {
const obj = find.toObject()
Expand Down

0 comments on commit 9184aed

Please sign in to comment.