mirror of
https://gitgud.io/BondageProjects/Bondage-College.git
synced 2025-04-14 04:19:22 +00:00
Merge branch 'craft3' into 'master'
BUG: Fix `CraftingLoad()` failing to properly handle nullish (i.e. unused) crafts See merge request BondageProjects/Bondage-College!5507
This commit is contained in:
commit
257b25efe2
2 changed files with 8 additions and 4 deletions
BondageClub
|
@ -969,8 +969,12 @@ function CraftingLoad() {
|
|||
|
||||
// Re-enable previously disabled items if the player now owns them
|
||||
for (const item of Player.Crafting) {
|
||||
if (item == null) {
|
||||
continue;
|
||||
}
|
||||
|
||||
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;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -694,10 +694,10 @@ function InventoryCraft(Source, Target, GroupName, Craft, Refresh, PreConfigureI
|
|||
Item.Property ??= {};
|
||||
Item.Difficulty ??= Item.Asset.Difficulty;
|
||||
|
||||
// Sets the crafter name and ID
|
||||
// Sets the crafter name and ID (if not already set)
|
||||
if (Source) {
|
||||
Item.Craft.MemberNumber = Source.MemberNumber;
|
||||
Item.Craft.MemberName = CharacterNickname(Source);
|
||||
Item.Craft.MemberNumber ??= Source.MemberNumber;
|
||||
Item.Craft.MemberName ??= CharacterNickname(Source);
|
||||
}
|
||||
|
||||
// Abort; the properties below are pre-configured by crafted items the first time they're applied,
|
||||
|
|
Loading…
Add table
Reference in a new issue