Skip to content
This repository was archived by the owner on Apr 19, 2025. It is now read-only.

Commit 81554df

Browse files
committed
refactor(weapons): adjust jerry can weight and durability loss
Resolves #1659.
1 parent 9f4b1a4 commit 81554df

File tree

2 files changed

+11
-2
lines changed

2 files changed

+11
-2
lines changed

data/weapons.lua

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -227,6 +227,7 @@ return {
227227
['WEAPON_FIREEXTINGUISHER'] = {
228228
label = 'Fire Extinguisher',
229229
weight = 8616,
230+
durability = 0.006
230231
},
231232

232233
['WEAPON_FIREWORK'] = {
@@ -458,8 +459,8 @@ return {
458459
},
459460

460461
['WEAPON_PETROLCAN'] = {
461-
label = 'Gas Can',
462-
weight = 12000,
462+
label = 'Jerry Can',
463+
weight = 4000,
463464
},
464465

465466
['WEAPON_GADGETPISTOL'] = {

modules/inventory/server.lua

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -432,6 +432,10 @@ function Inventory.SlotWeight(item, slot, ignoreCount)
432432
end
433433
end
434434

435+
if item.hash == `WEAPON_PETROLCAN` then
436+
weight += 15000 * (slot.metadata.ammo / 100)
437+
end
438+
435439
if slot.metadata.components then
436440
for i = #slot.metadata.components, 1, -1 do
437441
local componentWeight = Items(slot.metadata.components[i])?.weight
@@ -2538,6 +2542,10 @@ local function updateWeapon(source, action, value, slot, specialAmmo)
25382542
weapon.metadata.durability = 0
25392543
end
25402544

2545+
if item.hash == `WEAPON_PETROLCAN` then
2546+
weapon.weight = Inventory.SlotWeight(item, weapon)
2547+
end
2548+
25412549
if action ~= 'throw' then
25422550
inventory:syncSlotsWithPlayer({
25432551
{ item = weapon }

0 commit comments

Comments
 (0)