Various changes and fixes for things that have been bugging me

Removed/flagged unused props
Typo fixes
Use `FirstOrDefault` over direct index access
Log stacktrace on exception inside `CreateWeaponItems`
This commit is contained in:
Chomp
2025-06-08 10:40:40 +01:00
parent 4eac8d90fb
commit 1d5162c761
22 changed files with 88 additions and 88 deletions
@@ -618,7 +618,7 @@ public class ItemHelper(
{
if (_databaseService.GetItems().TryGetValue(itemTpl, out var item))
{
return GetItem(itemTpl).Value?.Properties?.Slots?.Count > 0;
return item?.Properties?.Slots?.Count > 0;
}
return false;
@@ -2226,8 +2226,8 @@ public class ItemHelper(
/// <summary>
/// Get a blank two-dimensional representation of a container
/// </summary>
/// <param name="containerH">Horizontal size of container</param>
/// <param name="containerY">Vertical size of container</param>
/// <param name="containerY">Horizontal size of container</param>
/// <param name="containerX">Vertical size of container</param>
/// <returns>Two-dimensional representation of container</returns>
public int[][] GetBlankContainerMap(int containerY, int containerX)
{
@@ -2240,7 +2240,7 @@ public class ItemHelper(
//return x;
return Enumerable.Range(0, containerY)
.Select(i => new int[containerX])
.Select(_ => new int[containerX])
.ToArray();
}
}