Various fixes around commands and rolltables

This commit is contained in:
sladecraven 2022-11-19 21:42:22 +01:00
parent a16a83457e
commit 2d6091d477
6 changed files with 31 additions and 28 deletions

View File

@ -57,10 +57,10 @@ const _manage_inn_roll = async (content, msg) => {
if (command[0] == "/auberge" && command[1]) { if (command[0] == "/auberge" && command[1]) {
msg["type"] = 0; msg["type"] = 0;
msg["rollMode"] = "gmroll"; msg["rollMode"] = "gmroll";
var compendium = game.packs.get('WH4-fr-translation.plats-dauberges'); var compendium = game.packs.get('wh4-fr-translation.plats-dauberges')
let rollList = []; const pack = game.packs.get(compendium);
await compendium.getIndex().then(index => rollList = index); let rollList = await compendium.getDocuments()
rollList = rollList.contents; //console.log("AUBERGE", rollList)
for (var i = 0; i < rollList.length; i++) { for (var i = 0; i < rollList.length; i++) {
var rollTab = rollList[i]; var rollTab = rollList[i];
console.log("Got compendium...", rollList, rollTab.name); console.log("Got compendium...", rollList, rollTab.name);

File diff suppressed because one or more lines are too long

View File

@ -49,7 +49,7 @@
{ {
"id": "Waterborne Diseases", "id": "Waterborne Diseases",
"name": "Maladies Fluviales", "name": "Maladies Fluviales",
"results": {"76-80":"@Compendium[wfrp4e-dotr.items.placeholder]{Vers des Cavités}","81-90":"@Compendium[wfrp4e-dotr.items.placeholder]{Vers du Reik}","91-100":"@Compendium[wfrp4e-core.diseases.herUmN51D9TiL2Vn]{Flux sanglant}","1-40":"@Compendium[wfrp4e-core.diseases.txeLd7R13qxSvmsr]{Galopante}","41-60":"@Compendium[wfrp4e-dotr.items.pplaceholder]{Grippe}","61-70":"@Compendium[wfrp4e-core.diseases.1hQuVFZt9QnnbWzg]{Infection Mineure}","71-75":"@Compendium[wfrp4e-core.diseases.kKccDTGzWzSXCBOb]{Blessure Infectée}"} "results": {"76-80":"@Compendium[wfrp4e-dotr.dotr-items.PIqixe4OQgrVQpFc]{Vers des Cavités}","81-90":"@Compendium[wfrp4e-dotr.items.pl0JMqXbCFSYGvBLnE]{Vers du Reik}","91-100":"@Compendium[wfrp4e-core.diseases.herUmN51D9TiL2Vn]{Flux sanglant}","1-40":"@Compendium[wfrp4e-core.diseases.txeLd7R13qxSvmsr]{Galopante}","41-60":"@Compendium[wfrp4e-dotr.dotr-items.fUYD3itr7AlZwQDI]{La Grippe}","61-70":"@Compendium[wfrp4e-core.diseases.1hQuVFZt9QnnbWzg]{Infection Mineure}","71-75":"@Compendium[wfrp4e-core.diseases.kKccDTGzWzSXCBOb]{Blessure Infectée}"}
}, },
{ {
"id": "Wind Table", "id": "Wind Table",

File diff suppressed because one or more lines are too long

View File

@ -915,7 +915,7 @@
"CHAT.OpposedTest" : "Test opposé", "CHAT.OpposedTest" : "Test opposé",
"CHAT.RemovedConditions" : "L'état <b>{condition}</b> a été enlevé de <b>{name}</b>", "CHAT.RemovedConditions" : "L'état <b>{condition}</b> a été enlevé de <b>{name}</b>",
"CHAT.WitchcraftMiscast" : "Sorcellerie - Gagner 1 Point de Corruption si vous faites une Incantation Imparfaite", "CHAT.WitchcraftMiscast" : "Sorcellerie - Gagner 1 Point de Corruption si vous faites une Incantation Imparfaite",
"CHAT.CommandLine.Help.Commands" : "Tables,Conditions,CharacterGeneration,NameGeneration,AvailabilityTest,Pay", "CHAT.CommandLine.Help.Commands" : "Tables,Conditions,Properties,CharacterGeneration,NameGeneration,AvailabilityTest,Pay,Credit,Corruption,Travel,Exp,Auberge",
"CHAT.CommandLine.Help.Label.Command" : "Commande", "CHAT.CommandLine.Help.Label.Command" : "Commande",
"CHAT.CommandLine.Help.Label.Example": "Exemple", "CHAT.CommandLine.Help.Label.Example": "Exemple",
"CHAT.CommandLine.Help.Label.Note": "Note", "CHAT.CommandLine.Help.Label.Note": "Note",
@ -923,6 +923,10 @@
"CHAT.CommandLine.Help.Tables.Usage.Command" : "/table <nom-de-table> <colonne> <modificateur>", "CHAT.CommandLine.Help.Tables.Usage.Command" : "/table <nom-de-table> <colonne> <modificateur>",
"CHAT.CommandLine.Help.Tables.Usage.Example" : "<br>/table critarm +20<br>/table career human", "CHAT.CommandLine.Help.Tables.Usage.Example" : "<br>/table critarm +20<br>/table career human",
"CHAT.CommandLine.Help.Tables.Usage.Note" : "/table <n-importe-quoi> affichera le menu d'aide des tables", "CHAT.CommandLine.Help.Tables.Usage.Note" : "/table <n-importe-quoi> affichera le menu d'aide des tables",
"CHAT.CommandLine.Help.Auberge.Title" : "Auberge",
"CHAT.CommandLine.Help.Auberge.Usage.Command" : "/auberge <typePlats>",
"CHAT.CommandLine.Help.Auberge.Usage.Example" : "<br>/auberge PlatsRivières",
"CHAT.CommandLine.Help.Auberge.Usage.Note" : "Propose des plats selon le type d'endroit et d'auberge.",
"CHAT.CommandLine.Help.Conditions.Title" : "Conditions", "CHAT.CommandLine.Help.Conditions.Title" : "Conditions",
"CHAT.CommandLine.Help.Conditions.Usage.Command" : "/cond <nom-condition>", "CHAT.CommandLine.Help.Conditions.Usage.Command" : "/cond <nom-condition>",
"CHAT.CommandLine.Help.Conditions.Usage.Example" : "<br>/cond enflammé<br>/cond inconscient", "CHAT.CommandLine.Help.Conditions.Usage.Example" : "<br>/cond enflammé<br>/cond inconscient",

View File

@ -8,7 +8,7 @@
} }
], ],
"url": "https://www.uberwald.me/gitea/public/foundryvtt-wh4-lang-fr-fr", "url": "https://www.uberwald.me/gitea/public/foundryvtt-wh4-lang-fr-fr",
"version": "6.2.21", "version": "6.2.22",
"esmodules": [ "esmodules": [
"babele-register.js", "babele-register.js",
"addon-register.js", "addon-register.js",
@ -136,7 +136,7 @@
} }
], ],
"manifest": "https://www.uberwald.me/gitea/public/foundryvtt-wh4-lang-fr-fr/raw/v10/module.json", "manifest": "https://www.uberwald.me/gitea/public/foundryvtt-wh4-lang-fr-fr/raw/v10/module.json",
"download": "https://www.uberwald.me/gitea/public/foundryvtt-wh4-lang-fr-fr/archive/foundryvtt-wh4-lang-fr-6.2.21.zip", "download": "https://www.uberwald.me/gitea/public/foundryvtt-wh4-lang-fr-fr/archive/foundryvtt-wh4-lang-fr-6.2.22.zip",
"id": "wh4-fr-translation", "id": "wh4-fr-translation",
"compatibility": { "compatibility": {
"minimum": "10", "minimum": "10",