Skip to content

Commit 69f2406

Browse files
committed
Renames Models to Adjusters
They weren't really models. Adjusters... feels better.
1 parent 2473f19 commit 69f2406

File tree

2 files changed

+11
-11
lines changed

2 files changed

+11
-11
lines changed

src/OpenExtracts.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
import { MatchCallbacks } from "@spt-aki/callbacks/MatchCallbacks";
22
import { IPostDBLoadMod } from "@spt-aki/models/external/IPostDBLoadMod";
33
import { IPreAkiLoadMod } from "@spt-aki/models/external/IPreAkiLoadMod";
4+
import { ILocaleBase } from "@spt-aki/models/spt/server/ILocaleBase";
45
import { ILogger } from "@spt-aki/models/spt/utils/ILogger";
56
import { DatabaseServer } from "@spt-aki/servers/DatabaseServer";
6-
import { ILocaleBase } from "@spt-aki/models/spt/server/ILocaleBase";
77
import { DependencyContainer } from "tsyringe";
8+
import { ExtractAdjuster } from "./adjusters/ExtractAdjuster";
89
import { CustomMatchCallbacks } from "./callbacks/CustomMatchCallbacks";
910
import { CooperationExtract } from "./events/CooperationExtract";
10-
import { ModifyExtracts } from "./models/ModifyExtracts";
1111
import { ConfigServer } from "./servers/ConfigServer";
1212
import { Configuration } from "./types";
1313

@@ -85,7 +85,7 @@ export class OpenExtracts implements IPostDBLoadMod, IPreAkiLoadMod {
8585
}
8686

8787
// Modify the extracts based on the configuration.
88-
new ModifyExtracts();
88+
new ExtractAdjuster();
8989
}
9090
}
9191

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,11 @@ import { DatabaseServer } from "@spt-aki/servers/DatabaseServer";
44
import { OpenExtracts } from "../OpenExtracts";
55

66
/**
7-
* The `ModifyExtracts` class is responsible for orchestrating adjustments to game extracts according to a predefined
7+
* The `ExtractAdjuster` class is responsible for orchestrating adjustments to game extracts according to a predefined
88
* configuration. It contains methods to adjust individual and global extract properties based on the current
99
* configuration settings.
1010
*/
11-
export class ModifyExtracts {
11+
export class ExtractAdjuster {
1212
// This is a mapping of location names as they are represented in the game to their configuration and human-readable
1313
// counterparts. This is used to convert the location name from the game to the name used in the configuration file.
1414
/* eslint-disable @typescript-eslint/naming-convention */
@@ -42,7 +42,7 @@ export class ModifyExtracts {
4242
const locations: ILocations = OpenExtracts.container
4343
.resolve<DatabaseServer>("DatabaseServer")
4444
.getTables().locations;
45-
const enabledLocations = ModifyExtracts.getEnabledLocations();
45+
const enabledLocations = ExtractAdjuster.getEnabledLocations();
4646

4747
// Iterate over all of the enabled location's exits.
4848
for (const locationName of enabledLocations) {
@@ -192,7 +192,7 @@ export class ModifyExtracts {
192192
return;
193193
}
194194

195-
if (!ModifyExtracts.isCooperationExtract(extract)) {
195+
if (!ExtractAdjuster.isCooperationExtract(extract)) {
196196
// This isn't a cooperation extract;
197197
return;
198198
}
@@ -229,7 +229,7 @@ export class ModifyExtracts {
229229
return;
230230
}
231231

232-
if (!ModifyExtracts.isBackpackExtract(extract)) {
232+
if (!ExtractAdjuster.isBackpackExtract(extract)) {
233233
// This isn't a backpack extract;
234234
return;
235235
}
@@ -254,7 +254,7 @@ export class ModifyExtracts {
254254
*/
255255
private static isBackpackExtract(extract: Exit): boolean {
256256
return (
257-
ModifyExtracts.getBackpackExtractRequirementTips().has(extract.RequirementTip) &&
257+
ExtractAdjuster.getBackpackExtractRequirementTips().has(extract.RequirementTip) &&
258258
extract.RequiredSlot === "Backpack"
259259
);
260260
}
@@ -275,7 +275,7 @@ export class ModifyExtracts {
275275
return;
276276
}
277277

278-
if (!ModifyExtracts.isCliffExtract(extract)) {
278+
if (!ExtractAdjuster.isCliffExtract(extract)) {
279279
// This isn't a cliff extract;
280280
return;
281281
}
@@ -319,6 +319,6 @@ export class ModifyExtracts {
319319
*/
320320
private getLocationName(gameLocationName: string, nameType: "config" | "human"): string {
321321
const location = gameLocationName.toLowerCase();
322-
return ModifyExtracts.locationNameMappings[location]?.[nameType] || location;
322+
return ExtractAdjuster.locationNameMappings[location]?.[nameType] || location;
323323
}
324324
}

0 commit comments

Comments
 (0)