Merge branch 'fix/arousal-zone-zero' into 'master'

Fix bug that made getting the arousal zone for the ItemFeet group impossible

See merge request 
This commit is contained in:
zorgjeanbe 2025-04-09 14:55:49 +00:00
commit 52f4d8d985

View file

@ -192,7 +192,7 @@ function PreferenceGetArousalZone(C, ZoneName) {
// Finds the asset group and make sure the string contains it
let Group = AssetGroupGet(C.AssetFamily, ZoneName);
if (!Group?.ArousalZoneID || (C.ArousalSettings.Zone.length <= Group.ArousalZoneID)) return null;
if (!Group || !CommonIsNonNegativeInteger(Group.ArousalZoneID) || (C.ArousalSettings.Zone.length <= Group.ArousalZoneID)) return null;
const Value = C.ArousalSettings.Zone.charCodeAt(Group.ArousalZoneID) - 100;
let Factor = /** @type {ArousalFactor} */ (CommonClamp(Value, 0, 4));