Fix enc for equipments/weapons
All checks were successful
Release Creation / build (release) Successful in 1m34s
All checks were successful
Release Creation / build (release) Successful in 1m34s
This commit is contained in:
@@ -636,6 +636,28 @@ export default class FTLNomadUtils {
|
||||
}
|
||||
}
|
||||
|
||||
static async fixWeaponsEnc() {
|
||||
// Iterate over all items of type "weapon" from compendium
|
||||
const weapons = game.items.filter(i => i.type === "weapon");
|
||||
for (const weapon of weapons) {
|
||||
// If the weapon's encumbrance is less than 1, set it to 1
|
||||
if (weapon.system.enc < 1) {
|
||||
await weapon.update({ "system.enc": 1 });
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static async fixEquipmentEnc() {
|
||||
// Iterate over all items of type "equipment" from compendium
|
||||
const equipments = game.items.filter(i => i.type === "equipment");
|
||||
for (const equipment of equipments) {
|
||||
// If the equipment's encumbrance is less than 1, set it to
|
||||
if (equipment.system.enc < 1) {
|
||||
await equipment.update({ "system.enc": 1 });
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static async importMeleeWeapons() {
|
||||
// Create a melee weapons folder if it doesn't exist
|
||||
const meleeWeaponsFolder = game.folders.getName("Melee Weapons") || await Folder.create({
|
||||
|
||||
Reference in New Issue
Block a user