Merge branch 'master' into master

features_update
Spetzel 2021-09-04 17:33:31 -07:00 committed by GitHub
commit 998d9f6613
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 529 additions and 494 deletions

View File

@ -1,3 +1,6 @@
#v0.5.0
- Fixed: Issue #17 (error in filtering NPCs by Creature Type)
#v0.4.5 #v0.4.5
- Fixed: [Suggestion] Show compendium source in results; Issue #11 - Fixed: [Suggestion] Show compendium source in results; Issue #11
- Fixed: Spells from non-system compendium show up in items tab. Issue#10 - Fixed: Spells from non-system compendium show up in items tab. Issue#10

View File

@ -1,19 +1,20 @@
# Compendium Browser # Compendium Browser
**NEW in 0.5** Support for Foundry 0.8.x
Tired of scrolling compendia? Easily brows and filter for spells, feats, items, and NPCs using Compendium Browser. Tired of scrolling compendia? Easily brows and filter for spells, feats, items, and NPCs using Compendium Browser.
**NEW** Compendium Browser is faster and better-behaved; **it no longer loads all the compendia into memory on start-up** (which sometimes hung servers because of memory or CPU requirements). Instead, it filters and loads on-demand, as well as giving you a Module Setting to control how many rows are loaded at a time. Compendium Browser is faster and better-behaved; **it no longer loads all the compendia into memory on start-up** (which sometimes hung servers because of memory or CPU requirements). Instead, it filters and loads on-demand, as well as giving you a Module Setting to control how many rows are loaded at a time.
## Summary ## Summary
* **Authors**: Discord: Spetzel#0103; Felix (felix.mueller.86@web.de) * **Authors**: Discord: Spetzel#0103; Felix (felix.mueller.86@web.de)
* **Version**: 0.4.5 * **Version**: 0.5.0
* **Foundry VTT Compatibility**: 0.7.2-0.7.9 * **Foundry VTT Compatibility**: 0.7.2-0.8.6
* **System Compatibility (If applicable)**: dnd5e * **System Compatibility (If applicable)**: dnd5e
* **Translation Support**: en * **Translation Support**: en
## Installation ## Installation
1. Go to the Add-on Modules tab in Foundry Setup 1. Go to the Add-on Modules tab in Foundry Setup
2. Click Install Module and search for **Compendium Browser** OR paste this link: `https://github.com/League-of-Foundry-Developers/compendium-browser/releases/download/latest/module.json` 2. Click Install Module and search for **Compendium Browser** OR paste this link: `https://github.com/League-of-Foundry-Developers/compendium-browser/releases/latest/download/module.json`
3. Open your world and go to Settings>Manage Modules and enable Compendium Browser 3. Open your world and go to Settings>Manage Modules and enable Compendium Browser

View File

@ -40,6 +40,7 @@
loadAndFilterItems(): Changed tests to switch + more explicit tests loadAndFilterItems(): Changed tests to switch + more explicit tests
0.4.5b Show compendium source in results issue#11 0.4.5b Show compendium source in results issue#11
Try showing compendium in the image mouseover Try showing compendium in the image mouseover
12-Jun-2021 0.5.0 Test for Foundry 0.8.x in which creature type is now data.details.type.value
*/ */
const CMPBrowser = { const CMPBrowser = {
@ -1405,6 +1406,7 @@ class CompendiumBrowser extends Application {
} }
async addNpcFilters() { async addNpcFilters() {
const isFoundryV8 = game.data.version.startsWith("0.8");
// NPC Filters // NPC Filters
this.addNpcFilter(game.i18n.localize("CMPBrowser.general"), game.i18n.localize("DND5E.Source"), 'data.details.source', 'text'); this.addNpcFilter(game.i18n.localize("CMPBrowser.general"), game.i18n.localize("DND5E.Source"), 'data.details.source', 'text');
@ -1413,7 +1415,16 @@ class CompendiumBrowser extends Application {
this.addNpcFilter(game.i18n.localize("CMPBrowser.general"), game.i18n.localize("CMPBrowser.hasLegAct"), 'data.resources.legact.max', 'bool'); this.addNpcFilter(game.i18n.localize("CMPBrowser.general"), game.i18n.localize("CMPBrowser.hasLegAct"), 'data.resources.legact.max', 'bool');
this.addNpcFilter(game.i18n.localize("CMPBrowser.general"), game.i18n.localize("CMPBrowser.hasLegRes"), 'data.resources.legres.max', 'bool'); this.addNpcFilter(game.i18n.localize("CMPBrowser.general"), game.i18n.localize("CMPBrowser.hasLegRes"), 'data.resources.legres.max', 'bool');
this.addNpcFilter(game.i18n.localize("CMPBrowser.general"), game.i18n.localize("CMPBrowser.cr"), 'data.details.cr', 'numberCompare'); this.addNpcFilter(game.i18n.localize("CMPBrowser.general"), game.i18n.localize("CMPBrowser.cr"), 'data.details.cr', 'numberCompare');
this.addNpcFilter(game.i18n.localize("CMPBrowser.general"), game.i18n.localize("CMPBrowser.creatureType"), 'data.details.type', 'text', {
//Foundry 0.8.x: Creature type (data.details.type) is now a structure, so we check data.details.types.value instead
let npcDetailsPath;
if (isFoundryV8) {
npcDetailsPath = "data.details.type.value";
} else {//0.7.x
npcDetailsPath = "data.details.type";
}
this.addNpcFilter(game.i18n.localize("CMPBrowser.general"), game.i18n.localize("CMPBrowser.creatureType"), npcDetailsPath, 'text', {
aberration: game.i18n.localize("CMPBrowser.aberration"), aberration: game.i18n.localize("CMPBrowser.aberration"),
beast: game.i18n.localize("CMPBrowser.beast"), beast: game.i18n.localize("CMPBrowser.beast"),
celestial: game.i18n.localize("CMPBrowser.celestial"), celestial: game.i18n.localize("CMPBrowser.celestial"),

View File

@ -1,8 +1,8 @@
{ {
"name": "compendium-browser", "name": "compendium-browser",
"title": "Compendium Browser", "title": "Compendium Browser",
"description": "<p>Easily browse and filter spells, feats, items, and npcs loaded from compendia!</p><strong>NEW! Compendium Browser is faster and better-behaved;</strong> it no longer loads all the compendia into memory on start-up (which sometimes hung servers because of memory or CPU requirements). Instead, it filters and loads on-demand, as well as giving you a Module Setting to control how many rows are loaded at a time.<br>Changes in v0.4.5:<ul><li>Fixed: Spells from non-system compendium show up in items tab.(<a href='https://github.com/League-of-Foundry-Developers/compendium-browser/issues/10'>Issue #10</a>)</li><li>Added: Show compendium source in results (<a href='https://github.com/League-of-Foundry-Developers/compendium-browser/issues/11'>Issue #11</a>)</li></ul>", "description": "<p>Easily browse and filter spells, feats, items, and npcs loaded from compendia!</p><strong>NEW! Compendium Browser is faster and better-behaved;</strong> it no longer loads all the compendia into memory on start-up (which sometimes hung servers because of memory or CPU requirements). Instead, it filters and loads on-demand, as well as giving you a Module Setting to control how many rows are loaded at a time.<br>Changes in 0.6.0: Added languages (German, Spanish)",
"version": "0.4.5", "version": "0.6.0",
"author": "Spetzel#0103", "author": "Spetzel#0103",
"authors": [ "authors": [
{ {
@ -40,10 +40,10 @@
} }
], ],
"url": "https://github.com/League-of-Foundry-Developers/compendium-browser", "url": "https://github.com/League-of-Foundry-Developers/compendium-browser",
"manifest": "https://github.com/League-of-Foundry-Developers/compendium-browser/releases/download/latest/module.json", "manifest": "https://github.com/League-of-Foundry-Developers/compendium-browser/releases/latest/download/module.json",
"download": "https://github.com/League-of-Foundry-Developers/compendium-browser/releases/download/latest/compendium-browser.zip", "download": "https://github.com/League-of-Foundry-Developers/compendium-browser/releases/download/v0.6.0/compendium-browser.zip",
"minimumCoreVersion": "0.6.2", "minimumCoreVersion": "0.6.2",
"compatibleCoreVersion": "0.7.9", "compatibleCoreVersion": "0.8.9",
"allowBugReporter": true, "allowBugReporter": true,
"bugs": "https://github.com/League-of-Foundry-Developers/compendium-browser/issues", "bugs": "https://github.com/League-of-Foundry-Developers/compendium-browser/issues",
"readme": "https://github.com/League-of-Foundry-Developers/compendium-browser/blob/master/README.md", "readme": "https://github.com/League-of-Foundry-Developers/compendium-browser/blob/master/README.md",

View File

@ -40,13 +40,14 @@
"bladebarrier": "cleric", "bladebarrier": "cleric",
"bladeward": "bard,sorcerer,warlock,wizard", "bladeward": "bard,sorcerer,warlock,wizard",
"bless": "cleric,paladin", "bless": "cleric,paladin",
"bladeofdisaster": "sorcerer,warlock,wizard",
"blight": "druid,sorcerer,warlock,wizard", "blight": "druid,sorcerer,warlock,wizard",
"blindingsmite": "paladin", "blindingsmite": "paladin",
"blindnessdeafness": "bard,cleric,sorcerer,wizard", "blindnessdeafness": "bard,cleric,sorcerer,wizard",
"blink": "artificer,sorcerer,wizard,artificer,artificerrevisited", "blink": "artificer,sorcerer,wizard,artificer,artificerrevisited",
"blur": "artificer,sorcerer,wizard,artificer,artificerrevisited", "blur": "artificer,sorcerer,wizard,artificer,artificerrevisited",
"bonesoftheearth": "druid", "bonesoftheearth": "druid",
"boomingblade": "sorcerer,warlock,wizard", "boomingblade": "artificer,sorcerer,warlock,wizard",
"brandingsmite": "paladin", "brandingsmite": "paladin",
"burninghands": "sorcerer,wizard", "burninghands": "sorcerer,wizard",
"calllightning": "druid", "calllightning": "druid",
@ -97,6 +98,7 @@
"createbonfire": "artificer,druid,sorcerer,warlock,wizard", "createbonfire": "artificer,druid,sorcerer,warlock,wizard",
"createfoodandwater": "artificer,cleric,paladin", "createfoodandwater": "artificer,cleric,paladin",
"createhomunculus": "wizard", "createhomunculus": "wizard",
"createmagen": "wizard",
"createundead": "cleric,warlock,wizard", "createundead": "cleric,warlock,wizard",
"createordestroywater": "cleric,druid", "createordestroywater": "cleric,druid",
"creation": "artificer,sorcerer,wizard,artificerrevisited", "creation": "artificer,sorcerer,wizard,artificerrevisited",
@ -133,6 +135,8 @@
"dominateperson": "bard,sorcerer,wizard", "dominateperson": "bard,sorcerer,wizard",
"dragonsbreath": "sorcerer,wizard", "dragonsbreath": "sorcerer,wizard",
"drawmijsinstantsummons": "wizard", "drawmijsinstantsummons": "wizard",
"dreamoftheblueveil": "bard,sorcerer,warlock,wizard",
"instantsummons": "wizard",
"dream": "bard,warlock,wizard", "dream": "bard,warlock,wizard",
"dreamoftheblueveil": "bard", "dreamoftheblueveil": "bard",
"druidgrove": "druid", "druidgrove": "druid",
@ -189,6 +193,7 @@
"freedomofmovement": "artificer,bard,cleric,druid,ranger,artificer,artificerrevisited", "freedomofmovement": "artificer,bard,cleric,druid,ranger,artificer,artificerrevisited",
"friends": "bard,sorcerer,warlock,wizard", "friends": "bard,sorcerer,warlock,wizard",
"frostbite": "artificer,druid,sorcerer,warlock,wizard", "frostbite": "artificer,druid,sorcerer,warlock,wizard",
"frostfingers": "wizard",
"gaseousform": "sorcerer,warlock,wizard,artificer,artificerrevisited", "gaseousform": "sorcerer,warlock,wizard,artificer,artificerrevisited",
"gate": "cleric,sorcerer,wizard", "gate": "cleric,sorcerer,wizard",
"geas": "bard,cleric,druid,paladin,wizard", "geas": "bard,cleric,druid,paladin,wizard",
@ -203,7 +208,7 @@
"grease": "artificer,wizard,artificerrevisited", "grease": "artificer,wizard,artificerrevisited",
"greaterinvisibility": "bard,sorcerer,wizard", "greaterinvisibility": "bard,sorcerer,wizard",
"greaterrestoration": "artificer,bard,cleric,druid,artificerrevisited", "greaterrestoration": "artificer,bard,cleric,druid,artificerrevisited",
"greenflameblade": "sorcerer,warlock,wizard", "greenflameblade": "artificer,sorcerer,warlock,wizard",
"guardianoffaith": "cleric", "guardianoffaith": "cleric",
"guardianofnature": "druid,ranger", "guardianofnature": "druid,ranger",
"guardsandwards": "bard,wizard", "guardsandwards": "bard,wizard",
@ -252,6 +257,7 @@
"investitureofwind": "druid,sorcerer,warlock,wizard", "investitureofwind": "druid,sorcerer,warlock,wizard",
"invisibility": "artificer,bard,sorcerer,warlock,wizard,artificer,artificerrevisited", "invisibility": "artificer,bard,sorcerer,warlock,wizard,artificer,artificerrevisited",
"invulnerability": "wizard", "invulnerability": "wizard",
"intellectfortress": "artificer,bard,sorcerer,warlock,wizard",
"jimsglowingcoin": "wizard", "jimsglowingcoin": "wizard",
"jimsmagicmissile": "wizard", "jimsmagicmissile": "wizard",
"jump": "artificer,druid,ranger,sorcerer,wizard,artificer,artificerrevisited", "jump": "artificer,druid,ranger,sorcerer,wizard,artificer,artificerrevisited",
@ -265,7 +271,7 @@
"light": "artificer,bard,cleric,sorcerer,wizard,artificerrevisited", "light": "artificer,bard,cleric,sorcerer,wizard,artificerrevisited",
"lightningarrow": "ranger", "lightningarrow": "ranger",
"lightningbolt": "sorcerer,wizard", "lightningbolt": "sorcerer,wizard",
"lightninglure": "sorcerer,warlock,wizard", "lightninglure": "artificer,sorcerer,warlock,wizard",
"locateanimalsorplants": "bard,druid,ranger", "locateanimalsorplants": "bard,druid,ranger",
"locatecreature": "bard,cleric,druid,paladin,ranger,wizard", "locatecreature": "bard,cleric,druid,paladin,ranger,wizard",
"locateobject": "bard,cleric,druid,paladin,ranger,wizard", "locateobject": "bard,cleric,druid,paladin,ranger,wizard",
@ -298,6 +304,7 @@
"meteorswarm": "sorcerer,wizard", "meteorswarm": "sorcerer,wizard",
"mightyfortress": "wizard", "mightyfortress": "wizard",
"mindblank": "bard,wizard", "mindblank": "bard,wizard",
"mindsliver": "sorcerer,warlock,wizard",
"mindspike": "sorcerer,warlock,wizard", "mindspike": "sorcerer,warlock,wizard",
"minorillusion": "bard,sorcerer,warlock,wizard", "minorillusion": "bard,sorcerer,warlock,wizard",
"miragearcane": "bard,druid,wizard", "miragearcane": "bard,druid,wizard",
@ -405,6 +412,7 @@
"spikegrowth": "druid,ranger", "spikegrowth": "druid,ranger",
"spiritguardians": "cleric", "spiritguardians": "cleric",
"spiritualweapon": "cleric", "spiritualweapon": "cleric",
"spiritshroud": "cleric,paladin,warlock,wizard",
"staggeringsmite": "paladin", "staggeringsmite": "paladin",
"steelwindstrike": "ranger,wizard", "steelwindstrike": "ranger,wizard",
"stinkingcloud": "bard,sorcerer,wizard", "stinkingcloud": "bard,sorcerer,wizard",
@ -413,16 +421,28 @@
"stormofvengeance": "druid", "stormofvengeance": "druid",
"stormsphere": "sorcerer,wizard", "stormsphere": "sorcerer,wizard",
"suggestion": "bard,sorcerer,warlock,wizard", "suggestion": "bard,sorcerer,warlock,wizard",
"summonaberration": "warlock,wizard",
"summonbeast": "druid,ranger",
"summoncelestial": "cleric,paladin",
"summonconstruct": "artificer,wizard",
"summonelemental": "druid,ranger,wizard",
"summonfey": "druid,ranger,warlock,wizard",
"summonfiend": "warlock,wizard",
"summongreaterdemon": "warlock,wizard", "summongreaterdemon": "warlock,wizard",
"summonlesserdemons": "warlock,wizard", "summonlesserdemons": "warlock,wizard",
"summonshadowpawn": "warlock,wizard",
"summonundead": "warlock,wizard",
"sunbeam": "druid,sorcerer,wizard", "sunbeam": "druid,sorcerer,wizard",
"sunburst": "druid,sorcerer,wizard", "sunburst": "druid,sorcerer,wizard",
"swiftquiver": "ranger", "swiftquiver": "ranger",
"swordburst": "sorcerer,warlock,wizard", "swordburst": "artificer,sorcerer,warlock,wizard",
"synapticstatic": "bard,sorcerer,warlock,wizard", "synapticstatic": "bard,sorcerer,warlock,wizard",
"symbol": "bard,cleric,wizard", "symbol": "bard,cleric,wizard",
"tashascausticbrew": "artificer",
"tashashideouslaughter": "bard,wizard", "tashashideouslaughter": "bard,wizard",
"hideouslaughter": "bard,wizard", "hideouslaughter": "bard,wizard",
"tashasmindwhip": "sorcerer,wizard",
"tashasotherworldlyguise": "sorcerer,warlock,wizard",
"telekinesis": "sorcerer,wizard", "telekinesis": "sorcerer,wizard",
"telepathy": "wizard", "telepathy": "wizard",
"teleport": "bard,sorcerer,wizard", "teleport": "bard,sorcerer,wizard",