Scripts englisch statt französisch
This commit is contained in:
+16
-10
@@ -1,7 +1,7 @@
|
||||
let choice1 = [
|
||||
{
|
||||
type : "skill",
|
||||
name : "Projectiles (Arc)",
|
||||
name : "Ranged (Bow)",
|
||||
diff : {
|
||||
system : {
|
||||
advances : {
|
||||
@@ -26,10 +26,10 @@ let choice = await Dialog.wait({
|
||||
title : "Option",
|
||||
content :
|
||||
`<p>
|
||||
Ajouter une option?
|
||||
Add Option?
|
||||
</p>
|
||||
<ol>
|
||||
<li>Projectiles (Arc) +10 et un Arc Long avec 12 flèches</li>
|
||||
<li>Ranged (Bow) +10 and a Longbow with 12 Arrows</li>
|
||||
</ol>
|
||||
`,
|
||||
buttons : {
|
||||
@@ -67,18 +67,24 @@ for (let c of choice)
|
||||
let item = await game.wfrp4e.utility.find(c.name, c.type)
|
||||
if (item)
|
||||
{
|
||||
let equip = item.system.tags.has("equippable");
|
||||
item = item.toObject()
|
||||
if (equip)
|
||||
{
|
||||
item.system.equipped.value = true;
|
||||
}
|
||||
items.push(foundry.utils.mergeObject(item, (c.diff || {})))
|
||||
equip(item);
|
||||
items.push(mergeObject(item, (c.diff || {})))
|
||||
}
|
||||
else
|
||||
ui.notifications.warn(`Impossible de trouver ${talent}`, {permanent : true})
|
||||
ui.notifications.warn(`Could not find ${talent}`, {permanent : true})
|
||||
}
|
||||
|
||||
}
|
||||
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