From 40f35b70029c6f64c1abace0ccbf1291d2a71a6f Mon Sep 17 00:00:00 2001 From: George Gaulin Date: Sun, 26 Jun 2022 12:08:43 -0400 Subject: [PATCH] Fix Weight Changes option --- Ereshkigal-AIO/ZEreshkigal-AllinOneMod/src/items.ts | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/Ereshkigal-AIO/ZEreshkigal-AllinOneMod/src/items.ts b/Ereshkigal-AIO/ZEreshkigal-AllinOneMod/src/items.ts index 93965e1..cb8af37 100644 --- a/Ereshkigal-AIO/ZEreshkigal-AllinOneMod/src/items.ts +++ b/Ereshkigal-AIO/ZEreshkigal-AllinOneMod/src/items.ts @@ -33,9 +33,13 @@ export class Items } // Weight Change, only Multiple possible - if (typeof this.configHandler.getConfig().items.weightChanges !== "boolean" && typeof this.configHandler.getConfig().items.weightChanges === "number" && this.configHandler.getConfig().items.weightChanges <= 0) + if (typeof this.configHandler.getConfig().items.weightChanges !== "boolean" && typeof this.configHandler.getConfig().items.weightChanges === "number" && this.configHandler.getConfig().items.weightChanges >= 0) { - this.editSimpleItemData(id, "Weight", (base._props.Weight * this.configHandler.getConfig().items.weightChanges)); + //Exclude nodes, inventory and pockets from the weight changer + if (base._type !== "Node" && base._parent !== BaseClasses.POCKETS && base._parent !== BaseClasses.INVENTORY) + { + this.editSimpleItemData(id, "Weight", (base._props.Weight * this.configHandler.getConfig().items.weightChanges)); + } } if (this.configHandler.getConfig().items.removeAllGearPenalties)