Skip to content

Commit

Permalink
Merge pull request #165 from DanielBoettner/master
Browse files Browse the repository at this point in the history
HotFixes
  • Loading branch information
DanielBoettner committed Jan 2, 2022
2 parents 7e5d44f + 694100d commit 6d2fbd2
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 12 deletions.
2 changes: 1 addition & 1 deletion module.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "better-rolltables",
"title": "Better Roll Tables",
"description": "Adding functionality to roll tables, especially to roll treasure and magic items",
"version": "1.8.94",
"version": "1.8.95",
"manifestPlusVersion": "1.2.0",
"authors": [
{
Expand Down
11 changes: 7 additions & 4 deletions scripts/loot/loot-creator.js
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,8 @@ export class LootCreator {
/** Try first to load item from compendium */
if (item.collection) {
existingItem = await getItemFromCompendium(item);
itemData = duplicate(existingItem.data);
itemData.type = BRTCONFIG.ITEM_LOOT_TYPE;
}

/** Try first to load item from item list */
Expand All @@ -135,6 +137,7 @@ export class LootCreator {
existingItem = game.items.getName(item.text);
if (existingItem) {
itemData = duplicate(existingItem.data);
itemData.type = BRTCONFIG.ITEM_LOOT_TYPE;
}
}

Expand All @@ -155,10 +158,10 @@ export class LootCreator {
const createNewItem = !itemData || convert;

if (createNewItem) {
const name = convert?.text || item.text,
type = BRTCONFIG.ITEM_LOOT_TYPE,
img = convert?.img || item.img,
price = convert?.price || item.price || 0;
const name = convert ? convert?.text : item.text,
type = BRTCONFIG.ITEM_LOOT_TYPE,
img = convert ? convert?.img : item.img,
price = convert ? convert?.price : item.price || 0;

itemData = { name: name, type, img: img, data: { price: price }}; // "icons/svg/mystery-man.svg"
}
Expand Down
2 changes: 1 addition & 1 deletion scripts/loot/loot-manipulation.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ export class LootManipulator {
* @returns {Item}
*/
async _getRandomSpell (level) {
const spells = game.betterTables.getSpellCache().filter(spell => BRTCONFIG.SPELL_LEVEL_PATH === level),
const spells = game.betterTables.getSpellCache().filter(spell => getProperty(spell,BRTCONFIG.SPELL_LEVEL_PATH) === level),
spell = spells[Math.floor(Math.random() * spells.length)]
return findInCompendiumById(spell.collection, spell._id)
}
Expand Down
4 changes: 2 additions & 2 deletions styles/tidyDefaults.less
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
.system-dnd5e, .system-pf1, .system-pf2e {
.vtt {
--modesto: "Modesto Condensed", "Palatino Linotype", serif;
--signika: "Signika", sans-serif;
--primary-font: rgba(0, 0, 0, 0.9);
Expand Down Expand Up @@ -56,7 +56,7 @@
--checkbox-checked: rgba(0, 255, 0, 0.3);
}

.system-dnd5e.tidy5eDark {
.system-dnd5e.tidy5eDark .roll-table-config{
--primary-font: rgba(255, 255, 255, 0.8);
--background: #1e1e1e;
--white: #000000;
Expand Down
8 changes: 4 additions & 4 deletions templates/welcome-screen.html
Original file line number Diff line number Diff line change
Expand Up @@ -109,10 +109,10 @@ <h3>Authors / Maintainers / Contributers</h3>
<label for="welcome-screen-show-again">Don't show this screen again until next update.</label> <input type="checkbox" class='show-again' id="welcome-screen-show-again" {{checked isChecked}} />
</div>
<h1>Patchnotes</h1>
<h2 id="v1894">v1.8.9.4 <small>(& v1.8.92/3)</small></h2>
<h2 id="v1894">v1.8.9.5 <small>(& v1.8.92/3/4)</small></h2>
<ul>
<li>Fixed a bug in the localization on spell scrolls</li>
<li>Fixed a <a href="https://github.com/ultrakorne/better-rolltables/issues/158">bug</a> that made the module unusable when the spellCompendium was not found.</li>
<li>added support for actor and scene conversion to map and portrait loot item</li>
<li>Fixed several Spell scroll related issues</li>
<li>Added general <a href="https://foundryvtt.com/packages/pf1">Pathfinder 1e</a> support.
Thanks to <a href="https://github.com/mkahvi">Mana</a> for the quick help.</li>
<li>Fixed the <a href="https://github.com/ultrakorne/better-rolltables/blob/master/scripts/API.js">API</a></li>
Expand Down Expand Up @@ -267,4 +267,4 @@ <h2 id="v150">v1.5.0</h2>
<li>New documentation page for <a href="https://github.com/ultrakorne/better-rolltables/wiki/Loot-Tables">loot
tables</a></li>
<li>Spanish translation (thanks to HonzoNebro)</li>
</ul>
</ul>

0 comments on commit 6d2fbd2

Please sign in to comment.