Fixed wallets not having money stacks in them
Increased chance of money in wallets some lint fixes
This commit is contained in:
parent
ef81363ec6
commit
1098a9d869
@ -2498,7 +2498,7 @@
|
||||
"default": 16
|
||||
},
|
||||
"walletLoot": {
|
||||
"chancePercent": 35,
|
||||
"chancePercent": 45,
|
||||
"itemCount": {
|
||||
"min": 1,
|
||||
"max": 3
|
||||
|
@ -403,7 +403,7 @@ export class BotLootGenerator
|
||||
...this.botGeneratorHelper.generateExtraPropertiesForItem(itemToAddTemplate, botRole),
|
||||
}];
|
||||
|
||||
// Is Simple-Wallet
|
||||
// Is Simple-Wallet / WZ wallet
|
||||
if (this.botConfig.walletLoot.walletTplPool.includes(weightedItemTpl))
|
||||
{
|
||||
const addCurrencyToWallet = this.randomUtil.getChance100(this.botConfig.walletLoot.chancePercent);
|
||||
@ -429,14 +429,15 @@ export class BotLootGenerator
|
||||
containerGrid,
|
||||
itemToAdd,
|
||||
itemWithChildrenToAdd[0]._id,
|
||||
"main",
|
||||
);
|
||||
}
|
||||
|
||||
itemWithChildrenToAdd.push(...itemsToAdd.flatMap((x) => x));
|
||||
itemWithChildrenToAdd.push(...itemsToAdd.flatMap((moneyStack) => moneyStack));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Some items (ammBox/ammo) need extra changes
|
||||
this.addRequiredChildItemsToParent(itemToAddTemplate, itemWithChildrenToAdd, isPmc, botRole);
|
||||
|
||||
// Attempt to add item to container(s)
|
||||
|
@ -324,8 +324,14 @@ export class InventoryHelper
|
||||
* @param containerFS2D Container grid to add item to
|
||||
* @param itemWithChildren Item to add to grid
|
||||
* @param containerId Id of the container we're fitting item into
|
||||
* @param desiredSlotId slot id value to use, default is "hideout"
|
||||
*/
|
||||
public placeItemInContainer(containerFS2D: number[][], itemWithChildren: Item[], containerId: string): void
|
||||
public placeItemInContainer(
|
||||
containerFS2D: number[][],
|
||||
itemWithChildren: Item[],
|
||||
containerId: string,
|
||||
desiredSlotId = "hideout",
|
||||
): void
|
||||
{
|
||||
// Get x/y size of item
|
||||
const rootItemAdded = itemWithChildren[0];
|
||||
@ -355,7 +361,7 @@ export class InventoryHelper
|
||||
}
|
||||
// Store details for object, incuding container item will be placed in
|
||||
rootItemAdded.parentId = containerId;
|
||||
rootItemAdded.slotId = "hideout";
|
||||
rootItemAdded.slotId = desiredSlotId;
|
||||
rootItemAdded.location = {
|
||||
x: findSlotResult.x,
|
||||
y: findSlotResult.y,
|
||||
|
@ -149,7 +149,7 @@ export class LocaleService
|
||||
return "cz";
|
||||
}
|
||||
|
||||
// BSG map De to GE some reason
|
||||
// BSG map DE to GE some reason
|
||||
if (platformLocale.language === "de")
|
||||
{
|
||||
return "ge";
|
||||
|
@ -867,7 +867,9 @@ export class ProfileFixerService
|
||||
|
||||
// Get items placed in root of stash
|
||||
// TODO: extend to other areas / sub items
|
||||
const inventoryItemsToCheck = pmcProfile.Inventory.items.filter((x) => ["hideout", "main"].includes(x.slotId));
|
||||
const inventoryItemsToCheck = pmcProfile.Inventory.items.filter((item) =>
|
||||
["hideout", "main"].includes(item.slotId)
|
||||
);
|
||||
if (!inventoryItemsToCheck)
|
||||
{
|
||||
return;
|
||||
|
Loading…
Reference in New Issue
Block a user