Compare commits
2 Commits
swade-fr-c
...
master
Author | SHA1 | Date |
---|---|---|
LeRatierBretonnien | b55754941e | |
LeRatierBretonnien | 00bc950479 |
10
fr.json
10
fr.json
|
@ -88,5 +88,13 @@
|
|||
"Personal Defense" : "Autodéfense",
|
||||
"Surveillance": "Surveillance",
|
||||
"Transportation": "Transport",
|
||||
"Weapon": "Arme"
|
||||
"Weapon": "Arme",
|
||||
|
||||
"vigor": "Vigueur",
|
||||
"smarts": "Intelligence",
|
||||
"agility": "Agilité",
|
||||
"spirit": "Âme",
|
||||
"strength": "Force",
|
||||
"Health": "Santé",
|
||||
"SWADE.Wounds": "Blessures"
|
||||
}
|
||||
|
|
|
@ -57,7 +57,7 @@
|
|||
}
|
||||
],
|
||||
"url": "https://www.uberwald.me/gitea/public/swade-fr-content",
|
||||
"version": "3.2.0",
|
||||
"version": "3.2.2",
|
||||
"esmodules": [
|
||||
"modules/swade-fr-init.js"
|
||||
],
|
||||
|
@ -73,7 +73,7 @@
|
|||
}
|
||||
],
|
||||
"manifest": "https://www.uberwald.me/gitea/public/swade-fr-content/raw/branch/master/module.json",
|
||||
"download": "https://www.uberwald.me/gitea/public/swade-fr-content/archive/swade-fr-content-3.2.0.zip",
|
||||
"download": "https://www.uberwald.me/gitea/public/swade-fr-content/archive/swade-fr-content-3.2.2.zip",
|
||||
"id": "swade-fr-content",
|
||||
"relationships": {
|
||||
"requires": [
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import { SWDELUXStatBlockParser } from "./sw-statblock-parser.js";
|
||||
|
||||
import { ClassCounter} from "https://www.uberwald.me/fvtt_appcount/count-class-ready.js"
|
||||
const __compFolderTranslation = [
|
||||
{
|
||||
compendium: 'swade-core-rules.swade-vehicles',
|
||||
|
@ -90,8 +90,8 @@ Hooks.once('init', () => {
|
|||
return transl
|
||||
},
|
||||
"skill_swid": (swid) => {
|
||||
if (swid == "fighting") return "combat";
|
||||
if (swid == "shooting") return "tir";
|
||||
if (swid == "combat") return "fighting";
|
||||
if (swid == "tir") return "shooting";
|
||||
return swid
|
||||
},
|
||||
"category_converter": (category) => {
|
||||
|
@ -341,30 +341,6 @@ const subFolder = {
|
|||
'Vehicular Weapons': 'Armes de véhicules'
|
||||
}
|
||||
|
||||
/************************************************************************************/
|
||||
// Register world usage statistics
|
||||
function registerUsageCount(registerKey) {
|
||||
if (game.user.isGM) {
|
||||
game.settings.register(registerKey, "world-key", {
|
||||
name: "Unique world key",
|
||||
scope: "world",
|
||||
config: false,
|
||||
default: "",
|
||||
type: String
|
||||
});
|
||||
|
||||
let worldKey = game.settings.get(registerKey, "world-key")
|
||||
if (worldKey == undefined || worldKey == "") {
|
||||
worldKey = randomID(32)
|
||||
game.settings.set(registerKey, "world-key", worldKey)
|
||||
}
|
||||
// Simple API counter
|
||||
let regURL = `https://www.uberwald.me/fvtt_appcount/count.php?name="${registerKey}"&worldKey="${worldKey}"&version="${game.release.generation}.${game.release.build}"&system="${game.system.id}"&systemversion="${game.system.version}"`
|
||||
$.ajax(regURL)
|
||||
/* -------------------------------------------- */
|
||||
}
|
||||
}
|
||||
|
||||
/************************************************************************************/
|
||||
async function loadSecretCompendiums() {
|
||||
|
||||
|
@ -394,6 +370,38 @@ async function loadSecretCompendiums() {
|
|||
}
|
||||
}
|
||||
|
||||
/************************************************************************************/
|
||||
function processItemSwid(actor, item) {
|
||||
let swid = item.system.swid
|
||||
let newSwid = swid
|
||||
if (swid == "combat") newSwid = "fighting";
|
||||
if (swid == "tir") newSwid = "shooting";
|
||||
if (swid != newSwid) {
|
||||
console.log("Item to update", item.name, swid, newSwid)
|
||||
actor.updateEmbeddedDocuments('Item', [{ _id: item.id, "system.swid": newSwid }])
|
||||
}
|
||||
}
|
||||
|
||||
/************************************************************************************/
|
||||
function migrateSwid() {
|
||||
for (let actor of game.actors) {
|
||||
for (let item of actor.items) {
|
||||
if (item.system?.swid) {
|
||||
processItemSwid(actor, item)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/************************************************************************************/
|
||||
function checkSwidSettings() {
|
||||
let swidFighting = game.settings.get('swade', 'parryBaseSwid')
|
||||
if (swidFighting != "fighting") {
|
||||
ui.notifications.warn("Votre compétence de parade n'est pas positionnée à 'fighting' dans les paramètres de SWADE. Nous vous recommandons de le faire pour éviter des problèmes de calcul de la parade.")
|
||||
//game.settings.set('swade', 'parryBaseSwid', "fighting")
|
||||
}
|
||||
}
|
||||
|
||||
/************************************************************************************/
|
||||
Hooks.once('ready', () => {
|
||||
console.log(">>>>>>>>>>")
|
||||
|
@ -409,10 +417,11 @@ Hooks.once('ready', () => {
|
|||
})
|
||||
|
||||
SwadeFRContentCommands.init()
|
||||
migrateSwid()
|
||||
checkSwidSettings()
|
||||
|
||||
//FolderTranslate.translateFolders()
|
||||
registerUsageCount("swade-fr-content")
|
||||
|
||||
ClassCounter.registerUsageCount("swade-fr-content")
|
||||
});
|
||||
|
||||
/************************************************************************************/
|
||||
|
|
Loading…
Reference in New Issue