RevenantBob
October 6th, 2020, 06:19
There's a few bugs in the item scripts surrounding subtypes:
First, "Long Arms" should be "Longarms".
item_main.lua - Line 48
local bWeaponRanged = (sSubType == "Small Arms" or sSubType == "Long Arms" or sSubType == "Grenade" or sSubType == "Heavy" or sSubType == "Special" or sSubType == "Sniper");
Second, capacity controls and range are showing up for "Heavy" armor because of:
item_main.lua - Line 109
if updateControl("range", bReadOnly, bID and bWeaponRanged and not bAmmunition) then bSection4 = true; end
if updateControl("capacity", bReadOnly, bID and bWeaponRanged and not bAmmunition) then bSection4 = true; end
Since Armor can be heavy as well, this causes the issue with "bWeaponRanged". It needs to ALSO check if it's a weapon at all!
First, "Long Arms" should be "Longarms".
item_main.lua - Line 48
local bWeaponRanged = (sSubType == "Small Arms" or sSubType == "Long Arms" or sSubType == "Grenade" or sSubType == "Heavy" or sSubType == "Special" or sSubType == "Sniper");
Second, capacity controls and range are showing up for "Heavy" armor because of:
item_main.lua - Line 109
if updateControl("range", bReadOnly, bID and bWeaponRanged and not bAmmunition) then bSection4 = true; end
if updateControl("capacity", bReadOnly, bID and bWeaponRanged and not bAmmunition) then bSection4 = true; end
Since Armor can be heavy as well, this causes the issue with "bWeaponRanged". It needs to ALSO check if it's a weapon at all!