0
0
mirror of https://github.com/sp-tarkov/server.git synced 2025-02-13 09:50:43 -05:00

Formatting Change - Space is now given around object properties.

This commit is contained in:
Refringe 2023-11-13 12:38:16 -05:00
parent 32b47bdc18
commit 0793df60c2
No known key found for this signature in database
GPG Key ID: 64E03E5F892C6F9E
100 changed files with 813 additions and 755 deletions

View File

@ -22,10 +22,10 @@
"typeLiteral.separatorKind": "semiColon",
"enumDeclaration.memberSpacing": "newLine",
"spaceAround": false,
"spaceSurroundingProperties": false,
"objectExpression.spaceSurroundingProperties": false,
"objectPattern.spaceSurroundingProperties": false,
"typeLiteral.spaceSurroundingProperties": false,
"spaceSurroundingProperties": true,
"objectExpression.spaceSurroundingProperties": true,
"objectPattern.spaceSurroundingProperties": true,
"typeLiteral.spaceSurroundingProperties": true,
"binaryExpression.spaceSurroundingBitwiseAndArithmeticOperator": true,
"commentLine.forceSpaceAfterSlashes": true,
"constructor.spaceBeforeParentheses": false,

View File

@ -306,7 +306,10 @@ gulp.task("build:release", build("release"));
gulp.task("build:bleeding", build("bleeding"));
gulp.task("run:build", async () => await exec("Aki.Server.exe", { stdio, cwd: buildDir }));
gulp.task("run:debug", async () => await exec("ts-node-dev -r tsconfig-paths/register src/ide/TestEntry.ts", {stdio}));
gulp.task(
"run:debug",
async () => await exec("ts-node-dev -r tsconfig-paths/register src/ide/TestEntry.ts", { stdio }),
);
gulp.task("run:profiler", async () =>
{
await cleanCompiled();

View File

@ -28,7 +28,10 @@ export class CustomizationCallbacks
*/
public getSuits(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<IGetSuitsResponse>
{
const result: IGetSuitsResponse = {_id: `pmc${sessionID}`, suites: this.saveServer.getProfile(sessionID).suits};
const result: IGetSuitsResponse = {
_id: `pmc${sessionID}`,
suites: this.saveServer.getProfile(sessionID).suits,
};
return this.httpResponse.getBody(result);
}

View File

@ -84,7 +84,13 @@ export class PresetBuildController
// Create new object ready to save into profile userbuilds.weaponBuilds
const newId = this.hashUtil.generate(); // Id is empty, generate it
const newBuild: IWeaponBuild = {id: newId, name: body.name, root: body.root, items: body.items, type: "weapon"};
const newBuild: IWeaponBuild = {
id: newId,
name: body.name,
root: body.root,
items: body.items,
type: "weapon",
};
const savedWeaponBuilds = this.saveServer.getProfile(sessionId).userbuilds.weaponBuilds;
const existingBuild = savedWeaponBuilds.find((x) => x.id === body.id);

View File

@ -203,7 +203,11 @@ export class TradeController
// Add item details to request
// eslint-disable-next-line @typescript-eslint/naming-convention
sellRequest.items.push({id: itemToSell._id, count: itemToSell?.upd?.StackObjectsCount ?? 1, scheme_id: 0});
sellRequest.items.push({
id: itemToSell._id,
count: itemToSell?.upd?.StackObjectsCount ?? 1,
scheme_id: 0,
});
}
this.logger.debug(`Selling scav items to fence for ${sellRequest.price} roubles`);
return this.tradeHelper.sellItem(profileWithItemsToSell, profileThatGetsMoney, sellRequest, sessionId);

View File

@ -384,7 +384,9 @@ export class Container
// Dynamic routes
con.register<BotDynamicRouter>("BotDynamicRouter", { useClass: BotDynamicRouter });
con.register<BundleDynamicRouter>("BundleDynamicRouter", { useClass: BundleDynamicRouter });
con.register<CustomizationDynamicRouter>("CustomizationDynamicRouter", {useClass: CustomizationDynamicRouter});
con.register<CustomizationDynamicRouter>("CustomizationDynamicRouter", {
useClass: CustomizationDynamicRouter,
});
con.register<DataDynamicRouter>("DataDynamicRouter", { useClass: DataDynamicRouter });
con.register<HttpDynamicRouter>("HttpDynamicRouter", { useClass: HttpDynamicRouter });
con.register<InraidDynamicRouter>("InraidDynamicRouter", { useClass: InraidDynamicRouter });
@ -401,7 +403,9 @@ export class Container
con.register<InsuranceItemEventRouter>("InsuranceItemEventRouter", { useClass: InsuranceItemEventRouter });
con.register<InventoryItemEventRouter>("InventoryItemEventRouter", { useClass: InventoryItemEventRouter });
con.register<NoteItemEventRouter>("NoteItemEventRouter", { useClass: NoteItemEventRouter });
con.register<PresetBuildItemEventRouter>("PresetBuildItemEventRouter", {useClass: PresetBuildItemEventRouter});
con.register<PresetBuildItemEventRouter>("PresetBuildItemEventRouter", {
useClass: PresetBuildItemEventRouter,
});
con.register<QuestItemEventRouter>("QuestItemEventRouter", { useClass: QuestItemEventRouter });
con.register<RagfairItemEventRouter>("RagfairItemEventRouter", { useClass: RagfairItemEventRouter });
con.register<RepairItemEventRouter>("RepairItemEventRouter", { useClass: RepairItemEventRouter });
@ -575,13 +579,19 @@ export class Container
con.register<PlayerService>("PlayerService", { useClass: PlayerService });
con.register<PaymentService>("PaymentService", { useClass: PaymentService });
con.register<InsuranceService>("InsuranceService", InsuranceService, { lifecycle: Lifecycle.Singleton });
con.register<TraderAssortService>("TraderAssortService", TraderAssortService, {lifecycle: Lifecycle.Singleton});
con.register<TraderAssortService>("TraderAssortService", TraderAssortService, {
lifecycle: Lifecycle.Singleton,
});
con.register<RagfairPriceService>("RagfairPriceService", RagfairPriceService, {lifecycle: Lifecycle.Singleton});
con.register<RagfairPriceService>("RagfairPriceService", RagfairPriceService, {
lifecycle: Lifecycle.Singleton,
});
con.register<RagfairCategoriesService>("RagfairCategoriesService", RagfairCategoriesService, {
lifecycle: Lifecycle.Singleton,
});
con.register<RagfairOfferService>("RagfairOfferService", RagfairOfferService, {lifecycle: Lifecycle.Singleton});
con.register<RagfairOfferService>("RagfairOfferService", RagfairOfferService, {
lifecycle: Lifecycle.Singleton,
});
con.register<RagfairLinkedItemService>("RagfairLinkedItemService", RagfairLinkedItemService, {
lifecycle: Lifecycle.Singleton,
});
@ -589,7 +599,9 @@ export class Container
lifecycle: Lifecycle.Singleton,
});
con.register<NotificationService>("NotificationService", NotificationService, {lifecycle: Lifecycle.Singleton});
con.register<NotificationService>("NotificationService", NotificationService, {
lifecycle: Lifecycle.Singleton,
});
con.register<MatchLocationService>("MatchLocationService", MatchLocationService, {
lifecycle: Lifecycle.Singleton,
});
@ -598,7 +610,9 @@ export class Container
con.register<LocaleService>("LocaleService", LocaleService, { lifecycle: Lifecycle.Singleton });
con.register<ProfileFixerService>("ProfileFixerService", ProfileFixerService);
con.register<RepairService>("RepairService", RepairService);
con.register<BotLootCacheService>("BotLootCacheService", BotLootCacheService, {lifecycle: Lifecycle.Singleton});
con.register<BotLootCacheService>("BotLootCacheService", BotLootCacheService, {
lifecycle: Lifecycle.Singleton,
});
con.register<CustomItemService>("CustomItemService", CustomItemService);
con.register<BotEquipmentFilterService>("BotEquipmentFilterService", BotEquipmentFilterService);
con.register<ProfileSnapshotService>("ProfileSnapshotService", ProfileSnapshotService, {
@ -608,7 +622,9 @@ export class Container
con.register<BotGenerationCacheService>("BotGenerationCacheService", BotGenerationCacheService, {
lifecycle: Lifecycle.Singleton,
});
con.register<LocalisationService>("LocalisationService", LocalisationService, {lifecycle: Lifecycle.Singleton});
con.register<LocalisationService>("LocalisationService", LocalisationService, {
lifecycle: Lifecycle.Singleton,
});
con.register<CustomLocationWaveService>("CustomLocationWaveService", CustomLocationWaveService, {
lifecycle: Lifecycle.Singleton,
});

View File

@ -642,7 +642,10 @@ export class BotEquipmentModGenerator
// Pick random mod and check it's compatible
const exhaustableModPool = new ExhaustableArray(itemModPool[modSlot], this.randomUtil, this.jsonUtil);
let modCompatibilityResult: {incompatible: boolean; reason: string;} = {incompatible: false, reason: ""};
let modCompatibilityResult: { incompatible: boolean; reason: string; } = {
incompatible: false,
reason: "",
};
while (exhaustableModPool.hasValues())
{
modTpl = exhaustableModPool.getRandomValue();

View File

@ -780,7 +780,11 @@ export class LocationGenerator
? 1
: this.randomUtil.getInt(itemTemplate._props.StackMinRandom, itemTemplate._props.StackMaxRandom);
itemWithMods.push({_id: this.objectId.generate(), _tpl: chosenTpl, upd: {StackObjectsCount: stackCount}});
itemWithMods.push({
_id: this.objectId.generate(),
_tpl: chosenTpl,
upd: { StackObjectsCount: stackCount },
});
}
else if (this.itemHelper.isOfBaseclass(chosenTpl, BaseClasses.AMMO_BOX))
{

View File

@ -797,7 +797,10 @@ export class RepeatableQuestGenerator
*/
protected generateExplorationExitCondition(exit: Exit): IExplorationCondition
{
return {_parent: "ExitName", _props: {exitName: exit.Name, id: this.objectId.generate(), dynamicLocale: true}};
return {
_parent: "ExitName",
_props: { exitName: exit.Name, id: this.objectId.generate(), dynamicLocale: true },
};
}
/**
@ -869,7 +872,11 @@ export class RepeatableQuestGenerator
let roublesBudget = rewardRoubles;
let chosenRewardItems = this.chooseRewardItemsWithinBudget(repeatableConfig, roublesBudget);
const rewards: IRewards = {Started: [], Success: [{value: rewardXP, type: "Experience", index: 0}], Fail: []};
const rewards: IRewards = {
Started: [],
Success: [{ value: rewardXP, type: "Experience", index: 0 }],
Fail: [],
};
if (traderId === Traders.PEACEKEEPER)
{

View File

@ -116,7 +116,10 @@ export class BotGeneratorHelper
const lightLaserActiveChance = raidIsNight
? this.getBotEquipmentSettingFromConfig(botRole, "lightIsActiveNightChancePercent", 50)
: this.getBotEquipmentSettingFromConfig(botRole, "lightIsActiveDayChancePercent", 25);
itemProperties.Light = {IsActive: (this.randomUtil.getChance100(lightLaserActiveChance)), SelectedMode: 0};
itemProperties.Light = {
IsActive: (this.randomUtil.getChance100(lightLaserActiveChance)),
SelectedMode: 0,
};
}
else if (itemTemplate._parent === BaseClasses.TACTICAL_COMBO)
{
@ -126,7 +129,10 @@ export class BotGeneratorHelper
"laserIsActiveChancePercent",
50,
);
itemProperties.Light = {IsActive: (this.randomUtil.getChance100(lightLaserActiveChance)), SelectedMode: 0};
itemProperties.Light = {
IsActive: (this.randomUtil.getChance100(lightLaserActiveChance)),
SelectedMode: 0,
};
}
if (itemTemplate._parent === BaseClasses.NIGHTVISION)

View File

@ -651,7 +651,10 @@ export class HideoutHelper
*/
protected getAreaUpdObject(stackCount: number, resourceValue: number, resourceUnitsConsumed: number): Upd
{
return {StackObjectsCount: stackCount, Resource: {Value: resourceValue, UnitsConsumed: resourceUnitsConsumed}};
return {
StackObjectsCount: stackCount,
Resource: { Value: resourceValue, UnitsConsumed: resourceUnitsConsumed },
};
}
protected updateAirFilters(airFilterArea: HideoutArea, pmcData: IPmcData): void

View File

@ -215,7 +215,10 @@ export class ProfileFixerService
}
else
{
pmcProfile.Inventory.items.push({_id: hideoutStandSecondaryAreaDb._id, _tpl: stageCurrentAt.container});
pmcProfile.Inventory.items.push({
_id: hideoutStandSecondaryAreaDb._id,
_tpl: stageCurrentAt.container,
});
this.logger.debug(
`Added missing gun stand inventory secondary stash: ${hideoutStandSecondaryAreaDb._id} tpl to ${stageCurrentAt.container}`,
);