diff --git a/CHANGELOG.md b/CHANGELOG.md index 0d56459..bda9dec 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## LethalLib [1.0.3] + +### Fixed + +- Changed the validation to be a clamp and not forced to be 1. + ## LethalLib [1.0.2] ### Added diff --git a/LethalLib/Modules/Items.cs b/LethalLib/Modules/Items.cs index 590aae8..52f7dd6 100644 --- a/LethalLib/Modules/Items.cs +++ b/LethalLib/Modules/Items.cs @@ -866,8 +866,8 @@ private static void ValidateItemProperties(Item item) if (item.weight < 1 || item.weight > 4) { - Plugin.logger.LogWarning($"Item {item.itemName} has an invalid weight of {item.weight}, resetting to weight of 1, please check the lethal.wiki for how to give an item a valid weight, anything below 1 or above 4 gets reset to 1."); - item.weight = 1; + Plugin.logger.LogWarning($"Item {item.itemName} has an invalid weight of {item.weight}, resetting to weight of 1, please check the lethal.wiki for the weight calculation and give it a valid number, anything below 1 or above 4 gets forced to be 1 or 4."); + item.weight = Mathf.Clamp(item.weight, 1, 4); } } ///