Compare commits
2 Commits
b878e030e5
...
3099403181
Author | SHA1 | Date | |
---|---|---|---|
![]() |
3099403181 | ||
![]() |
f31a9e983d |
TypeScript
12ClassExtensionOverride/src
22CustomSptCommand
.buildignore.eslintignore.eslintrc.jsonREADME.mdbuild.mjsmod.code-workspacepackage.json
src
tsconfig.jsontypes
ErrorHandler.d.tsProgram.d.ts
callbacks
AchievementCallbacks.d.tsBotCallbacks.d.tsBuildsCallbacks.d.tsBundleCallbacks.d.tsClientLogCallbacks.d.tsCustomizationCallbacks.d.tsDataCallbacks.d.tsDialogueCallbacks.d.tsGameCallbacks.d.tsHandbookCallbacks.d.tsHealthCallbacks.d.tsHideoutCallbacks.d.tsHttpCallbacks.d.tsInraidCallbacks.d.tsInsuranceCallbacks.d.tsInventoryCallbacks.d.tsItemEventCallbacks.d.tsLauncherCallbacks.d.tsLocationCallbacks.d.tsMatchCallbacks.d.tsModCallbacks.d.tsNoteCallbacks.d.tsNotifierCallbacks.d.tsPresetCallbacks.d.tsProfileCallbacks.d.tsQuestCallbacks.d.tsRagfairCallbacks.d.tsRepairCallbacks.d.tsSaveCallbacks.d.tsTradeCallbacks.d.tsTraderCallbacks.d.tsWeatherCallbacks.d.tsWishlistCallbacks.d.ts
context
controllers
AchievementController.d.tsBotController.d.tsBuildController.d.tsClientLogController.d.tsCustomizationController.d.tsDialogueController.d.tsGameController.d.tsHandbookController.d.tsHealthController.d.tsHideoutController.d.tsInraidController.d.tsInsuranceController.d.tsInventoryController.d.tsLauncherController.d.tsLocationController.d.tsMatchController.d.tsNoteController.d.tsNotifierController.d.tsPresetController.d.tsProfileController.d.tsQuestController.d.tsRagfairController.d.tsRepairController.d.tsRepeatableQuestController.d.tsTradeController.d.tsTraderController.d.tsWeatherController.d.tsWishlistController.d.ts
di
generators
BotEquipmentModGenerator.d.tsBotGenerator.d.tsBotInventoryGenerator.d.tsBotLevelGenerator.d.tsBotLootGenerator.d.tsBotWeaponGenerator.d.tsFenceBaseAssortGenerator.d.tsLocationGenerator.d.tsLootGenerator.d.tsPMCLootGenerator.d.tsPlayerScavGenerator.d.tsRagfairAssortGenerator.d.tsRagfairOfferGenerator.d.tsRepeatableQuestGenerator.d.tsRepeatableQuestRewardGenerator.d.tsScavCaseRewardGenerator.d.tsWeatherGenerator.d.ts
weapongen
@ -6,7 +6,7 @@ import { MyCustomLauncherCallbacks } from "./MyCustomLauncherCallbacks";
|
|||||||
class Mod implements IPreSptLoadMod
|
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 SPT dependencies, but you can inject into it
|
||||||
// you own custom implementations the server will then use.
|
// you own custom implementations the server will then use.
|
||||||
// In this example we will take the LauncherCallbacks class and override the ping() method
|
// In this example we will take the LauncherCallbacks class and override the ping() method
|
||||||
// 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!"
|
||||||
|
0
TypeScript/22CustomAkiCommand/mod.code-workspace → TypeScript/22CustomSptCommand/mod.code-workspace
0
TypeScript/22CustomAkiCommand/mod.code-workspace → TypeScript/22CustomSptCommand/mod.code-workspace
@ -4,11 +4,11 @@ import { ISptCommand } from "@spt/helpers/Dialogue/Commando/SptCommands/ISptComm
|
|||||||
import { ItemHelper } from "@spt/helpers/ItemHelper";
|
import { ItemHelper } from "@spt/helpers/ItemHelper";
|
||||||
import { MailSendService } from "@spt/services/MailSendService";
|
import { MailSendService } from "@spt/services/MailSendService";
|
||||||
import { ISendMessageRequest } from "@spt/models/eft/dialog/ISendMessageRequest";
|
import { ISendMessageRequest } from "@spt/models/eft/dialog/ISendMessageRequest";
|
||||||
import { IUserDialogInfo } from "@spt/models/eft/profile/IAkiProfile";
|
import { IUserDialogInfo } from "@spt/models/eft/profile/ISptProfile";
|
||||||
|
|
||||||
// \/ dont forger this annotation here!
|
// \/ dont forger this annotation here!
|
||||||
@injectable()
|
@injectable()
|
||||||
export class CustomAkiCommand implements ISptCommand
|
export class CustomSptCommand implements ISptCommand
|
||||||
{
|
{
|
||||||
constructor(
|
constructor(
|
||||||
@inject("ItemHelper") protected itemHelper: ItemHelper,
|
@inject("ItemHelper") protected itemHelper: ItemHelper,
|
@ -2,13 +2,13 @@ import { DependencyContainer } from "tsyringe";
|
|||||||
|
|
||||||
import { IPostDBLoadMod } from "@spt/models/external/IPostDBLoadMod";
|
import { IPostDBLoadMod } from "@spt/models/external/IPostDBLoadMod";
|
||||||
import { SptCommandoCommands } from "@spt/helpers/Dialogue/Commando/SptCommandoCommands";
|
import { SptCommandoCommands } from "@spt/helpers/Dialogue/Commando/SptCommandoCommands";
|
||||||
import { CustomAkiCommand } from "./CustomAkiCommand";
|
import { CustomSptCommand } from "./CustomSptCommand";
|
||||||
|
|
||||||
class Mod implements IPostDBLoadMod {
|
class Mod implements IPostDBLoadMod {
|
||||||
public postDBLoad(container: DependencyContainer): void {
|
public postDBLoad(container: DependencyContainer): void {
|
||||||
// We register and re-resolve the dependency so the container takes care of filling in the command dependencies
|
// We register and re-resolve the dependency so the container takes care of filling in the command dependencies
|
||||||
container.register<CustomAkiCommand>("CustomAkiCommand", CustomAkiCommand);
|
container.register<CustomSptCommand>("CustomSptCommand", CustomSptCommand);
|
||||||
container.resolve<SptCommandoCommands>("SptCommandoCommands").registerSptCommandoCommand(container.resolve<CustomAkiCommand>("CustomAkiCommand"));
|
container.resolve<SptCommandoCommands>("SptCommandoCommands").registerSptCommandoCommand(container.resolve<CustomSptCommand>("CustomSptCommand"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
0
TypeScript/22CustomAkiCommand/types/Program.d.ts → TypeScript/22CustomSptCommand/types/Program.d.ts
vendored
0
TypeScript/22CustomAkiCommand/types/Program.d.ts → TypeScript/22CustomSptCommand/types/Program.d.ts
vendored
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user