diff --git a/projects/Gibbed.BorderlandsOz.GameInfo/ItemBalanceDefinition.cs b/projects/Gibbed.BorderlandsOz.GameInfo/ItemBalanceDefinition.cs index 9641f2e..71b46c6 100644 --- a/projects/Gibbed.BorderlandsOz.GameInfo/ItemBalanceDefinition.cs +++ b/projects/Gibbed.BorderlandsOz.GameInfo/ItemBalanceDefinition.cs @@ -139,6 +139,11 @@ List getList(IEnumerable enumerable) } } + if (result.Item != item && result.Items.Contains(item) == false) + { + throw new ResourceNotFoundException($"item type '{item.ResourcePath}' is not valid for '{this.ResourcePath}'"); + } + return result; } diff --git a/projects/Gibbed.BorderlandsOz.GameInfo/WeaponBalanceDefinition.cs b/projects/Gibbed.BorderlandsOz.GameInfo/WeaponBalanceDefinition.cs index 07af05a..6332861 100644 --- a/projects/Gibbed.BorderlandsOz.GameInfo/WeaponBalanceDefinition.cs +++ b/projects/Gibbed.BorderlandsOz.GameInfo/WeaponBalanceDefinition.cs @@ -123,6 +123,11 @@ public WeaponBalanceDefinition Create(WeaponTypeDefinition weaponType) AddPartList(balance.Parts.MaterialParts, balance.Parts.Mode, result.Parts.MaterialParts); } + if (result.WeaponType != weaponType) + { + throw new ResourceNotFoundException($"weapon type '{weaponType.ResourcePath}' is not valid for '{this.ResourcePath}'"); + } + return result; }