Style fixes
This commit is contained in:
parent
740ab1e563
commit
f9d22f409c
@ -597,7 +597,7 @@ export class LocationGenerator
|
||||
|
||||
// Build the list of forced loot from both `spawnpointsForced` and any point marked `IsAlwaysSpawn`
|
||||
dynamicForcedSpawnPoints.push(...dynamicLootDist.spawnpointsForced);
|
||||
dynamicForcedSpawnPoints.push(...dynamicLootDist.spawnpoints.filter(point => point.template.IsAlwaysSpawn));
|
||||
dynamicForcedSpawnPoints.push(...dynamicLootDist.spawnpoints.filter((point) => point.template.IsAlwaysSpawn));
|
||||
|
||||
// Add forced loot
|
||||
this.addForcedLoot(loot, dynamicForcedSpawnPoints, locationName);
|
||||
@ -647,7 +647,7 @@ export class LocationGenerator
|
||||
// Add ALL loose loot with 100% chance to pool
|
||||
let chosenSpawnpoints: Spawnpoint[] = [...guaranteedLoosePoints];
|
||||
|
||||
const randomSpawnpointCount = desiredSpawnpointCount - chosenSpawnpoints.length
|
||||
const randomSpawnpointCount = desiredSpawnpointCount - chosenSpawnpoints.length;
|
||||
// only draw random spawn points if needed
|
||||
if (randomSpawnpointCount > 0 && spawnpointArray.length > 0)
|
||||
{
|
||||
|
@ -320,7 +320,7 @@ export class TraderHelper
|
||||
public addTraderPurchasesToPlayerProfile(
|
||||
sessionID: string,
|
||||
newPurchaseDetails: { items: { itemId: string; count: number; }[]; traderId: string; },
|
||||
itemPurchased: Item
|
||||
itemPurchased: Item,
|
||||
): void
|
||||
{
|
||||
const profile = this.profileHelper.getFullProfile(sessionID);
|
||||
@ -351,7 +351,10 @@ export class TraderHelper
|
||||
continue;
|
||||
}
|
||||
|
||||
if( profile.traderPurchases[traderId][purchasedItem.itemId].count + purchasedItem.count > itemPurchased.upd.BuyRestrictionMax )
|
||||
if (
|
||||
profile.traderPurchases[traderId][purchasedItem.itemId].count + purchasedItem.count
|
||||
> itemPurchased.upd.BuyRestrictionMax
|
||||
)
|
||||
{
|
||||
throw new Error("Unable to purchase item, Purchase limit reached");
|
||||
}
|
||||
|
@ -3,14 +3,14 @@ import { TraderServiceType } from "@spt-aki/models/enums/TraderServiceType";
|
||||
export interface ITraderServiceModel
|
||||
{
|
||||
serviceType: TraderServiceType;
|
||||
itemsToPay?: {[key: string]: number};
|
||||
itemsToPay?: { [key: string]: number; };
|
||||
itemsToReceive?: string[];
|
||||
subServices?: {[key: string]: number};
|
||||
subServices?: { [key: string]: number; };
|
||||
requirements?: ITraderServiceRequirementsModel;
|
||||
}
|
||||
|
||||
export interface ITraderServiceRequirementsModel
|
||||
{
|
||||
completedQuests?: string[];
|
||||
standings?: {[key: string]: number};
|
||||
}
|
||||
standings?: { [key: string]: number; };
|
||||
}
|
||||
|
@ -57,7 +57,7 @@ export class TraderServicesService
|
||||
}
|
||||
|
||||
// Clear any unavailable services from the list
|
||||
traderServices = traderServices.filter(x => !servicesToDelete.includes(x.serviceType));
|
||||
traderServices = traderServices.filter((x) => !servicesToDelete.includes(x.serviceType));
|
||||
|
||||
return traderServices;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user