core-tables
This commit is contained in:
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
+835
-924
File diff suppressed because it is too large
Load Diff
+1
-1
@@ -8,7 +8,7 @@
|
|||||||
}
|
}
|
||||||
],
|
],
|
||||||
"url": "https://gitea.palmenalzer.de/alzer/wfrp-4e-de",
|
"url": "https://gitea.palmenalzer.de/alzer/wfrp-4e-de",
|
||||||
"version": "8.5.5",
|
"version": "8.5.6",
|
||||||
"esmodules": [
|
"esmodules": [
|
||||||
"modules/babele-register.js",
|
"modules/babele-register.js",
|
||||||
"modules/addon-register.js",
|
"modules/addon-register.js",
|
||||||
|
|||||||
@@ -74,7 +74,7 @@ let regName = XRegExp(name_val, 'gi');
|
|||||||
|
|
||||||
// Used to detect/manage the skill groupings in the statblock
|
// Used to detect/manage the skill groupings in the statblock
|
||||||
const __SkillGroupsUS = ["Melee", "Lore", "Trade"]
|
const __SkillGroupsUS = ["Melee", "Lore", "Trade"]
|
||||||
const __SkillGroupsFR = ["Corps à corps", "Domaine", "Métier"]
|
const __SkillGroupsFR = ["Nahkampf", "Lehre", "Beruf"]
|
||||||
// Used to auto update the system.tests.value field
|
// Used to auto update the system.tests.value field
|
||||||
const __hasTestValue = {
|
const __hasTestValue = {
|
||||||
"etiquette": true,
|
"etiquette": true,
|
||||||
@@ -117,7 +117,7 @@ async function __findItem(itemName, itemType, location = null) {
|
|||||||
// If all else fails, search each pack
|
// If all else fails, search each pack
|
||||||
for (let p of game.wfrp4e.tags.getPacksWithTag(itemType)) {
|
for (let p of game.wfrp4e.tags.getPacksWithTag(itemType)) {
|
||||||
await p.getIndex().then(index => itemList = index);
|
await p.getIndex().then(index => itemList = index);
|
||||||
console.log("Seatch", itemType, toSearch, itemList);
|
console.log("Search", itemType, toSearch, itemList);
|
||||||
let searchResult = itemList.find(t => (t.translated && t.type == itemType && (t.flags?.babele?.originalName.toLowerCase() == toSearch || t.flags?.babele?.originalName.toLowerCase().split("(")[0].trim() == toSearch)) || (t.type == itemType && (t.name.toLowerCase() == toSearch || t.name.toLowerCase().split("(")[0].trim() == toSearch)));
|
let searchResult = itemList.find(t => (t.translated && t.type == itemType && (t.flags?.babele?.originalName.toLowerCase() == toSearch || t.flags?.babele?.originalName.toLowerCase().split("(")[0].trim() == toSearch)) || (t.type == itemType && (t.name.toLowerCase() == toSearch || t.name.toLowerCase().split("(")[0].trim() == toSearch)));
|
||||||
if (searchResult) {
|
if (searchResult) {
|
||||||
let item = await p.getDocument(searchResult._id)
|
let item = await p.getDocument(searchResult._id)
|
||||||
@@ -359,7 +359,7 @@ export default async function statParserFR(statString, type = "npc") {
|
|||||||
if (itemFound && value && value.length > 0) {
|
if (itemFound && value && value.length > 0) {
|
||||||
let number = value.match(/\d+/g);
|
let number = value.match(/\d+/g);
|
||||||
if (number && (name.toLowerCase() == 'ranged' || name.toLowerCase() == 'weapon' || name.toLowerCase() == "bite" || name.toLowerCase() == "tail" ||
|
if (number && (name.toLowerCase() == 'ranged' || name.toLowerCase() == 'weapon' || name.toLowerCase() == "bite" || name.toLowerCase() == "tail" ||
|
||||||
name.toLowerCase() == 'arme' || name.toLowerCase() == "morsure" || name.toLowerCase() == "queue")) {
|
name.toLowerCase() == 'arme' || name.toLowerCase() == "morsure" || name.toLowerCase() == "queue" || name.toLowerCase() == 'waffe' || name.toLowerCase() == "biss" || name.toLowerCase() == "schwanz")) {
|
||||||
//console.log(itemFound)
|
//console.log(itemFound)
|
||||||
number = number[0] // Take first number ....
|
number = number[0] // Take first number ....
|
||||||
itemFound.system.specification.value = Number(number) - ((name.toLowerCase() == 'ranged') ? 0 : Math.floor(Number(model.characteristics.s.initial) / 10))
|
itemFound.system.specification.value = Number(number) - ((name.toLowerCase() == 'ranged') ? 0 : Math.floor(Number(model.characteristics.s.initial) / 10))
|
||||||
@@ -369,7 +369,7 @@ export default async function statParserFR(statString, type = "npc") {
|
|||||||
//itemFound.name += "(" + value + ")"
|
//itemFound.name += "(" + value + ")"
|
||||||
}
|
}
|
||||||
if (!itemFound)
|
if (!itemFound)
|
||||||
ui.notifications.error("Trait non trouvé, à ajouter manuellement : " + name, { permanent: true })
|
ui.notifications.error("Trait nicht gefunden, muss manuell hinzugefügt werden : " + name, { permanent: true })
|
||||||
|
|
||||||
} else if (def.name == 'skill') {
|
} else if (def.name == 'skill') {
|
||||||
try {
|
try {
|
||||||
@@ -391,7 +391,7 @@ export default async function statParserFR(statString, type = "npc") {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (!itemFound) {
|
if (!itemFound) {
|
||||||
ui.notifications.error("Compétence non trouvée, à ajouter manuellement : " + name, { permanent: true })
|
ui.notifications.error("Fähigkeit nicht gefunden, muss manuell hinzugefügt werden : " + name, { permanent: true })
|
||||||
}
|
}
|
||||||
} else if (def.name == 'talent') {
|
} else if (def.name == 'talent') {
|
||||||
try {
|
try {
|
||||||
@@ -401,7 +401,7 @@ export default async function statParserFR(statString, type = "npc") {
|
|||||||
if (itemFound && subres && value)
|
if (itemFound && subres && value)
|
||||||
itemFound.system.advances.value = Number(value);
|
itemFound.system.advances.value = Number(value);
|
||||||
if (!itemFound) {
|
if (!itemFound) {
|
||||||
ui.notifications.error("Talent non trouvé, à ajouter manuellement : " + name, { permanent: true })
|
ui.notifications.error("Talent nicht gefunden, muss manuell hinzugefügt werden : " + name, { permanent: true })
|
||||||
}
|
}
|
||||||
|
|
||||||
} else if (def.name == 'trapping') {
|
} else if (def.name == 'trapping') {
|
||||||
@@ -501,6 +501,6 @@ export default async function statParserFR(statString, type = "npc") {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// If the carac string has not been found
|
// If the carac string has not been found
|
||||||
ui.notifications.error("Impossible de convertir ces statitiques, les caractéristiques n'ont pas été trouvées", { permanent: true })
|
ui.notifications.error("Diese Werte konnten nicht umgewandelt werden, die Merkmale wurden nicht gefunden", { permanent: true })
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user