Further branding changes
This commit is contained in:
parent
8238d80a3b
commit
02049f57e0
@ -1,4 +1,4 @@
|
|||||||
# Welcome to the SPT-AKI Modding Project
|
# Welcome to the SPT Modding Project
|
||||||
|
|
||||||
This project is designed to streamline the initial setup process for building and creating mods in the SPT-AKI environment. Follow this guide to set up your environment efficiently.
|
This project is designed to streamline the initial setup process for building and creating mods in the SPT-AKI environment. Follow this guide to set up your environment efficiently.
|
||||||
|
|
||||||
@ -47,7 +47,7 @@ Some resources to get you started:
|
|||||||
|
|
||||||
## **Coding Guidelines**
|
## **Coding Guidelines**
|
||||||
|
|
||||||
Focus your mod development around the `mod.ts` file. In the `package.json` file, only alter these properties: `"name"`, `"version"`, `"akiVersion"`, `"loadBefore"`, `"loadAfter"`, `"incompatibilities"`, `"isBundleMod"`, `"author"`, and `"license"`.
|
Focus your mod development around the `mod.ts` file. In the `package.json` file, only alter these properties: `"name"`, `"version"`, `"sptVersion"`, `"loadBefore"`, `"loadAfter"`, `"incompatibilities"`, `"isBundleMod"`, `"author"`, and `"license"`.
|
||||||
|
|
||||||
New to Typescript? Find comprehensive documentation on the [official website](https://www.typescriptlang.org/docs/).
|
New to Typescript? Find comprehensive documentation on the [official website](https://www.typescriptlang.org/docs/).
|
||||||
|
|
||||||
|
@ -1,15 +1,15 @@
|
|||||||
import { DependencyContainer, Lifecycle } from "tsyringe";
|
import { DependencyContainer, Lifecycle } from "tsyringe";
|
||||||
|
|
||||||
import { IPreAkiLoadMod } from "@spt/models/external/IPreAkiLoadMod";
|
import { IPreSptLoadMod } from "@spt/models/external/IPreSptLoadMod";
|
||||||
import { IPostAkiLoadMod } from "@spt/models/external/IPostAkiLoadMod";
|
import { IPostSptLoadMod } from "@spt/models/external/IPostSptLoadMod";
|
||||||
import { MyMod } from "./MyMod";
|
import { MyMod } from "./MyMod";
|
||||||
import { Processing } from "./Processing";
|
import { Processing } from "./Processing";
|
||||||
|
|
||||||
class Mod implements IPreAkiLoadMod, IPostAkiLoadMod
|
class Mod implements IPreSptLoadMod, IPostSptLoadMod
|
||||||
{
|
{
|
||||||
|
|
||||||
// Perform these actions before server fully loads
|
// Perform these actions before server fully loads
|
||||||
public preAkiLoad(container: DependencyContainer): void {
|
public preSptLoad(container: DependencyContainer): void {
|
||||||
// This class is registered as a singleton. This means ONE and only ONE bean
|
// This class is registered as a singleton. This means ONE and only ONE bean
|
||||||
// of this class will ever exist.
|
// of this class will ever exist.
|
||||||
container.register<MyMod>("MyMod", MyMod, {lifecycle: Lifecycle.Singleton});
|
container.register<MyMod>("MyMod", MyMod, {lifecycle: Lifecycle.Singleton});
|
||||||
@ -19,7 +19,7 @@ class Mod implements IPreAkiLoadMod, IPostAkiLoadMod
|
|||||||
container.register<Processing>("Processing", Processing);
|
container.register<Processing>("Processing", Processing);
|
||||||
}
|
}
|
||||||
|
|
||||||
public postAkiLoad(container: DependencyContainer): void
|
public postSptLoad(container: DependencyContainer): void
|
||||||
{
|
{
|
||||||
// We will run this in a quick 5 loop to show how singletons and transients work
|
// We will run this in a quick 5 loop to show how singletons and transients work
|
||||||
for (let i = 0; i < 5; i++)
|
for (let i = 0; i < 5; i++)
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
# Welcome to the SPT-AKI Modding Project
|
# Welcome to the SPT Modding Project
|
||||||
|
|
||||||
This project is designed to streamline the initial setup process for building and creating mods in the SPT-AKI environment. Follow this guide to set up your environment efficiently.
|
This project is designed to streamline the initial setup process for building and creating mods in the SPT-AKI environment. Follow this guide to set up your environment efficiently.
|
||||||
|
|
||||||
@ -47,7 +47,7 @@ Some resources to get you started:
|
|||||||
|
|
||||||
## **Coding Guidelines**
|
## **Coding Guidelines**
|
||||||
|
|
||||||
Focus your mod development around the `mod.ts` file. In the `package.json` file, only alter these properties: `"name"`, `"version"`, `"akiVersion"`, `"loadBefore"`, `"loadAfter"`, `"incompatibilities"`, `"isBundleMod"`, `"author"`, and `"license"`.
|
Focus your mod development around the `mod.ts` file. In the `package.json` file, only alter these properties: `"name"`, `"version"`, `"sptVersion"`, `"loadBefore"`, `"loadAfter"`, `"incompatibilities"`, `"isBundleMod"`, `"author"`, and `"license"`.
|
||||||
|
|
||||||
New to Typescript? Find comprehensive documentation on the [official website](https://www.typescriptlang.org/docs/).
|
New to Typescript? Find comprehensive documentation on the [official website](https://www.typescriptlang.org/docs/).
|
||||||
|
|
||||||
|
@ -1,11 +1,11 @@
|
|||||||
import { DependencyContainer } from "tsyringe";
|
import { DependencyContainer } from "tsyringe";
|
||||||
|
|
||||||
import { IPostAkiLoadMod } from "@spt/models/external/IPostAkiLoadMod";
|
import { IPostSptLoadMod } from "@spt/models/external/IPostSptLoadMod";
|
||||||
import { ILogger } from "@spt/models/spt/utils/ILogger";
|
import { ILogger } from "@spt/models/spt/utils/ILogger";
|
||||||
|
|
||||||
class Mod implements IPostAkiLoadMod
|
class Mod implements IPostSptLoadMod
|
||||||
{
|
{
|
||||||
public postAkiLoad(container: DependencyContainer): void
|
public postSptLoad(container: DependencyContainer): void
|
||||||
{
|
{
|
||||||
// get the logger from the server container
|
// get the logger from the server container
|
||||||
const logger = container.resolve<ILogger>("WinstonLogger");
|
const logger = container.resolve<ILogger>("WinstonLogger");
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
# Welcome to the SPT-AKI Modding Project
|
# Welcome to the SPT Modding Project
|
||||||
|
|
||||||
This project is designed to streamline the initial setup process for building and creating mods in the SPT-AKI environment. Follow this guide to set up your environment efficiently.
|
This project is designed to streamline the initial setup process for building and creating mods in the SPT-AKI environment. Follow this guide to set up your environment efficiently.
|
||||||
|
|
||||||
@ -47,7 +47,7 @@ Some resources to get you started:
|
|||||||
|
|
||||||
## **Coding Guidelines**
|
## **Coding Guidelines**
|
||||||
|
|
||||||
Focus your mod development around the `mod.ts` file. In the `package.json` file, only alter these properties: `"name"`, `"version"`, `"akiVersion"`, `"loadBefore"`, `"loadAfter"`, `"incompatibilities"`, `"isBundleMod"`, `"author"`, and `"license"`.
|
Focus your mod development around the `mod.ts` file. In the `package.json` file, only alter these properties: `"name"`, `"version"`, `"sptVersion"`, `"loadBefore"`, `"loadAfter"`, `"incompatibilities"`, `"isBundleMod"`, `"author"`, and `"license"`.
|
||||||
|
|
||||||
New to Typescript? Find comprehensive documentation on the [official website](https://www.typescriptlang.org/docs/).
|
New to Typescript? Find comprehensive documentation on the [official website](https://www.typescriptlang.org/docs/).
|
||||||
|
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
import { DependencyContainer } from "tsyringe";
|
import { DependencyContainer } from "tsyringe";
|
||||||
|
|
||||||
import { IPreAkiLoadMod } from "@spt/models/external/IPreAkiLoadMod"
|
import { IPreSptLoadMod } from "@spt/models/external/IPreSptLoadMod"
|
||||||
import { MyCustomLauncherCallbacks } from "./MyCustomLauncherCallbacks";
|
import { MyCustomLauncherCallbacks } from "./MyCustomLauncherCallbacks";
|
||||||
|
|
||||||
class Mod implements IPreAkiLoadMod
|
class Mod implements IPreSptLoadMod
|
||||||
{
|
{
|
||||||
// This example will show you how to override and register your own components and use them
|
// This example will show you how to override and register your own components and use them
|
||||||
// The container will by default register all AKI dependencies, but you can inject into it
|
// The container will by default register all AKI dependencies, but you can inject into it
|
||||||
@ -12,11 +12,11 @@ class Mod implements IPreAkiLoadMod
|
|||||||
// for our own custom method that will return "Lets dance" instead of "pong!"
|
// for our own custom method that will return "Lets dance" instead of "pong!"
|
||||||
|
|
||||||
// Perform these actions before server fully loads
|
// Perform these actions before server fully loads
|
||||||
public preAkiLoad(container: DependencyContainer): void {
|
public preSptLoad(container: DependencyContainer): void {
|
||||||
// Here we register our override for the component and we NEED to use the same
|
// Here we register our override for the component and we NEED to use the same
|
||||||
// token the server is using to register it.
|
// token the server is using to register it.
|
||||||
// You can find this tokens here:
|
// You can find this tokens here:
|
||||||
// https://dev.sp-tarkov.com/SPT-AKI/Server/src/branch/development/project/src/di/Container.ts
|
// https://dev.sp-tarkov.com/SPT/Server/src/branch/development/project/src/di/Container.ts
|
||||||
// In this scenario we want to override LauncherCallbacks, so we find the proper registry:
|
// In this scenario we want to override LauncherCallbacks, so we find the proper registry:
|
||||||
//
|
//
|
||||||
// depContainer.register<LauncherCallbacks>("LauncherCallbacks", { useClass: LauncherCallbacks });
|
// depContainer.register<LauncherCallbacks>("LauncherCallbacks", { useClass: LauncherCallbacks });
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
# Welcome to the SPT-AKI Modding Project
|
# Welcome to the SPT Modding Project
|
||||||
|
|
||||||
This project is designed to streamline the initial setup process for building and creating mods in the SPT-AKI environment. Follow this guide to set up your environment efficiently.
|
This project is designed to streamline the initial setup process for building and creating mods in the SPT-AKI environment. Follow this guide to set up your environment efficiently.
|
||||||
|
|
||||||
@ -47,7 +47,7 @@ Some resources to get you started:
|
|||||||
|
|
||||||
## **Coding Guidelines**
|
## **Coding Guidelines**
|
||||||
|
|
||||||
Focus your mod development around the `mod.ts` file. In the `package.json` file, only alter these properties: `"name"`, `"version"`, `"akiVersion"`, `"loadBefore"`, `"loadAfter"`, `"incompatibilities"`, `"isBundleMod"`, `"author"`, and `"license"`.
|
Focus your mod development around the `mod.ts` file. In the `package.json` file, only alter these properties: `"name"`, `"version"`, `"sptVersion"`, `"loadBefore"`, `"loadAfter"`, `"incompatibilities"`, `"isBundleMod"`, `"author"`, and `"license"`.
|
||||||
|
|
||||||
New to Typescript? Find comprehensive documentation on the [official website](https://www.typescriptlang.org/docs/).
|
New to Typescript? Find comprehensive documentation on the [official website](https://www.typescriptlang.org/docs/).
|
||||||
|
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
import { DependencyContainer } from "tsyringe";
|
import { DependencyContainer } from "tsyringe";
|
||||||
|
|
||||||
// SPT types
|
// SPT types
|
||||||
import { IPreAkiLoadMod } from "@spt/models/external/IPreAkiLoadMod";
|
import { IPreSptLoadMod } from "@spt/models/external/IPreSptLoadMod";
|
||||||
import { IPostDBLoadMod } from "@spt/models/external/IPostDBLoadMod";
|
import { IPostDBLoadMod } from "@spt/models/external/IPostDBLoadMod";
|
||||||
import { ILogger } from "@spt/models/spt/utils/ILogger";
|
import { ILogger } from "@spt/models/spt/utils/ILogger";
|
||||||
import { PreAkiModLoader } from "@spt/loaders/PreAkiModLoader";
|
import { PreSptModLoader } from "@spt/loaders/PreSptModLoader";
|
||||||
import { DatabaseServer } from "@spt/servers/DatabaseServer";
|
import { DatabaseServer } from "@spt/servers/DatabaseServer";
|
||||||
import { ImageRouter } from "@spt/routers/ImageRouter";
|
import { ImageRouter } from "@spt/routers/ImageRouter";
|
||||||
import { ConfigServer } from "@spt/servers/ConfigServer";
|
import { ConfigServer } from "@spt/servers/ConfigServer";
|
||||||
@ -22,7 +22,7 @@ import * as baseJson from "../db/base.json";
|
|||||||
import { TraderHelper } from "./traderHelpers";
|
import { TraderHelper } from "./traderHelpers";
|
||||||
import { FluentAssortConstructor as FluentAssortCreator } from "./fluentTraderAssortCreator";
|
import { FluentAssortConstructor as FluentAssortCreator } from "./fluentTraderAssortCreator";
|
||||||
|
|
||||||
class SampleTrader implements IPreAkiLoadMod, IPostDBLoadMod
|
class SampleTrader implements IPreSptLoadMod, IPostDBLoadMod
|
||||||
{
|
{
|
||||||
private mod: string;
|
private mod: string;
|
||||||
private logger: ILogger;
|
private logger: ILogger;
|
||||||
@ -37,14 +37,14 @@ class SampleTrader implements IPreAkiLoadMod, IPostDBLoadMod
|
|||||||
* Some work needs to be done prior to SPT code being loaded, registering the profile image + setting trader update time inside the trader config json
|
* Some work needs to be done prior to SPT code being loaded, registering the profile image + setting trader update time inside the trader config json
|
||||||
* @param container Dependency container
|
* @param container Dependency container
|
||||||
*/
|
*/
|
||||||
public preAkiLoad(container: DependencyContainer): void
|
public preSptLoad(container: DependencyContainer): void
|
||||||
{
|
{
|
||||||
// Get a logger
|
// Get a logger
|
||||||
this.logger = container.resolve<ILogger>("WinstonLogger");
|
this.logger = container.resolve<ILogger>("WinstonLogger");
|
||||||
this.logger.debug(`[${this.mod}] preAki Loading... `);
|
this.logger.debug(`[${this.mod}] preSpt Loading... `);
|
||||||
|
|
||||||
// Get SPT code/data we need later
|
// Get SPT code/data we need later
|
||||||
const preAkiModLoader: PreAkiModLoader = container.resolve<PreAkiModLoader>("PreAkiModLoader");
|
const preSptModLoader: PreSptModLoader = container.resolve<PreSptModLoader>("PreSptModLoader");
|
||||||
const imageRouter: ImageRouter = container.resolve<ImageRouter>("ImageRouter");
|
const imageRouter: ImageRouter = container.resolve<ImageRouter>("ImageRouter");
|
||||||
const hashUtil: HashUtil = container.resolve<HashUtil>("HashUtil");
|
const hashUtil: HashUtil = container.resolve<HashUtil>("HashUtil");
|
||||||
const configServer = container.resolve<ConfigServer>("ConfigServer");
|
const configServer = container.resolve<ConfigServer>("ConfigServer");
|
||||||
@ -54,7 +54,7 @@ class SampleTrader implements IPreAkiLoadMod, IPostDBLoadMod
|
|||||||
// Create helper class and use it to register our traders image/icon + set its stock refresh time
|
// Create helper class and use it to register our traders image/icon + set its stock refresh time
|
||||||
this.traderHelper = new TraderHelper();
|
this.traderHelper = new TraderHelper();
|
||||||
this.fluentAssortCreator = new FluentAssortCreator(hashUtil, this.logger);
|
this.fluentAssortCreator = new FluentAssortCreator(hashUtil, this.logger);
|
||||||
this.traderHelper.registerProfileImage(baseJson, this.mod, preAkiModLoader, imageRouter, "cat.jpg");
|
this.traderHelper.registerProfileImage(baseJson, this.mod, preSptModLoader, imageRouter, "cat.jpg");
|
||||||
this.traderHelper.setTraderUpdateTime(traderConfig, baseJson, 3600, 4000);
|
this.traderHelper.setTraderUpdateTime(traderConfig, baseJson, 3600, 4000);
|
||||||
|
|
||||||
// Add trader to trader enum
|
// Add trader to trader enum
|
||||||
@ -63,7 +63,7 @@ class SampleTrader implements IPreAkiLoadMod, IPostDBLoadMod
|
|||||||
// Add trader to flea market
|
// Add trader to flea market
|
||||||
ragfairConfig.traders[baseJson._id] = true;
|
ragfairConfig.traders[baseJson._id] = true;
|
||||||
|
|
||||||
this.logger.debug(`[${this.mod}] preAki Loaded`);
|
this.logger.debug(`[${this.mod}] preSpt Loaded`);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import { PreAkiModLoader } from "@spt/loaders/PreAkiModLoader";
|
import { PreSptModLoader } from "@spt/loaders/PreSptModLoader";
|
||||||
import { Item } from "@spt/models/eft/common/tables/IItem";
|
import { Item } from "@spt/models/eft/common/tables/IItem";
|
||||||
import { ITraderBase, ITraderAssort } from "@spt/models/eft/common/tables/ITrader";
|
import { ITraderBase, ITraderAssort } from "@spt/models/eft/common/tables/ITrader";
|
||||||
import { ITraderConfig, UpdateTime } from "@spt/models/spt/config/ITraderConfig";
|
import { ITraderConfig, UpdateTime } from "@spt/models/spt/config/ITraderConfig";
|
||||||
@ -12,14 +12,14 @@ export class TraderHelper
|
|||||||
* Add profile picture to our trader
|
* Add profile picture to our trader
|
||||||
* @param baseJson json file for trader (db/base.json)
|
* @param baseJson json file for trader (db/base.json)
|
||||||
* @param modName mod folder name
|
* @param modName mod folder name
|
||||||
* @param preAkiModLoader mod loader class - used to get the mods file path
|
* @param preSptModLoader mod loader class - used to get the mods file path
|
||||||
* @param imageRouter image router class - used to register the trader image path so we see their image on trader page
|
* @param imageRouter image router class - used to register the trader image path so we see their image on trader page
|
||||||
* @param traderImageName Filename of the trader icon to use
|
* @param traderImageName Filename of the trader icon to use
|
||||||
*/
|
*/
|
||||||
public registerProfileImage(baseJson: any, modName: string, preAkiModLoader: PreAkiModLoader, imageRouter: ImageRouter, traderImageName: string): void
|
public registerProfileImage(baseJson: any, modName: string, preSptModLoader: PreSptModLoader, imageRouter: ImageRouter, traderImageName: string): void
|
||||||
{
|
{
|
||||||
// Reference the mod "res" folder
|
// Reference the mod "res" folder
|
||||||
const imageFilepath = `./${preAkiModLoader.getModPath(modName)}res`;
|
const imageFilepath = `./${preSptModLoader.getModPath(modName)}res`;
|
||||||
|
|
||||||
// Register a route to point to the profile picture - remember to remove the .jpg from it
|
// Register a route to point to the profile picture - remember to remove the .jpg from it
|
||||||
imageRouter.addRoute(baseJson.avatar.replace(".jpg", ""), `${imageFilepath}/${traderImageName}`);
|
imageRouter.addRoute(baseJson.avatar.replace(".jpg", ""), `${imageFilepath}/${traderImageName}`);
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
# Welcome to the SPT-AKI Modding Project
|
# Welcome to the SPT Modding Project
|
||||||
|
|
||||||
This project is designed to streamline the initial setup process for building and creating mods in the SPT-AKI environment. Follow this guide to set up your environment efficiently.
|
This project is designed to streamline the initial setup process for building and creating mods in the SPT-AKI environment. Follow this guide to set up your environment efficiently.
|
||||||
|
|
||||||
@ -47,7 +47,7 @@ Some resources to get you started:
|
|||||||
|
|
||||||
## **Coding Guidelines**
|
## **Coding Guidelines**
|
||||||
|
|
||||||
Focus your mod development around the `mod.ts` file. In the `package.json` file, only alter these properties: `"name"`, `"version"`, `"akiVersion"`, `"loadBefore"`, `"loadAfter"`, `"incompatibilities"`, `"isBundleMod"`, `"author"`, and `"license"`.
|
Focus your mod development around the `mod.ts` file. In the `package.json` file, only alter these properties: `"name"`, `"version"`, `"sptVersion"`, `"loadBefore"`, `"loadAfter"`, `"incompatibilities"`, `"isBundleMod"`, `"author"`, and `"license"`.
|
||||||
|
|
||||||
New to Typescript? Find comprehensive documentation on the [official website](https://www.typescriptlang.org/docs/).
|
New to Typescript? Find comprehensive documentation on the [official website](https://www.typescriptlang.org/docs/).
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
import { DependencyContainer } from "tsyringe";
|
import { DependencyContainer } from "tsyringe";
|
||||||
|
|
||||||
import { IPreAkiLoadMod } from "@spt/models/external/IPreAkiLoadMod";
|
import { IPreSptLoadMod } from "@spt/models/external/IPreSptLoadMod";
|
||||||
import { IPostAkiLoadMod } from "@spt/models/external/IPostAkiLoadMod";
|
import { IPostSptLoadMod } from "@spt/models/external/IPostSptLoadMod";
|
||||||
import { IPostDBLoadMod } from "@spt/models/external/IPostDBLoadMod";
|
import { IPostDBLoadMod } from "@spt/models/external/IPostDBLoadMod";
|
||||||
import { ILogger } from "@spt/models/spt/utils/ILogger";
|
import { ILogger } from "@spt/models/spt/utils/ILogger";
|
||||||
import { DatabaseServer } from "@spt/servers/DatabaseServer";
|
import { DatabaseServer } from "@spt/servers/DatabaseServer";
|
||||||
@ -9,9 +9,9 @@ import { LogTextColor } from "@spt/models/spt/logging/LogTextColor";
|
|||||||
import { LogBackgroundColor } from "@spt/models/spt/logging/LogBackgroundColor";
|
import { LogBackgroundColor } from "@spt/models/spt/logging/LogBackgroundColor";
|
||||||
|
|
||||||
|
|
||||||
class Mod implements IPreAkiLoadMod, IPostAkiLoadMod, IPostDBLoadMod
|
class Mod implements IPreSptLoadMod, IPostSptLoadMod, IPostDBLoadMod
|
||||||
{
|
{
|
||||||
public preAkiLoad(container: DependencyContainer): void {
|
public preSptLoad(container: DependencyContainer): void {
|
||||||
// Database will be empty in here
|
// Database will be empty in here
|
||||||
const databaseServer = container.resolve<DatabaseServer>("DatabaseServer");
|
const databaseServer = container.resolve<DatabaseServer>("DatabaseServer");
|
||||||
const logger = container.resolve<ILogger>("WinstonLogger");
|
const logger = container.resolve<ILogger>("WinstonLogger");
|
||||||
@ -24,7 +24,7 @@ class Mod implements IPreAkiLoadMod, IPostAkiLoadMod, IPostDBLoadMod
|
|||||||
const databaseServer = container.resolve<DatabaseServer>("DatabaseServer");
|
const databaseServer = container.resolve<DatabaseServer>("DatabaseServer");
|
||||||
const logger = container.resolve<ILogger>("WinstonLogger");
|
const logger = container.resolve<ILogger>("WinstonLogger");
|
||||||
logger.logWithColor(`Database item size: ${Object.entries(databaseServer.getTables().templates.items).length}`, LogTextColor.RED, LogBackgroundColor.YELLOW);
|
logger.logWithColor(`Database item size: ${Object.entries(databaseServer.getTables().templates.items).length}`, LogTextColor.RED, LogBackgroundColor.YELLOW);
|
||||||
// lets do a quick modification and see how this reflect later on, on the postAkiLoad()
|
// lets do a quick modification and see how this reflect later on, on the postSptLoad()
|
||||||
|
|
||||||
// find the nvgs item by its Id
|
// find the nvgs item by its Id
|
||||||
const nvgs = databaseServer.getTables().templates.items["5c0558060db834001b735271"];
|
const nvgs = databaseServer.getTables().templates.items["5c0558060db834001b735271"];
|
||||||
@ -34,7 +34,7 @@ class Mod implements IPreAkiLoadMod, IPostAkiLoadMod, IPostDBLoadMod
|
|||||||
nvgs._props.CanSellOnRagfair = true;
|
nvgs._props.CanSellOnRagfair = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
public postAkiLoad(container: DependencyContainer): void {
|
public postSptLoad(container: DependencyContainer): void {
|
||||||
// The modification we made above would have been processed by now by AKI, so any values we changed had
|
// The modification we made above would have been processed by now by AKI, so any values we changed had
|
||||||
// already been passed through the initial lifecycles (OnLoad) of AKI.
|
// already been passed through the initial lifecycles (OnLoad) of AKI.
|
||||||
const databaseServer = container.resolve<DatabaseServer>("DatabaseServer");
|
const databaseServer = container.resolve<DatabaseServer>("DatabaseServer");
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
# Welcome to the SPT-AKI Modding Project
|
# Welcome to the SPT Modding Project
|
||||||
|
|
||||||
This project is designed to streamline the initial setup process for building and creating mods in the SPT-AKI environment. Follow this guide to set up your environment efficiently.
|
This project is designed to streamline the initial setup process for building and creating mods in the SPT-AKI environment. Follow this guide to set up your environment efficiently.
|
||||||
|
|
||||||
@ -47,7 +47,7 @@ Some resources to get you started:
|
|||||||
|
|
||||||
## **Coding Guidelines**
|
## **Coding Guidelines**
|
||||||
|
|
||||||
Focus your mod development around the `mod.ts` file. In the `package.json` file, only alter these properties: `"name"`, `"version"`, `"akiVersion"`, `"loadBefore"`, `"loadAfter"`, `"incompatibilities"`, `"isBundleMod"`, `"author"`, and `"license"`.
|
Focus your mod development around the `mod.ts` file. In the `package.json` file, only alter these properties: `"name"`, `"version"`, `"sptVersion"`, `"loadBefore"`, `"loadAfter"`, `"incompatibilities"`, `"isBundleMod"`, `"author"`, and `"license"`.
|
||||||
|
|
||||||
New to Typescript? Find comprehensive documentation on the [official website](https://www.typescriptlang.org/docs/).
|
New to Typescript? Find comprehensive documentation on the [official website](https://www.typescriptlang.org/docs/).
|
||||||
|
|
||||||
|
@ -1,14 +1,14 @@
|
|||||||
import { IncomingMessage, ServerResponse } from "node:http";
|
import { IncomingMessage, ServerResponse } from "node:http";
|
||||||
import { DependencyContainer } from "tsyringe";
|
import { DependencyContainer } from "tsyringe";
|
||||||
|
|
||||||
import { IPreAkiLoadMod } from "@spt/models/external/IPreAkiLoadMod";
|
import { IPreSptLoadMod } from "@spt/models/external/IPreSptLoadMod";
|
||||||
import { HttpListenerModService } from "@spt/services/mod/httpListener/HttpListenerModService";
|
import { HttpListenerModService } from "@spt/services/mod/httpListener/HttpListenerModService";
|
||||||
import { Type2HttpListener } from "./Type2HttpListener";
|
import { Type2HttpListener } from "./Type2HttpListener";
|
||||||
|
|
||||||
class Mod implements IPreAkiLoadMod
|
class Mod implements IPreSptLoadMod
|
||||||
{
|
{
|
||||||
// Code added here will load BEFORE the server has started loading
|
// Code added here will load BEFORE the server has started loading
|
||||||
public preAkiLoad(container: DependencyContainer): void
|
public preSptLoad(container: DependencyContainer): void
|
||||||
{
|
{
|
||||||
const httpListenerService = container.resolve<HttpListenerModService>("HttpListenerModService");
|
const httpListenerService = container.resolve<HttpListenerModService>("HttpListenerModService");
|
||||||
httpListenerService.registerHttpListener("Type1HttpListener", this.canHandleOverride, this.handleOverride)
|
httpListenerService.registerHttpListener("Type1HttpListener", this.canHandleOverride, this.handleOverride)
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
# Welcome to the SPT-AKI Modding Project
|
# Welcome to the SPT Modding Project
|
||||||
|
|
||||||
This project is designed to streamline the initial setup process for building and creating mods in the SPT-AKI environment. Follow this guide to set up your environment efficiently.
|
This project is designed to streamline the initial setup process for building and creating mods in the SPT-AKI environment. Follow this guide to set up your environment efficiently.
|
||||||
|
|
||||||
@ -47,7 +47,7 @@ Some resources to get you started:
|
|||||||
|
|
||||||
## **Coding Guidelines**
|
## **Coding Guidelines**
|
||||||
|
|
||||||
Focus your mod development around the `mod.ts` file. In the `package.json` file, only alter these properties: `"name"`, `"version"`, `"akiVersion"`, `"loadBefore"`, `"loadAfter"`, `"incompatibilities"`, `"isBundleMod"`, `"author"`, and `"license"`.
|
Focus your mod development around the `mod.ts` file. In the `package.json` file, only alter these properties: `"name"`, `"version"`, `"sptVersion"`, `"loadBefore"`, `"loadAfter"`, `"incompatibilities"`, `"isBundleMod"`, `"author"`, and `"license"`.
|
||||||
|
|
||||||
New to Typescript? Find comprehensive documentation on the [official website](https://www.typescriptlang.org/docs/).
|
New to Typescript? Find comprehensive documentation on the [official website](https://www.typescriptlang.org/docs/).
|
||||||
|
|
||||||
|
@ -1,18 +1,18 @@
|
|||||||
import { DependencyContainer } from "tsyringe";
|
import { DependencyContainer } from "tsyringe";
|
||||||
|
|
||||||
import { PreAkiModLoader } from "@spt/loaders/PreAkiModLoader";
|
import { PreSptModLoader } from "@spt/loaders/PreSptModLoader";
|
||||||
import { IPreAkiLoadMod } from "@spt/models/external/IPreAkiLoadMod";
|
import { IPreSptLoadMod } from "@spt/models/external/IPreSptLoadMod";
|
||||||
import { ILogger } from "@spt/models/spt/utils/ILogger";
|
import { ILogger } from "@spt/models/spt/utils/ILogger";
|
||||||
import { ImporterUtil } from "@spt/utils/ImporterUtil";
|
import { ImporterUtil } from "@spt/utils/ImporterUtil";
|
||||||
import { ConfigsModelBase } from "./model/ConfigsModel";
|
import { ConfigsModelBase } from "./model/ConfigsModel";
|
||||||
|
|
||||||
class Mod implements IPreAkiLoadMod {
|
class Mod implements IPreSptLoadMod {
|
||||||
public preAkiLoad(container: DependencyContainer): void {
|
public preSptLoad(container: DependencyContainer): void {
|
||||||
// get logger
|
// get logger
|
||||||
const logger = container.resolve<ILogger>("WinstonLogger");
|
const logger = container.resolve<ILogger>("WinstonLogger");
|
||||||
|
|
||||||
const importerUtil = container.resolve<ImporterUtil>("ImporterUtil");
|
const importerUtil = container.resolve<ImporterUtil>("ImporterUtil");
|
||||||
const modImporter = container.resolve<PreAkiModLoader>("PreAkiModLoader");
|
const modImporter = container.resolve<PreSptModLoader>("PreSptModLoader");
|
||||||
const path = modImporter.getModPath("16ImporterUtil");
|
const path = modImporter.getModPath("16ImporterUtil");
|
||||||
|
|
||||||
const configPath = `${path}config/`;
|
const configPath = `${path}config/`;
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
# Welcome to the SPT-AKI Modding Project
|
# Welcome to the SPT Modding Project
|
||||||
|
|
||||||
This project is designed to streamline the initial setup process for building and creating mods in the SPT-AKI environment. Follow this guide to set up your environment efficiently.
|
This project is designed to streamline the initial setup process for building and creating mods in the SPT-AKI environment. Follow this guide to set up your environment efficiently.
|
||||||
|
|
||||||
@ -47,7 +47,7 @@ Some resources to get you started:
|
|||||||
|
|
||||||
## **Coding Guidelines**
|
## **Coding Guidelines**
|
||||||
|
|
||||||
Focus your mod development around the `mod.ts` file. In the `package.json` file, only alter these properties: `"name"`, `"version"`, `"akiVersion"`, `"loadBefore"`, `"loadAfter"`, `"incompatibilities"`, `"isBundleMod"`, `"author"`, and `"license"`.
|
Focus your mod development around the `mod.ts` file. In the `package.json` file, only alter these properties: `"name"`, `"version"`, `"sptVersion"`, `"loadBefore"`, `"loadAfter"`, `"incompatibilities"`, `"isBundleMod"`, `"author"`, and `"license"`.
|
||||||
|
|
||||||
New to Typescript? Find comprehensive documentation on the [official website](https://www.typescriptlang.org/docs/).
|
New to Typescript? Find comprehensive documentation on the [official website](https://www.typescriptlang.org/docs/).
|
||||||
|
|
||||||
|
@ -1,18 +1,18 @@
|
|||||||
import { DependencyContainer } from "tsyringe";
|
import { DependencyContainer } from "tsyringe";
|
||||||
|
|
||||||
import { PreAkiModLoader } from "@spt/loaders/PreAkiModLoader";
|
import { PreSptModLoader } from "@spt/loaders/PreSptModLoader";
|
||||||
import { IPreAkiLoadModAsync } from "@spt/models/external/IPreAkiLoadModAsync";
|
import { IPreSptLoadModAsync } from "@spt/models/external/IPreSptLoadModAsync";
|
||||||
import { ILogger } from "@spt/models/spt/utils/ILogger";
|
import { ILogger } from "@spt/models/spt/utils/ILogger";
|
||||||
import { ImporterUtil } from "@spt/utils/ImporterUtil";
|
import { ImporterUtil } from "@spt/utils/ImporterUtil";
|
||||||
import { ConfigsModelBase } from "./model/ConfigsModel";
|
import { ConfigsModelBase } from "./model/ConfigsModel";
|
||||||
|
|
||||||
class Mod implements IPreAkiLoadModAsync {
|
class Mod implements IPreSptLoadModAsync {
|
||||||
public async preAkiLoadAsync(container: DependencyContainer): Promise<void> {
|
public async preSptLoadAsync(container: DependencyContainer): Promise<void> {
|
||||||
// get logger
|
// get logger
|
||||||
const logger = container.resolve<ILogger>("WinstonLogger");
|
const logger = container.resolve<ILogger>("WinstonLogger");
|
||||||
|
|
||||||
const importerUtil = container.resolve<ImporterUtil>("ImporterUtil");
|
const importerUtil = container.resolve<ImporterUtil>("ImporterUtil");
|
||||||
const modImporter = container.resolve<PreAkiModLoader>("PreAkiModLoader");
|
const modImporter = container.resolve<PreSptModLoader>("PreSptModLoader");
|
||||||
const path = modImporter.getModPath("16ImporterUtil");
|
const path = modImporter.getModPath("16ImporterUtil");
|
||||||
|
|
||||||
const configPath = `${path}config/`;
|
const configPath = `${path}config/`;
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
# Welcome to the SPT-AKI Modding Project
|
# Welcome to the SPT Modding Project
|
||||||
|
|
||||||
This project is designed to streamline the initial setup process for building and creating mods in the SPT-AKI environment. Follow this guide to set up your environment efficiently.
|
This project is designed to streamline the initial setup process for building and creating mods in the SPT-AKI environment. Follow this guide to set up your environment efficiently.
|
||||||
|
|
||||||
@ -47,7 +47,7 @@ Some resources to get you started:
|
|||||||
|
|
||||||
## **Coding Guidelines**
|
## **Coding Guidelines**
|
||||||
|
|
||||||
Focus your mod development around the `mod.ts` file. In the `package.json` file, only alter these properties: `"name"`, `"version"`, `"akiVersion"`, `"loadBefore"`, `"loadAfter"`, `"incompatibilities"`, `"isBundleMod"`, `"author"`, and `"license"`.
|
Focus your mod development around the `mod.ts` file. In the `package.json` file, only alter these properties: `"name"`, `"version"`, `"sptVersion"`, `"loadBefore"`, `"loadAfter"`, `"incompatibilities"`, `"isBundleMod"`, `"author"`, and `"license"`.
|
||||||
|
|
||||||
New to Typescript? Find comprehensive documentation on the [official website](https://www.typescriptlang.org/docs/).
|
New to Typescript? Find comprehensive documentation on the [official website](https://www.typescriptlang.org/docs/).
|
||||||
|
|
||||||
|
@ -1,18 +1,18 @@
|
|||||||
import { DependencyContainer } from "tsyringe";
|
import { DependencyContainer } from "tsyringe";
|
||||||
|
|
||||||
import { PreAkiModLoader } from "@spt/loaders/PreAkiModLoader";
|
import { PreSptModLoader } from "@spt/loaders/PreSptModLoader";
|
||||||
import { IPreAkiLoadModAsync } from "@spt/models/external/IPreAkiLoadModAsync";
|
import { IPreSptLoadModAsync } from "@spt/models/external/IPreSptLoadModAsync";
|
||||||
import { ILogger } from "@spt/models/spt/utils/ILogger";
|
import { ILogger } from "@spt/models/spt/utils/ILogger";
|
||||||
import { ImporterUtil } from "@spt/utils/ImporterUtil";
|
import { ImporterUtil } from "@spt/utils/ImporterUtil";
|
||||||
import { ConfigsModelBase } from "./model/ConfigsModel";
|
import { ConfigsModelBase } from "./model/ConfigsModel";
|
||||||
|
|
||||||
class Mod implements IPreAkiLoadModAsync {
|
class Mod implements IPreSptLoadModAsync {
|
||||||
public async preAkiLoadAsync(container: DependencyContainer): Promise<void> {
|
public async preSptLoadAsync(container: DependencyContainer): Promise<void> {
|
||||||
// get logger
|
// get logger
|
||||||
const logger = container.resolve<ILogger>("WinstonLogger");
|
const logger = container.resolve<ILogger>("WinstonLogger");
|
||||||
|
|
||||||
const importerUtil = container.resolve<ImporterUtil>("ImporterUtil");
|
const importerUtil = container.resolve<ImporterUtil>("ImporterUtil");
|
||||||
const modImporter = container.resolve<PreAkiModLoader>("PreAkiModLoader");
|
const modImporter = container.resolve<PreSptModLoader>("PreSptModLoader");
|
||||||
const path = modImporter.getModPath("16ImporterUtil");
|
const path = modImporter.getModPath("16ImporterUtil");
|
||||||
|
|
||||||
const configPath = `${path}config/`;
|
const configPath = `${path}config/`;
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
# Welcome to the SPT-AKI Modding Project
|
# Welcome to the SPT Modding Project
|
||||||
|
|
||||||
This project is designed to streamline the initial setup process for building and creating mods in the SPT-AKI environment. Follow this guide to set up your environment efficiently.
|
This project is designed to streamline the initial setup process for building and creating mods in the SPT-AKI environment. Follow this guide to set up your environment efficiently.
|
||||||
|
|
||||||
@ -47,7 +47,7 @@ Some resources to get you started:
|
|||||||
|
|
||||||
## **Coding Guidelines**
|
## **Coding Guidelines**
|
||||||
|
|
||||||
Focus your mod development around the `mod.ts` file. In the `package.json` file, only alter these properties: `"name"`, `"version"`, `"akiVersion"`, `"loadBefore"`, `"loadAfter"`, `"incompatibilities"`, `"isBundleMod"`, `"author"`, and `"license"`.
|
Focus your mod development around the `mod.ts` file. In the `package.json` file, only alter these properties: `"name"`, `"version"`, `"sptVersion"`, `"loadBefore"`, `"loadAfter"`, `"incompatibilities"`, `"isBundleMod"`, `"author"`, and `"license"`.
|
||||||
|
|
||||||
New to Typescript? Find comprehensive documentation on the [official website](https://www.typescriptlang.org/docs/).
|
New to Typescript? Find comprehensive documentation on the [official website](https://www.typescriptlang.org/docs/).
|
||||||
|
|
||||||
|
@ -3,10 +3,10 @@ import { DependencyContainer } from "tsyringe";
|
|||||||
import { IPostDBLoadMod } from "@spt/models/external/IPostDBLoadMod";
|
import { IPostDBLoadMod } from "@spt/models/external/IPostDBLoadMod";
|
||||||
import { CustomItemService } from "@spt/services/mod/CustomItemService";
|
import { CustomItemService } from "@spt/services/mod/CustomItemService";
|
||||||
import { NewItemFromCloneDetails } from "@spt/models/spt/mod/NewItemDetails";
|
import { NewItemFromCloneDetails } from "@spt/models/spt/mod/NewItemDetails";
|
||||||
import { IPostAkiLoadMod } from "@spt/models/external/IPostAkiLoadMod";
|
import { IPostSptLoadMod } from "@spt/models/external/IPostSptLoadMod";
|
||||||
import { DatabaseServer } from "@spt/servers/DatabaseServer";
|
import { DatabaseServer } from "@spt/servers/DatabaseServer";
|
||||||
|
|
||||||
class Mod implements IPostDBLoadMod, IPostAkiLoadMod
|
class Mod implements IPostDBLoadMod, IPostSptLoadMod
|
||||||
{
|
{
|
||||||
public postDBLoad(container: DependencyContainer): void
|
public postDBLoad(container: DependencyContainer): void
|
||||||
{
|
{
|
||||||
@ -71,7 +71,7 @@ class Mod implements IPostDBLoadMod, IPostAkiLoadMod
|
|||||||
}
|
}
|
||||||
|
|
||||||
//Check if our item is in the server or not
|
//Check if our item is in the server or not
|
||||||
public postAkiLoad(container: DependencyContainer): void {
|
public postSptLoad(container: DependencyContainer): void {
|
||||||
const db = container.resolve<DatabaseServer>("DatabaseServer");
|
const db = container.resolve<DatabaseServer>("DatabaseServer");
|
||||||
const item = db.getTables().templates.items;
|
const item = db.getTables().templates.items;
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
# Welcome to the SPT-AKI Modding Project
|
# Welcome to the SPT Modding Project
|
||||||
|
|
||||||
This project is designed to streamline the initial setup process for building and creating mods in the SPT-AKI environment. Follow this guide to set up your environment efficiently.
|
This project is designed to streamline the initial setup process for building and creating mods in the SPT-AKI environment. Follow this guide to set up your environment efficiently.
|
||||||
|
|
||||||
@ -47,7 +47,7 @@ Some resources to get you started:
|
|||||||
|
|
||||||
## **Coding Guidelines**
|
## **Coding Guidelines**
|
||||||
|
|
||||||
Focus your mod development around the `mod.ts` file. In the `package.json` file, only alter these properties: `"name"`, `"version"`, `"akiVersion"`, `"loadBefore"`, `"loadAfter"`, `"incompatibilities"`, `"isBundleMod"`, `"author"`, and `"license"`.
|
Focus your mod development around the `mod.ts` file. In the `package.json` file, only alter these properties: `"name"`, `"version"`, `"sptVersion"`, `"loadBefore"`, `"loadAfter"`, `"incompatibilities"`, `"isBundleMod"`, `"author"`, and `"license"`.
|
||||||
|
|
||||||
New to Typescript? Find comprehensive documentation on the [official website](https://www.typescriptlang.org/docs/).
|
New to Typescript? Find comprehensive documentation on the [official website](https://www.typescriptlang.org/docs/).
|
||||||
|
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
import path from "node:path";
|
import path from "node:path";
|
||||||
import { DependencyContainer } from "tsyringe";
|
import { DependencyContainer } from "tsyringe";
|
||||||
|
|
||||||
import { IPostAkiLoadMod } from "@spt/models/external/IPostAkiLoadMod";
|
import { IPostSptLoadMod } from "@spt/models/external/IPostSptLoadMod";
|
||||||
import { IPreAkiLoadMod } from "@spt/models/external/IPreAkiLoadMod";
|
import { IPreSptLoadMod } from "@spt/models/external/IPreSptLoadMod";
|
||||||
import { ILogger } from "@spt/models/spt/utils/ILogger";
|
import { ILogger } from "@spt/models/spt/utils/ILogger";
|
||||||
import { VFS } from "@spt/utils/VFS";
|
import { VFS } from "@spt/utils/VFS";
|
||||||
import { jsonc } from "jsonc";
|
import { jsonc } from "jsonc";
|
||||||
@ -10,8 +10,8 @@ import { jsonc } from "jsonc";
|
|||||||
// Our dynamically imported package (via pnpm) not bundled into the server
|
// Our dynamically imported package (via pnpm) not bundled into the server
|
||||||
import ora from "ora-classic";
|
import ora from "ora-classic";
|
||||||
|
|
||||||
class Mod implements IPreAkiLoadMod, IPostAkiLoadMod {
|
class Mod implements IPreSptLoadMod, IPostSptLoadMod {
|
||||||
public preAkiLoad(container: DependencyContainer): void {
|
public preSptLoad(container: DependencyContainer): void {
|
||||||
const vfs = container.resolve<VFS>("VFS");
|
const vfs = container.resolve<VFS>("VFS");
|
||||||
const logger = container.resolve<ILogger>("WinstonLogger");
|
const logger = container.resolve<ILogger>("WinstonLogger");
|
||||||
|
|
||||||
@ -20,7 +20,7 @@ class Mod implements IPreAkiLoadMod, IPostAkiLoadMod {
|
|||||||
logger.success(jsonc.stringify(parsedJsonC, null, "\t")); // you could use the built in JSON api here if you really wanted too aswell, i used jsonc to really drive home the point that it works
|
logger.success(jsonc.stringify(parsedJsonC, null, "\t")); // you could use the built in JSON api here if you really wanted too aswell, i used jsonc to really drive home the point that it works
|
||||||
}
|
}
|
||||||
|
|
||||||
public postAkiLoad(container: DependencyContainer): void {
|
public postSptLoad(container: DependencyContainer): void {
|
||||||
// this first timeout is just to prevent a weird formatting problem on the console, you can ignore it, you don't really need it anyways, it's just so that it looks right on the console
|
// this first timeout is just to prevent a weird formatting problem on the console, you can ignore it, you don't really need it anyways, it's just so that it looks right on the console
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
const spinner = ora({
|
const spinner = ora({
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
# Welcome to the SPT-AKI Modding Project
|
# Welcome to the SPT Modding Project
|
||||||
|
|
||||||
This project is designed to streamline the initial setup process for building and creating mods in the SPT-AKI environment. Follow this guide to set up your environment efficiently.
|
This project is designed to streamline the initial setup process for building and creating mods in the SPT-AKI environment. Follow this guide to set up your environment efficiently.
|
||||||
|
|
||||||
@ -47,7 +47,7 @@ Some resources to get you started:
|
|||||||
|
|
||||||
## **Coding Guidelines**
|
## **Coding Guidelines**
|
||||||
|
|
||||||
Focus your mod development around the `mod.ts` file. In the `package.json` file, only alter these properties: `"name"`, `"version"`, `"akiVersion"`, `"loadBefore"`, `"loadAfter"`, `"incompatibilities"`, `"isBundleMod"`, `"author"`, and `"license"`.
|
Focus your mod development around the `mod.ts` file. In the `package.json` file, only alter these properties: `"name"`, `"version"`, `"sptVersion"`, `"loadBefore"`, `"loadAfter"`, `"incompatibilities"`, `"isBundleMod"`, `"author"`, and `"license"`.
|
||||||
|
|
||||||
New to Typescript? Find comprehensive documentation on the [official website](https://www.typescriptlang.org/docs/).
|
New to Typescript? Find comprehensive documentation on the [official website](https://www.typescriptlang.org/docs/).
|
||||||
|
|
||||||
|
@ -1,14 +1,14 @@
|
|||||||
import { DependencyContainer } from "tsyringe";
|
import { DependencyContainer } from "tsyringe";
|
||||||
|
|
||||||
import { IPreAkiLoadMod } from "@spt/models/external/IPreAkiLoadMod";
|
import { IPreSptLoadMod } from "@spt/models/external/IPreSptLoadMod";
|
||||||
import { ILogger } from "@spt/models/spt/utils/ILogger";
|
import { ILogger } from "@spt/models/spt/utils/ILogger";
|
||||||
import { LogTextColor } from "@spt/models/spt/logging/LogTextColor";
|
import { LogTextColor } from "@spt/models/spt/logging/LogTextColor";
|
||||||
import { LogBackgroundColor } from "@spt/models/spt/logging/LogBackgroundColor";
|
import { LogBackgroundColor } from "@spt/models/spt/logging/LogBackgroundColor";
|
||||||
|
|
||||||
class Mod implements IPreAkiLoadMod
|
class Mod implements IPreSptLoadMod
|
||||||
{
|
{
|
||||||
// Code added here will load BEFORE the server has started loading
|
// Code added here will load BEFORE the server has started loading
|
||||||
public preAkiLoad(container: DependencyContainer): void
|
public preSptLoad(container: DependencyContainer): void
|
||||||
{
|
{
|
||||||
// get the logger from the server container
|
// get the logger from the server container
|
||||||
const logger = container.resolve<ILogger>("WinstonLogger");
|
const logger = container.resolve<ILogger>("WinstonLogger");
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
# Welcome to the SPT-AKI Modding Project
|
# Welcome to the SPT Modding Project
|
||||||
|
|
||||||
This project is designed to streamline the initial setup process for building and creating mods in the SPT-AKI environment. Follow this guide to set up your environment efficiently.
|
This project is designed to streamline the initial setup process for building and creating mods in the SPT-AKI environment. Follow this guide to set up your environment efficiently.
|
||||||
|
|
||||||
@ -47,7 +47,7 @@ Some resources to get you started:
|
|||||||
|
|
||||||
## **Coding Guidelines**
|
## **Coding Guidelines**
|
||||||
|
|
||||||
Focus your mod development around the `mod.ts` file. In the `package.json` file, only alter these properties: `"name"`, `"version"`, `"akiVersion"`, `"loadBefore"`, `"loadAfter"`, `"incompatibilities"`, `"isBundleMod"`, `"author"`, and `"license"`.
|
Focus your mod development around the `mod.ts` file. In the `package.json` file, only alter these properties: `"name"`, `"version"`, `"sptVersion"`, `"loadBefore"`, `"loadAfter"`, `"incompatibilities"`, `"isBundleMod"`, `"author"`, and `"license"`.
|
||||||
|
|
||||||
New to Typescript? Find comprehensive documentation on the [official website](https://www.typescriptlang.org/docs/).
|
New to Typescript? Find comprehensive documentation on the [official website](https://www.typescriptlang.org/docs/).
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
# Welcome to the SPT-AKI Modding Project
|
# Welcome to the SPT Modding Project
|
||||||
|
|
||||||
This project is designed to streamline the initial setup process for building and creating mods in the SPT-AKI environment. Follow this guide to set up your environment efficiently.
|
This project is designed to streamline the initial setup process for building and creating mods in the SPT-AKI environment. Follow this guide to set up your environment efficiently.
|
||||||
|
|
||||||
@ -47,7 +47,7 @@ Some resources to get you started:
|
|||||||
|
|
||||||
## **Coding Guidelines**
|
## **Coding Guidelines**
|
||||||
|
|
||||||
Focus your mod development around the `mod.ts` file. In the `package.json` file, only alter these properties: `"name"`, `"version"`, `"akiVersion"`, `"loadBefore"`, `"loadAfter"`, `"incompatibilities"`, `"isBundleMod"`, `"author"`, and `"license"`.
|
Focus your mod development around the `mod.ts` file. In the `package.json` file, only alter these properties: `"name"`, `"version"`, `"sptVersion"`, `"loadBefore"`, `"loadAfter"`, `"incompatibilities"`, `"isBundleMod"`, `"author"`, and `"license"`.
|
||||||
|
|
||||||
New to Typescript? Find comprehensive documentation on the [official website](https://www.typescriptlang.org/docs/).
|
New to Typescript? Find comprehensive documentation on the [official website](https://www.typescriptlang.org/docs/).
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
# Welcome to the SPT-AKI Modding Project
|
# Welcome to the SPT Modding Project
|
||||||
|
|
||||||
This project is designed to streamline the initial setup process for building and creating mods in the SPT-AKI environment. Follow this guide to set up your environment efficiently.
|
This project is designed to streamline the initial setup process for building and creating mods in the SPT-AKI environment. Follow this guide to set up your environment efficiently.
|
||||||
|
|
||||||
@ -47,7 +47,7 @@ Some resources to get you started:
|
|||||||
|
|
||||||
## **Coding Guidelines**
|
## **Coding Guidelines**
|
||||||
|
|
||||||
Focus your mod development around the `mod.ts` file. In the `package.json` file, only alter these properties: `"name"`, `"version"`, `"akiVersion"`, `"loadBefore"`, `"loadAfter"`, `"incompatibilities"`, `"isBundleMod"`, `"author"`, and `"license"`.
|
Focus your mod development around the `mod.ts` file. In the `package.json` file, only alter these properties: `"name"`, `"version"`, `"sptVersion"`, `"loadBefore"`, `"loadAfter"`, `"incompatibilities"`, `"isBundleMod"`, `"author"`, and `"license"`.
|
||||||
|
|
||||||
New to Typescript? Find comprehensive documentation on the [official website](https://www.typescriptlang.org/docs/).
|
New to Typescript? Find comprehensive documentation on the [official website](https://www.typescriptlang.org/docs/).
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
# Welcome to the SPT-AKI Modding Project
|
# Welcome to the SPT Modding Project
|
||||||
|
|
||||||
This project is designed to streamline the initial setup process for building and creating mods in the SPT-AKI environment. Follow this guide to set up your environment efficiently.
|
This project is designed to streamline the initial setup process for building and creating mods in the SPT-AKI environment. Follow this guide to set up your environment efficiently.
|
||||||
|
|
||||||
@ -47,7 +47,7 @@ Some resources to get you started:
|
|||||||
|
|
||||||
## **Coding Guidelines**
|
## **Coding Guidelines**
|
||||||
|
|
||||||
Focus your mod development around the `mod.ts` file. In the `package.json` file, only alter these properties: `"name"`, `"version"`, `"akiVersion"`, `"loadBefore"`, `"loadAfter"`, `"incompatibilities"`, `"isBundleMod"`, `"author"`, and `"license"`.
|
Focus your mod development around the `mod.ts` file. In the `package.json` file, only alter these properties: `"name"`, `"version"`, `"sptVersion"`, `"loadBefore"`, `"loadAfter"`, `"incompatibilities"`, `"isBundleMod"`, `"author"`, and `"license"`.
|
||||||
|
|
||||||
New to Typescript? Find comprehensive documentation on the [official website](https://www.typescriptlang.org/docs/).
|
New to Typescript? Find comprehensive documentation on the [official website](https://www.typescriptlang.org/docs/).
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
# Welcome to the SPT-AKI Modding Project
|
# Welcome to the SPT Modding Project
|
||||||
|
|
||||||
This project is designed to streamline the initial setup process for building and creating mods in the SPT-AKI environment. Follow this guide to set up your environment efficiently.
|
This project is designed to streamline the initial setup process for building and creating mods in the SPT-AKI environment. Follow this guide to set up your environment efficiently.
|
||||||
|
|
||||||
@ -47,7 +47,7 @@ Some resources to get you started:
|
|||||||
|
|
||||||
## **Coding Guidelines**
|
## **Coding Guidelines**
|
||||||
|
|
||||||
Focus your mod development around the `mod.ts` file. In the `package.json` file, only alter these properties: `"name"`, `"version"`, `"akiVersion"`, `"loadBefore"`, `"loadAfter"`, `"incompatibilities"`, `"isBundleMod"`, `"author"`, and `"license"`.
|
Focus your mod development around the `mod.ts` file. In the `package.json` file, only alter these properties: `"name"`, `"version"`, `"sptVersion"`, `"loadBefore"`, `"loadAfter"`, `"incompatibilities"`, `"isBundleMod"`, `"author"`, and `"license"`.
|
||||||
|
|
||||||
New to Typescript? Find comprehensive documentation on the [official website](https://www.typescriptlang.org/docs/).
|
New to Typescript? Find comprehensive documentation on the [official website](https://www.typescriptlang.org/docs/).
|
||||||
|
|
||||||
|
@ -1,13 +1,13 @@
|
|||||||
import { DependencyContainer } from "tsyringe";
|
import { DependencyContainer } from "tsyringe";
|
||||||
|
|
||||||
import { IPreAkiLoadMod } from "@spt/models/external/IPreAkiLoadMod";
|
import { IPreSptLoadMod } from "@spt/models/external/IPreSptLoadMod";
|
||||||
import { CustomWebSocketConnectionHandler } from "./CustomWebSocketConnectionHandler";
|
import { CustomWebSocketConnectionHandler } from "./CustomWebSocketConnectionHandler";
|
||||||
import { IWebSocketConnectionHandler } from "@spt/servers/ws/IWebSocketConnectionHandler";
|
import { IWebSocketConnectionHandler } from "@spt/servers/ws/IWebSocketConnectionHandler";
|
||||||
import { CustomAkiWebSocketMessageHandler } from "./CustomAkiWebSocketMessageHandler";
|
import { CustomAkiWebSocketMessageHandler } from "./CustomAkiWebSocketMessageHandler";
|
||||||
import { IAkiWebSocketMessageHandler } from "@spt/servers/ws/message/IAkiWebSocketMessageHandler";
|
import { IAkiWebSocketMessageHandler } from "@spt/servers/ws/message/IAkiWebSocketMessageHandler";
|
||||||
|
|
||||||
class Mod implements IPreAkiLoadMod {
|
class Mod implements IPreSptLoadMod {
|
||||||
public preAkiLoad(container: DependencyContainer): void {
|
public preSptLoad(container: DependencyContainer): void {
|
||||||
// We register our Custom handlers:
|
// We register our Custom handlers:
|
||||||
container.register<IWebSocketConnectionHandler>("CustomWebSocketConnectionHandler", CustomWebSocketConnectionHandler);
|
container.register<IWebSocketConnectionHandler>("CustomWebSocketConnectionHandler", CustomWebSocketConnectionHandler);
|
||||||
container.register<IAkiWebSocketMessageHandler>("CustomAkiWebSocketMessageHandler", CustomAkiWebSocketMessageHandler);
|
container.register<IAkiWebSocketMessageHandler>("CustomAkiWebSocketMessageHandler", CustomAkiWebSocketMessageHandler);
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
# Welcome to the SPT-AKI Modding Project
|
# Welcome to the SPT Modding Project
|
||||||
|
|
||||||
This project is designed to streamline the initial setup process for building and creating mods in the SPT-AKI environment. Follow this guide to set up your environment efficiently.
|
This project is designed to streamline the initial setup process for building and creating mods in the SPT-AKI environment. Follow this guide to set up your environment efficiently.
|
||||||
|
|
||||||
@ -47,7 +47,7 @@ Some resources to get you started:
|
|||||||
|
|
||||||
## **Coding Guidelines**
|
## **Coding Guidelines**
|
||||||
|
|
||||||
Focus your mod development around the `mod.ts` file. In the `package.json` file, only alter these properties: `"name"`, `"version"`, `"akiVersion"`, `"loadBefore"`, `"loadAfter"`, `"incompatibilities"`, `"isBundleMod"`, `"author"`, and `"license"`.
|
Focus your mod development around the `mod.ts` file. In the `package.json` file, only alter these properties: `"name"`, `"version"`, `"sptVersion"`, `"loadBefore"`, `"loadAfter"`, `"incompatibilities"`, `"isBundleMod"`, `"author"`, and `"license"`.
|
||||||
|
|
||||||
New to Typescript? Find comprehensive documentation on the [official website](https://www.typescriptlang.org/docs/).
|
New to Typescript? Find comprehensive documentation on the [official website](https://www.typescriptlang.org/docs/).
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
# Welcome to the SPT-AKI Modding Project
|
# Welcome to the SPT Modding Project
|
||||||
|
|
||||||
This project is designed to streamline the initial setup process for building and creating mods in the SPT-AKI environment. Follow this guide to set up your environment efficiently.
|
This project is designed to streamline the initial setup process for building and creating mods in the SPT-AKI environment. Follow this guide to set up your environment efficiently.
|
||||||
|
|
||||||
@ -47,7 +47,7 @@ Some resources to get you started:
|
|||||||
|
|
||||||
## **Coding Guidelines**
|
## **Coding Guidelines**
|
||||||
|
|
||||||
Focus your mod development around the `mod.ts` file. In the `package.json` file, only alter these properties: `"name"`, `"version"`, `"akiVersion"`, `"loadBefore"`, `"loadAfter"`, `"incompatibilities"`, `"isBundleMod"`, `"author"`, and `"license"`.
|
Focus your mod development around the `mod.ts` file. In the `package.json` file, only alter these properties: `"name"`, `"version"`, `"sptVersion"`, `"loadBefore"`, `"loadAfter"`, `"incompatibilities"`, `"isBundleMod"`, `"author"`, and `"license"`.
|
||||||
|
|
||||||
New to Typescript? Find comprehensive documentation on the [official website](https://www.typescriptlang.org/docs/).
|
New to Typescript? Find comprehensive documentation on the [official website](https://www.typescriptlang.org/docs/).
|
||||||
|
|
||||||
|
@ -1,14 +1,14 @@
|
|||||||
import { DependencyContainer } from "tsyringe";
|
import { DependencyContainer } from "tsyringe";
|
||||||
|
|
||||||
import { IPostAkiLoadMod } from "@spt/models/external/IPostAkiLoadMod";
|
import { IPostSptLoadMod } from "@spt/models/external/IPostSptLoadMod";
|
||||||
import { ILogger } from "@spt/models/spt/utils/ILogger";
|
import { ILogger } from "@spt/models/spt/utils/ILogger";
|
||||||
import { ConfigServer } from "@spt/servers/ConfigServer";
|
import { ConfigServer } from "@spt/servers/ConfigServer";
|
||||||
import { ConfigTypes } from "@spt/models/enums/ConfigTypes";
|
import { ConfigTypes } from "@spt/models/enums/ConfigTypes";
|
||||||
import { ILocationConfig } from "@spt/models/spt/config/ILocationConfig";
|
import { ILocationConfig } from "@spt/models/spt/config/ILocationConfig";
|
||||||
|
|
||||||
class Mod implements IPostAkiLoadMod
|
class Mod implements IPostSptLoadMod
|
||||||
{
|
{
|
||||||
public postAkiLoad(container: DependencyContainer): void
|
public postSptLoad(container: DependencyContainer): void
|
||||||
{
|
{
|
||||||
// get logger
|
// get logger
|
||||||
const logger = container.resolve<ILogger>("WinstonLogger");
|
const logger = container.resolve<ILogger>("WinstonLogger");
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
# Welcome to the SPT-AKI Modding Project
|
# Welcome to the SPT Modding Project
|
||||||
|
|
||||||
This project is designed to streamline the initial setup process for building and creating mods in the SPT-AKI environment. Follow this guide to set up your environment efficiently.
|
This project is designed to streamline the initial setup process for building and creating mods in the SPT-AKI environment. Follow this guide to set up your environment efficiently.
|
||||||
|
|
||||||
@ -47,7 +47,7 @@ Some resources to get you started:
|
|||||||
|
|
||||||
## **Coding Guidelines**
|
## **Coding Guidelines**
|
||||||
|
|
||||||
Focus your mod development around the `mod.ts` file. In the `package.json` file, only alter these properties: `"name"`, `"version"`, `"akiVersion"`, `"loadBefore"`, `"loadAfter"`, `"incompatibilities"`, `"isBundleMod"`, `"author"`, and `"license"`.
|
Focus your mod development around the `mod.ts` file. In the `package.json` file, only alter these properties: `"name"`, `"version"`, `"sptVersion"`, `"loadBefore"`, `"loadAfter"`, `"incompatibilities"`, `"isBundleMod"`, `"author"`, and `"license"`.
|
||||||
|
|
||||||
New to Typescript? Find comprehensive documentation on the [official website](https://www.typescriptlang.org/docs/).
|
New to Typescript? Find comprehensive documentation on the [official website](https://www.typescriptlang.org/docs/).
|
||||||
|
|
||||||
|
@ -1,16 +1,16 @@
|
|||||||
import path from "node:path";
|
import path from "node:path";
|
||||||
import { DependencyContainer } from "tsyringe";
|
import { DependencyContainer } from "tsyringe";
|
||||||
|
|
||||||
import { IPostAkiLoadMod } from "@spt/models/external/IPostAkiLoadMod";
|
import { IPostSptLoadMod } from "@spt/models/external/IPostSptLoadMod";
|
||||||
import { ILogger } from "@spt/models/spt/utils/ILogger";
|
import { ILogger } from "@spt/models/spt/utils/ILogger";
|
||||||
import { VFS } from "@spt/utils/VFS";
|
import { VFS } from "@spt/utils/VFS";
|
||||||
|
|
||||||
import JSON5 from "json5";
|
import JSON5 from "json5";
|
||||||
import { jsonc } from "jsonc";
|
import { jsonc } from "jsonc";
|
||||||
|
|
||||||
class Mod implements IPostAkiLoadMod
|
class Mod implements IPostSptLoadMod
|
||||||
{
|
{
|
||||||
public postAkiLoad(container: DependencyContainer): void {
|
public postSptLoad(container: DependencyContainer): void {
|
||||||
// get logger
|
// get logger
|
||||||
const logger = container.resolve<ILogger>("WinstonLogger");
|
const logger = container.resolve<ILogger>("WinstonLogger");
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
# Welcome to the SPT-AKI Modding Project
|
# Welcome to the SPT Modding Project
|
||||||
|
|
||||||
This project is designed to streamline the initial setup process for building and creating mods in the SPT-AKI environment. Follow this guide to set up your environment efficiently.
|
This project is designed to streamline the initial setup process for building and creating mods in the SPT-AKI environment. Follow this guide to set up your environment efficiently.
|
||||||
|
|
||||||
@ -47,7 +47,7 @@ Some resources to get you started:
|
|||||||
|
|
||||||
## **Coding Guidelines**
|
## **Coding Guidelines**
|
||||||
|
|
||||||
Focus your mod development around the `mod.ts` file. In the `package.json` file, only alter these properties: `"name"`, `"version"`, `"akiVersion"`, `"loadBefore"`, `"loadAfter"`, `"incompatibilities"`, `"isBundleMod"`, `"author"`, and `"license"`.
|
Focus your mod development around the `mod.ts` file. In the `package.json` file, only alter these properties: `"name"`, `"version"`, `"sptVersion"`, `"loadBefore"`, `"loadAfter"`, `"incompatibilities"`, `"isBundleMod"`, `"author"`, and `"license"`.
|
||||||
|
|
||||||
New to Typescript? Find comprehensive documentation on the [official website](https://www.typescriptlang.org/docs/).
|
New to Typescript? Find comprehensive documentation on the [official website](https://www.typescriptlang.org/docs/).
|
||||||
|
|
||||||
|
@ -1,13 +1,13 @@
|
|||||||
import { DependencyContainer } from "tsyringe";
|
import { DependencyContainer } from "tsyringe";
|
||||||
|
|
||||||
import { IPostAkiLoadMod } from "@spt/models/external/IPostAkiLoadMod";
|
import { IPostSptLoadMod } from "@spt/models/external/IPostSptLoadMod";
|
||||||
import { ILogger } from "@spt/models/spt/utils/ILogger";
|
import { ILogger } from "@spt/models/spt/utils/ILogger";
|
||||||
|
|
||||||
class Mod implements IPostAkiLoadMod
|
class Mod implements IPostSptLoadMod
|
||||||
{
|
{
|
||||||
private modConfig = require("../config/config.json");
|
private modConfig = require("../config/config.json");
|
||||||
|
|
||||||
public postAkiLoad(container: DependencyContainer): void {
|
public postSptLoad(container: DependencyContainer): void {
|
||||||
// get logger
|
// get logger
|
||||||
const logger = container.resolve<ILogger>("WinstonLogger");
|
const logger = container.resolve<ILogger>("WinstonLogger");
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
# Welcome to the SPT-AKI Modding Project
|
# Welcome to the SPT Modding Project
|
||||||
|
|
||||||
This project is designed to streamline the initial setup process for building and creating mods in the SPT-AKI environment. Follow this guide to set up your environment efficiently.
|
This project is designed to streamline the initial setup process for building and creating mods in the SPT-AKI environment. Follow this guide to set up your environment efficiently.
|
||||||
|
|
||||||
@ -47,7 +47,7 @@ Some resources to get you started:
|
|||||||
|
|
||||||
## **Coding Guidelines**
|
## **Coding Guidelines**
|
||||||
|
|
||||||
Focus your mod development around the `mod.ts` file. In the `package.json` file, only alter these properties: `"name"`, `"version"`, `"akiVersion"`, `"loadBefore"`, `"loadAfter"`, `"incompatibilities"`, `"isBundleMod"`, `"author"`, and `"license"`.
|
Focus your mod development around the `mod.ts` file. In the `package.json` file, only alter these properties: `"name"`, `"version"`, `"sptVersion"`, `"loadBefore"`, `"loadAfter"`, `"incompatibilities"`, `"isBundleMod"`, `"author"`, and `"license"`.
|
||||||
|
|
||||||
New to Typescript? Find comprehensive documentation on the [official website](https://www.typescriptlang.org/docs/).
|
New to Typescript? Find comprehensive documentation on the [official website](https://www.typescriptlang.org/docs/).
|
||||||
|
|
||||||
|
@ -1,13 +1,13 @@
|
|||||||
import { DependencyContainer } from "tsyringe";
|
import { DependencyContainer } from "tsyringe";
|
||||||
|
|
||||||
import { IPreAkiLoadMod } from "@spt/models/external/IPreAkiLoadMod";
|
import { IPreSptLoadMod } from "@spt/models/external/IPreSptLoadMod";
|
||||||
import { LauncherController } from "@spt/controllers/LauncherController";
|
import { LauncherController } from "@spt/controllers/LauncherController";
|
||||||
import { DatabaseServer } from "@spt/servers/DatabaseServer";
|
import { DatabaseServer } from "@spt/servers/DatabaseServer";
|
||||||
import { ILoginRequestData } from "@spt/models/eft/launcher/ILoginRequestData";
|
import { ILoginRequestData } from "@spt/models/eft/launcher/ILoginRequestData";
|
||||||
import { ILogger } from "@spt/models/spt/utils/ILogger";
|
import { ILogger } from "@spt/models/spt/utils/ILogger";
|
||||||
import { SaveServer } from "@spt/servers/SaveServer";
|
import { SaveServer } from "@spt/servers/SaveServer";
|
||||||
|
|
||||||
class Mod implements IPreAkiLoadMod
|
class Mod implements IPreSptLoadMod
|
||||||
{
|
{
|
||||||
// DO NOT leave static references to ANY resolved dependency.
|
// DO NOT leave static references to ANY resolved dependency.
|
||||||
// ALWAYS use the container to resolve dependencies
|
// ALWAYS use the container to resolve dependencies
|
||||||
@ -15,7 +15,7 @@ class Mod implements IPreAkiLoadMod
|
|||||||
private static container: DependencyContainer;
|
private static container: DependencyContainer;
|
||||||
|
|
||||||
// Perform these actions before server fully loads
|
// Perform these actions before server fully loads
|
||||||
public preAkiLoad(container: DependencyContainer): void
|
public preSptLoad(container: DependencyContainer): void
|
||||||
{
|
{
|
||||||
// We will save a reference to the dependency container to resolve dependencies
|
// We will save a reference to the dependency container to resolve dependencies
|
||||||
// that we may need down the line
|
// that we may need down the line
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
# Welcome to the SPT-AKI Modding Project
|
# Welcome to the SPT Modding Project
|
||||||
|
|
||||||
This project is designed to streamline the initial setup process for building and creating mods in the SPT-AKI environment. Follow this guide to set up your environment efficiently.
|
This project is designed to streamline the initial setup process for building and creating mods in the SPT-AKI environment. Follow this guide to set up your environment efficiently.
|
||||||
|
|
||||||
@ -47,7 +47,7 @@ Some resources to get you started:
|
|||||||
|
|
||||||
## **Coding Guidelines**
|
## **Coding Guidelines**
|
||||||
|
|
||||||
Focus your mod development around the `mod.ts` file. In the `package.json` file, only alter these properties: `"name"`, `"version"`, `"akiVersion"`, `"loadBefore"`, `"loadAfter"`, `"incompatibilities"`, `"isBundleMod"`, `"author"`, and `"license"`.
|
Focus your mod development around the `mod.ts` file. In the `package.json` file, only alter these properties: `"name"`, `"version"`, `"sptVersion"`, `"loadBefore"`, `"loadAfter"`, `"incompatibilities"`, `"isBundleMod"`, `"author"`, and `"license"`.
|
||||||
|
|
||||||
New to Typescript? Find comprehensive documentation on the [official website](https://www.typescriptlang.org/docs/).
|
New to Typescript? Find comprehensive documentation on the [official website](https://www.typescriptlang.org/docs/).
|
||||||
|
|
||||||
|
@ -1,12 +1,12 @@
|
|||||||
import { DependencyContainer } from "tsyringe";
|
import { DependencyContainer } from "tsyringe";
|
||||||
|
|
||||||
import { IPostAkiLoadMod } from "@spt/models/external/IPostAkiLoadMod";
|
import { IPostSptLoadMod } from "@spt/models/external/IPostSptLoadMod";
|
||||||
import { ILogger } from "@spt/models/spt/utils/ILogger";
|
import { ILogger } from "@spt/models/spt/utils/ILogger";
|
||||||
import { MoreCode } from "./MoreCode";
|
import { MoreCode } from "./MoreCode";
|
||||||
|
|
||||||
class Mod implements IPostAkiLoadMod
|
class Mod implements IPostSptLoadMod
|
||||||
{
|
{
|
||||||
public postAkiLoad(container: DependencyContainer): void
|
public postSptLoad(container: DependencyContainer): void
|
||||||
{
|
{
|
||||||
// get logger
|
// get logger
|
||||||
const logger = container.resolve<ILogger>("WinstonLogger");
|
const logger = container.resolve<ILogger>("WinstonLogger");
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
# Welcome to the SPT-AKI Modding Project
|
# Welcome to the SPT Modding Project
|
||||||
|
|
||||||
This project is designed to streamline the initial setup process for building and creating mods in the SPT-AKI environment. Follow this guide to set up your environment efficiently.
|
This project is designed to streamline the initial setup process for building and creating mods in the SPT-AKI environment. Follow this guide to set up your environment efficiently.
|
||||||
|
|
||||||
@ -47,7 +47,7 @@ Some resources to get you started:
|
|||||||
|
|
||||||
## **Coding Guidelines**
|
## **Coding Guidelines**
|
||||||
|
|
||||||
Focus your mod development around the `mod.ts` file. In the `package.json` file, only alter these properties: `"name"`, `"version"`, `"akiVersion"`, `"loadBefore"`, `"loadAfter"`, `"incompatibilities"`, `"isBundleMod"`, `"author"`, and `"license"`.
|
Focus your mod development around the `mod.ts` file. In the `package.json` file, only alter these properties: `"name"`, `"version"`, `"sptVersion"`, `"loadBefore"`, `"loadAfter"`, `"incompatibilities"`, `"isBundleMod"`, `"author"`, and `"license"`.
|
||||||
|
|
||||||
New to Typescript? Find comprehensive documentation on the [official website](https://www.typescriptlang.org/docs/).
|
New to Typescript? Find comprehensive documentation on the [official website](https://www.typescriptlang.org/docs/).
|
||||||
|
|
||||||
|
@ -1,12 +1,12 @@
|
|||||||
import { DependencyContainer } from "tsyringe";
|
import { DependencyContainer } from "tsyringe";
|
||||||
|
|
||||||
import { IPreAkiLoadMod } from "@spt/models/external/IPreAkiLoadMod";
|
import { IPreSptLoadMod } from "@spt/models/external/IPreSptLoadMod";
|
||||||
import { ILogger } from "@spt/models/spt/utils/ILogger";
|
import { ILogger } from "@spt/models/spt/utils/ILogger";
|
||||||
import { OnLoadModService } from "@spt/services/mod/onLoad/OnLoadModService";
|
import { OnLoadModService } from "@spt/services/mod/onLoad/OnLoadModService";
|
||||||
|
|
||||||
class Mod implements IPreAkiLoadMod
|
class Mod implements IPreSptLoadMod
|
||||||
{
|
{
|
||||||
public preAkiLoad(container: DependencyContainer): void
|
public preSptLoad(container: DependencyContainer): void
|
||||||
{
|
{
|
||||||
const logger = container.resolve<ILogger>("WinstonLogger");
|
const logger = container.resolve<ILogger>("WinstonLogger");
|
||||||
const onLoadModService = container.resolve<OnLoadModService>("OnLoadModService");
|
const onLoadModService = container.resolve<OnLoadModService>("OnLoadModService");
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
# Welcome to the SPT-AKI Modding Project
|
# Welcome to the SPT Modding Project
|
||||||
|
|
||||||
This project is designed to streamline the initial setup process for building and creating mods in the SPT-AKI environment. Follow this guide to set up your environment efficiently.
|
This project is designed to streamline the initial setup process for building and creating mods in the SPT-AKI environment. Follow this guide to set up your environment efficiently.
|
||||||
|
|
||||||
@ -47,7 +47,7 @@ Some resources to get you started:
|
|||||||
|
|
||||||
## **Coding Guidelines**
|
## **Coding Guidelines**
|
||||||
|
|
||||||
Focus your mod development around the `mod.ts` file. In the `package.json` file, only alter these properties: `"name"`, `"version"`, `"akiVersion"`, `"loadBefore"`, `"loadAfter"`, `"incompatibilities"`, `"isBundleMod"`, `"author"`, and `"license"`.
|
Focus your mod development around the `mod.ts` file. In the `package.json` file, only alter these properties: `"name"`, `"version"`, `"sptVersion"`, `"loadBefore"`, `"loadAfter"`, `"incompatibilities"`, `"isBundleMod"`, `"author"`, and `"license"`.
|
||||||
|
|
||||||
New to Typescript? Find comprehensive documentation on the [official website](https://www.typescriptlang.org/docs/).
|
New to Typescript? Find comprehensive documentation on the [official website](https://www.typescriptlang.org/docs/).
|
||||||
|
|
||||||
|
@ -1,12 +1,12 @@
|
|||||||
import { DependencyContainer } from "tsyringe";
|
import { DependencyContainer } from "tsyringe";
|
||||||
|
|
||||||
import { IPreAkiLoadMod } from "@spt/models/external/IPreAkiLoadMod";
|
import { IPreSptLoadMod } from "@spt/models/external/IPreSptLoadMod";
|
||||||
import { ILogger } from "@spt/models/spt/utils/ILogger";
|
import { ILogger } from "@spt/models/spt/utils/ILogger";
|
||||||
import { OnUpdateModService } from "@spt/services/mod/onUpdate/OnUpdateModService";
|
import { OnUpdateModService } from "@spt/services/mod/onUpdate/OnUpdateModService";
|
||||||
|
|
||||||
class Mod implements IPreAkiLoadMod
|
class Mod implements IPreSptLoadMod
|
||||||
{
|
{
|
||||||
public preAkiLoad(container: DependencyContainer): void {
|
public preSptLoad(container: DependencyContainer): void {
|
||||||
const logger = container.resolve<ILogger>("WinstonLogger");
|
const logger = container.resolve<ILogger>("WinstonLogger");
|
||||||
const onUpdateModService = container.resolve<OnUpdateModService>("OnUpdateModService");
|
const onUpdateModService = container.resolve<OnUpdateModService>("OnUpdateModService");
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
# Welcome to the SPT-AKI Modding Project
|
# Welcome to the SPT Modding Project
|
||||||
|
|
||||||
This project is designed to streamline the initial setup process for building and creating mods in the SPT-AKI environment. Follow this guide to set up your environment efficiently.
|
This project is designed to streamline the initial setup process for building and creating mods in the SPT-AKI environment. Follow this guide to set up your environment efficiently.
|
||||||
|
|
||||||
@ -47,7 +47,7 @@ Some resources to get you started:
|
|||||||
|
|
||||||
## **Coding Guidelines**
|
## **Coding Guidelines**
|
||||||
|
|
||||||
Focus your mod development around the `mod.ts` file. In the `package.json` file, only alter these properties: `"name"`, `"version"`, `"akiVersion"`, `"loadBefore"`, `"loadAfter"`, `"incompatibilities"`, `"isBundleMod"`, `"author"`, and `"license"`.
|
Focus your mod development around the `mod.ts` file. In the `package.json` file, only alter these properties: `"name"`, `"version"`, `"sptVersion"`, `"loadBefore"`, `"loadAfter"`, `"incompatibilities"`, `"isBundleMod"`, `"author"`, and `"license"`.
|
||||||
|
|
||||||
New to Typescript? Find comprehensive documentation on the [official website](https://www.typescriptlang.org/docs/).
|
New to Typescript? Find comprehensive documentation on the [official website](https://www.typescriptlang.org/docs/).
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user