mirror of
https://gitgud.io/BondageProjects/Bondage-College.git
synced 2025-04-25 17:59:34 +00:00
BUG: Fix CraftingLoad()
failing to properly handle nullish (i.e. unused) crafts
This commit is contained in:
parent
1a185e0318
commit
17b7767a9e
1 changed files with 5 additions and 1 deletions
|
@ -969,8 +969,12 @@ function CraftingLoad() {
|
||||||
|
|
||||||
// Re-enable previously disabled items if the player now owns them
|
// Re-enable previously disabled items if the player now owns them
|
||||||
for (const item of Player.Crafting) {
|
for (const item of Player.Crafting) {
|
||||||
|
if (item == null) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
const asset = CraftingAssets[item.Item]?.[0];
|
const asset = CraftingAssets[item.Item]?.[0];
|
||||||
if (item?.Disabled && asset && InventoryAvailable(Player, item.Name, asset.DynamicGroupName)) {
|
if (item.Disabled && asset && InventoryAvailable(Player, item.Name, asset.DynamicGroupName)) {
|
||||||
delete item.Disabled;
|
delete item.Disabled;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue