forked from public/foundryvtt-wh4-lang-fr-fr
Update scripts
This commit is contained in:
@ -13,7 +13,7 @@ let characteristics = {
|
||||
let skills = ["Esquive", "Perception"]
|
||||
let skillAdvancements = [10, 10]
|
||||
let talents = ["Flee!", "Marksman"]
|
||||
let trappings = ["Hand Weapon"]
|
||||
let trappings = ["Arme simple"]
|
||||
let items = [];
|
||||
|
||||
let updateObj = this.actor.toObject();
|
||||
@ -48,7 +48,7 @@ for (let talent of talents)
|
||||
}
|
||||
else
|
||||
{
|
||||
ui.notifications.warn(`Could not find ${talent}`, {permanent : true})
|
||||
ui.notifications.warn(`Impossible de trouver ${talent}`, {permanent : true})
|
||||
}
|
||||
}
|
||||
|
||||
@ -59,13 +59,13 @@ for (let trapping of trappings)
|
||||
{
|
||||
trappingItem = trappingItem.toObject()
|
||||
|
||||
equip(trappingItem)
|
||||
trappingItem.system.equipped.value = true;
|
||||
|
||||
items.push(trappingItem);
|
||||
}
|
||||
else
|
||||
{
|
||||
ui.notifications.warn(`Could not find ${trapping}`, {permanent : true})
|
||||
ui.notifications.warn(`Impossible de trouver ${trapping}`, {permanent : true})
|
||||
}
|
||||
}
|
||||
|
||||
@ -73,13 +73,3 @@ updateObj.name = updateObj.name += " " + this.effect.name
|
||||
|
||||
await this.actor.update(updateObj)
|
||||
this.actor.createEmbeddedDocuments("Item", items);
|
||||
|
||||
function equip(item)
|
||||
{
|
||||
if (item.type == "armour")
|
||||
item.system.worn.value = true
|
||||
else if (item.type == "weapon")
|
||||
item.system.equipped = true
|
||||
else if (item.type == "trapping" && item.system.trappingType.value == "clothingAccessories")
|
||||
item.system.worn = true
|
||||
}
|
Reference in New Issue
Block a user