Traductions + fix v12
This commit is contained in:
@ -529,7 +529,7 @@ export default class ActorWfrp4e_fr extends Actor {
|
||||
let title = game.i18n.localize("WeaponTest") + " - " + weapon.name;
|
||||
|
||||
// Prepare the weapon to have the complete data object, including qualities/flaws, damage value, etc.
|
||||
let wep = this.prepareWeaponCombat(duplicate(weapon));
|
||||
let wep = this.prepareWeaponCombat(foundry.utils.duplicate(weapon));
|
||||
let testData = {
|
||||
target: 0,
|
||||
hitLocation: true,
|
||||
@ -551,7 +551,7 @@ export default class ActorWfrp4e_fr extends Actor {
|
||||
skillCharList.push(game.i18n.localize("Ballistic Skill"))
|
||||
if (weapon.data.weaponGroup.value != "throwing" && weapon.data.weaponGroup.value != "explosives" && weapon.data.weaponGroup.value != "entangling") {
|
||||
// Check to see if they have ammo if appropriate
|
||||
testData.extra.ammo = duplicate(this.getEmbeddedEntity("OwnedItem", weapon.data.currentAmmo.value))
|
||||
testData.extra.ammo = foundry.utils.duplicate(this.getEmbeddedEntity("OwnedItem", weapon.data.currentAmmo.value))
|
||||
if (!testData.extra.ammo || weapon.data.currentAmmo.value == 0 || testData.extra.ammo.data.quantity.value == 0) {
|
||||
AudioHelper.play({ src: "systems/wfrp4e/sounds/no.wav" }, false)
|
||||
ui.notifications.error(game.i18n.localize("Error.NoAmmo"))
|
||||
@ -1198,7 +1198,7 @@ DiceWFRP.renderRollCard() as well as handleOpposedTarget().
|
||||
|
||||
result.postFunction = "basicTest";
|
||||
if (testData.extra)
|
||||
mergeObject(result, testData.extra);
|
||||
foundry.utils.mergeObject(result, testData.extra);
|
||||
|
||||
if (result.options.corruption) {
|
||||
this.handleCorruptionResult(result);
|
||||
@ -1382,7 +1382,7 @@ DiceWFRP.renderRollCard() as well as handleOpposedTarget().
|
||||
|
||||
|
||||
// Find ingredient being used, if any
|
||||
let ing = duplicate(this.getEmbeddedEntity("OwnedItem", testData.extra.spell.data.currentIng.value))
|
||||
let ing = foundry.utils.duplicate(this.getEmbeddedEntity("OwnedItem", testData.extra.spell.data.currentIng.value))
|
||||
if (ing) {
|
||||
// Decrease ingredient quantity
|
||||
testData.extra.ingredient = true;
|
||||
@ -1433,7 +1433,7 @@ DiceWFRP.renderRollCard() as well as handleOpposedTarget().
|
||||
result.postFunction = "channelTest";
|
||||
|
||||
// Find ingredient being used, if any
|
||||
let ing = duplicate(this.getEmbeddedEntity("OwnedItem", testData.extra.spell.data.currentIng.value))
|
||||
let ing = foundry.utils.duplicate(this.getEmbeddedEntity("OwnedItem", testData.extra.spell.data.currentIng.value))
|
||||
if (ing) {
|
||||
// Decrease ingredient quantity
|
||||
testData.extra.ingredient = true;
|
||||
@ -1527,7 +1527,7 @@ DiceWFRP.renderRollCard() as well as handleOpposedTarget().
|
||||
} // If something went wrong calculating damage, do nothing and still render the card
|
||||
|
||||
if (testData.extra)
|
||||
mergeObject(result, testData.extra);
|
||||
foundry.utils.mergeObject(result, testData.extra);
|
||||
|
||||
try {
|
||||
let contextAudio = await game.wfrp4e.audio.MatchContextAudio(game.wfrp4e.audio.FindContext(result))
|
||||
@ -1573,9 +1573,9 @@ DiceWFRP.renderRollCard() as well as handleOpposedTarget().
|
||||
* an actor. This function is called whenever the sheet is rendered.
|
||||
*/
|
||||
prepare() {
|
||||
let preparedData = duplicate(this.data)
|
||||
let preparedData = foundry.utils.duplicate(this.data)
|
||||
// Call prepareItems first to organize and process OwnedItems
|
||||
mergeObject(preparedData, this.prepareItems())
|
||||
foundry.utils.mergeObject(preparedData, this.prepareItems())
|
||||
|
||||
// Add speciality functions for each Actor type
|
||||
if (preparedData.type == "character")
|
||||
@ -1602,7 +1602,7 @@ DiceWFRP.renderRollCard() as well as handleOpposedTarget().
|
||||
*
|
||||
*/
|
||||
prepareItems() {
|
||||
let actorData = duplicate(this.data)
|
||||
let actorData = foundry.utils.duplicate(this.data)
|
||||
// These containers are for the various different tabs
|
||||
const careers = [];
|
||||
const basicSkills = [];
|
||||
@ -2817,7 +2817,7 @@ DiceWFRP.renderRollCard() as well as handleOpposedTarget().
|
||||
*
|
||||
*/
|
||||
async addBasicSkills() {
|
||||
let allItems = duplicate(this.data.items)
|
||||
let allItems = foundry.utils.duplicate(this.data.items)
|
||||
let ownedBasicSkills = allItems.filter(i => i.type == "skill" && i.data.advanced.value == "bsc");
|
||||
let allBasicSkills = await game.wfrp4e.utility.allBasicSkills()
|
||||
|
||||
@ -3240,7 +3240,7 @@ DiceWFRP.renderRollCard() as well as handleOpposedTarget().
|
||||
let existingSkill = this.data.items.find(i => i.name.trim() == skillName && i.type == "skill")
|
||||
// If so, simply update the skill with the new advancement value.
|
||||
if (existingSkill) {
|
||||
existingSkill = duplicate(existingSkill);
|
||||
existingSkill = foundry.utils.duplicate(existingSkill);
|
||||
// If the existing skill has a greater amount of advances, use the greater value instead (make no change) - ??? Is this needed? I'm not sure why I did this. TODO: Evaluate.
|
||||
existingSkill.data.advances.value = (existingSkill.data.advances.value < advances) ? advances : existingSkill.data.advances.value;
|
||||
await this.updateEmbeddedEntity("OwnedItem", existingSkill);
|
||||
@ -3571,7 +3571,7 @@ DiceWFRP.renderRollCard() as well as handleOpposedTarget().
|
||||
|
||||
|
||||
async handleExtendedTest(testResult) {
|
||||
let test = duplicate(this.getEmbeddedEntity("OwnedItem", testResult.options.extended));
|
||||
let test = foundry.utils.duplicate(this.getEmbeddedEntity("OwnedItem", testResult.options.extended));
|
||||
|
||||
if(game.settings.get("wfrp4e", "extendedTests") && testResult.SL == 0)
|
||||
testResult.SL = testResult.roll <= testResult.target ? 1 : -1
|
||||
|
Reference in New Issue
Block a user