diff --git a/data/weapons.lua b/data/weapons.lua index 2ebed55ace..e56483c3bd 100644 --- a/data/weapons.lua +++ b/data/weapons.lua @@ -227,6 +227,7 @@ return { ['WEAPON_FIREEXTINGUISHER'] = { label = 'Fire Extinguisher', weight = 8616, + durability = 0.006 }, ['WEAPON_FIREWORK'] = { @@ -458,8 +459,8 @@ return { }, ['WEAPON_PETROLCAN'] = { - label = 'Gas Can', - weight = 12000, + label = 'Jerry Can', + weight = 4000, }, ['WEAPON_GADGETPISTOL'] = { diff --git a/modules/inventory/server.lua b/modules/inventory/server.lua index e83a59e353..23fba6c963 100644 --- a/modules/inventory/server.lua +++ b/modules/inventory/server.lua @@ -432,6 +432,10 @@ function Inventory.SlotWeight(item, slot, ignoreCount) end end + if item.hash == `WEAPON_PETROLCAN` then + weight += 15000 * (slot.metadata.ammo / 100) + end + if slot.metadata.components then for i = #slot.metadata.components, 1, -1 do local componentWeight = Items(slot.metadata.components[i])?.weight @@ -2538,6 +2542,10 @@ local function updateWeapon(source, action, value, slot, specialAmmo) weapon.metadata.durability = 0 end + if item.hash == `WEAPON_PETROLCAN` then + weapon.weight = Inventory.SlotWeight(item, weapon) + end + if action ~= 'throw' then inventory:syncSlotsWithPlayer({ { item = weapon }