Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions LethalLib/Modules/Items.cs
Original file line number Diff line number Diff line change
Expand Up @@ -777,7 +777,7 @@
}

///<summary
///This method registers a scrap item to the game, However it allows you to pass rarity tables, instead of just a single rarity.

Check warning on line 780 in LethalLib/Modules/Items.cs

View workflow job for this annotation

GitHub Actions / Build

XML comment has badly formed XML -- 'The character(s) ',' cannot be used at this location.'

Check warning on line 780 in LethalLib/Modules/Items.cs

View workflow job for this annotation

GitHub Actions / Build

XML comment has badly formed XML -- 'Missing equals sign between attribute and attribute value.'

Check warning on line 780 in LethalLib/Modules/Items.cs

View workflow job for this annotation

GitHub Actions / Build

XML comment has badly formed XML -- 'Missing equals sign between attribute and attribute value.'

Check warning on line 780 in LethalLib/Modules/Items.cs

View workflow job for this annotation

GitHub Actions / Build

XML comment has badly formed XML -- 'Missing equals sign between attribute and attribute value.'

Check warning on line 780 in LethalLib/Modules/Items.cs

View workflow job for this annotation

GitHub Actions / Build

XML comment has badly formed XML -- 'Missing equals sign between attribute and attribute value.'

Check warning on line 780 in LethalLib/Modules/Items.cs

View workflow job for this annotation

GitHub Actions / Build

XML comment has badly formed XML -- 'Missing equals sign between attribute and attribute value.'

Check warning on line 780 in LethalLib/Modules/Items.cs

View workflow job for this annotation

GitHub Actions / Build

XML comment has badly formed XML -- 'Missing equals sign between attribute and attribute value.'

Check warning on line 780 in LethalLib/Modules/Items.cs

View workflow job for this annotation

GitHub Actions / Build

XML comment has badly formed XML -- 'Missing equals sign between attribute and attribute value.'

Check warning on line 780 in LethalLib/Modules/Items.cs

View workflow job for this annotation

GitHub Actions / Build

XML comment has badly formed XML -- 'Missing equals sign between attribute and attribute value.'

Check warning on line 780 in LethalLib/Modules/Items.cs

View workflow job for this annotation

GitHub Actions / Build

XML comment has badly formed XML -- 'Missing equals sign between attribute and attribute value.'
///</summary>
public static void RegisterScrap(Item spawnableItem, Dictionary<Levels.LevelTypes, int>? levelRarities = null, Dictionary<string, int>? customLevelRarities = null)
{
Expand Down Expand Up @@ -866,8 +866,8 @@

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);
}
}
///<summary>
Expand Down