Add all systems effects scripts + translations
This commit is contained in:
21
reference_scripts/8GyJgdHVBaLrHCY8.js
Normal file
21
reference_scripts/8GyJgdHVBaLrHCY8.js
Normal file
@ -0,0 +1,21 @@
|
||||
let type = this.item.getFlag("wfrp4e", "breath")
|
||||
let types = {
|
||||
none : "None",
|
||||
cold : "Cold",
|
||||
corrosion : "Corrosion",
|
||||
fire : "Fire",
|
||||
electricity : "Electricity",
|
||||
poison : "Poison",
|
||||
smoke : "Smoke",
|
||||
various : "Various"
|
||||
}
|
||||
if (!type)
|
||||
{
|
||||
type = (await ItemDialog.create(ItemDialog.objectToArray(types, this.item.img), 1, "Choose Breath"))[0]?.id;
|
||||
this.item.updateSource({"flags.wfrp4e.breath" : type})
|
||||
}
|
||||
|
||||
if (!this.item.name.includes("(") && types[type] && type != "none")
|
||||
{
|
||||
this.item.updateSource({name : this.item.name += ` (${types[type]})`, "system.specification.value" : this.item.system.specification.value.replace("(Type)", "").trim()})
|
||||
}
|
Reference in New Issue
Block a user