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
|
"default": 16
|
||||||
},
|
},
|
||||||
"walletLoot": {
|
"walletLoot": {
|
||||||
"chancePercent": 35,
|
"chancePercent": 45,
|
||||||
"itemCount": {
|
"itemCount": {
|
||||||
"min": 1,
|
"min": 1,
|
||||||
"max": 3
|
"max": 3
|
||||||
|
@ -403,7 +403,7 @@ export class BotLootGenerator
|
|||||||
...this.botGeneratorHelper.generateExtraPropertiesForItem(itemToAddTemplate, botRole),
|
...this.botGeneratorHelper.generateExtraPropertiesForItem(itemToAddTemplate, botRole),
|
||||||
}];
|
}];
|
||||||
|
|
||||||
// Is Simple-Wallet
|
// Is Simple-Wallet / WZ wallet
|
||||||
if (this.botConfig.walletLoot.walletTplPool.includes(weightedItemTpl))
|
if (this.botConfig.walletLoot.walletTplPool.includes(weightedItemTpl))
|
||||||
{
|
{
|
||||||
const addCurrencyToWallet = this.randomUtil.getChance100(this.botConfig.walletLoot.chancePercent);
|
const addCurrencyToWallet = this.randomUtil.getChance100(this.botConfig.walletLoot.chancePercent);
|
||||||
@ -429,14 +429,15 @@ export class BotLootGenerator
|
|||||||
containerGrid,
|
containerGrid,
|
||||||
itemToAdd,
|
itemToAdd,
|
||||||
itemWithChildrenToAdd[0]._id,
|
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);
|
this.addRequiredChildItemsToParent(itemToAddTemplate, itemWithChildrenToAdd, isPmc, botRole);
|
||||||
|
|
||||||
// Attempt to add item to container(s)
|
// Attempt to add item to container(s)
|
||||||
|
@ -324,8 +324,14 @@ export class InventoryHelper
|
|||||||
* @param containerFS2D Container grid to add item to
|
* @param containerFS2D Container grid to add item to
|
||||||
* @param itemWithChildren Item to add to grid
|
* @param itemWithChildren Item to add to grid
|
||||||
* @param containerId Id of the container we're fitting item into
|
* @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
|
// Get x/y size of item
|
||||||
const rootItemAdded = itemWithChildren[0];
|
const rootItemAdded = itemWithChildren[0];
|
||||||
@ -355,7 +361,7 @@ export class InventoryHelper
|
|||||||
}
|
}
|
||||||
// Store details for object, incuding container item will be placed in
|
// Store details for object, incuding container item will be placed in
|
||||||
rootItemAdded.parentId = containerId;
|
rootItemAdded.parentId = containerId;
|
||||||
rootItemAdded.slotId = "hideout";
|
rootItemAdded.slotId = desiredSlotId;
|
||||||
rootItemAdded.location = {
|
rootItemAdded.location = {
|
||||||
x: findSlotResult.x,
|
x: findSlotResult.x,
|
||||||
y: findSlotResult.y,
|
y: findSlotResult.y,
|
||||||
|
@ -149,7 +149,7 @@ export class LocaleService
|
|||||||
return "cz";
|
return "cz";
|
||||||
}
|
}
|
||||||
|
|
||||||
// BSG map De to GE some reason
|
// BSG map DE to GE some reason
|
||||||
if (platformLocale.language === "de")
|
if (platformLocale.language === "de")
|
||||||
{
|
{
|
||||||
return "ge";
|
return "ge";
|
||||||
|
@ -867,7 +867,9 @@ export class ProfileFixerService
|
|||||||
|
|
||||||
// Get items placed in root of stash
|
// Get items placed in root of stash
|
||||||
// TODO: extend to other areas / sub items
|
// 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)
|
if (!inventoryItemsToCheck)
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
|
Loading…
Reference in New Issue
Block a user