LabAPI
LabAPI copied to clipboard
[BUG]: FirearmItem.BaseWeight returns Base.BaseLength instead of Base.BaseWeight
Before You Report
- [x] I have searched for existing reports of this bug, and this bug report is unique.
Version
1.1.7
Description
FirearmItem.BaseWeight property incorrectly references Base.BaseLength instead of Base.BaseWeight, returning the firearm's length in inches instead of its base weight in kilograms.
To Reproduce
- Obtain a
FirearmItemwrapper for any weapon. - Read
firearmItem.BaseWeight. - Compare the value with
firearmItem.BaseLength— both return the identical length value.
Expected Behavior
FirearmItem.BaseWeight should return Base.BaseWeight.
Additional Information
In LabApi/Features/Wrappers/Items/Firearm/FirearmItem.cs lines 121-124:
/// <summary>
/// Gets the weight of the firearm in kilograms without any attachments.
/// </summary>
public float BaseWeight => Base.BaseLength;
Proposed fix:
public float BaseWeight => Base.BaseWeight;