Skip to main content
Deno 2 is finally here 🎉️
Learn more
class GameController
import { GameController } from "https://deno.land/x/sptaki@1.2.0/controllers/mod.ts";

Constructors

new
GameController(
logger: ILogger,
databaseServer: DatabaseServer,
jsonUtil: JsonUtil,
timeUtil: TimeUtil,
hashUtil: HashUtil,
preAkiModLoader: PreAkiModLoader,
httpServerHelper: HttpServerHelper,
randomUtil: RandomUtil,
hideoutHelper: HideoutHelper,
profileHelper: ProfileHelper,
profileFixerService: ProfileFixerService,
localisationService: LocalisationService,
customLocationWaveService: CustomLocationWaveService,
openZoneService: OpenZoneService,
seasonalEventService: SeasonalEventService,
itemBaseClassService: ItemBaseClassService,
giftService: GiftService,
raidTimeAdjustmentService: RaidTimeAdjustmentService,
profileActivityService: ProfileActivityService,
applicationContext: ApplicationContext,
configServer: ConfigServer,
)

Properties

protected
applicationContext: ApplicationContext
protected
botConfig: IBotConfig
protected
configServer: ConfigServer
protected
coreConfig: ICoreConfig
protected
customLocationWaveService: CustomLocationWaveService
protected
databaseServer: DatabaseServer
protected
giftService: GiftService
protected
hashUtil: HashUtil
protected
hideoutConfig: IHideoutConfig
protected
hideoutHelper: HideoutHelper
protected
httpConfig: IHttpConfig
protected
httpServerHelper: HttpServerHelper
protected
itemBaseClassService: ItemBaseClassService
protected
jsonUtil: JsonUtil
protected
localisationService: LocalisationService
protected
locationConfig: ILocationConfig
protected
logger: ILogger
protected
lootConfig: ILootConfig
protected
openZoneService: OpenZoneService
protected
pmcConfig: IPmcConfig
protected
preAkiModLoader: PreAkiModLoader
protected
profileActivityService: ProfileActivityService
protected
profileFixerService: ProfileFixerService
protected
profileHelper: ProfileHelper
protected
ragfairConfig: IRagfairConfig
protected
raidTimeAdjustmentService: RaidTimeAdjustmentService
protected
randomUtil: RandomUtil
protected
seasonalEventService: SeasonalEventService
protected
timeUtil: TimeUtil

Methods

protected
addPlayerToPMCNames(pmcProfile: IPmcData): void

Add the logged in players name to PMC name pool

protected
adjustHideoutBuildTimes(): void
protected
adjustHideoutCraftTimes(): void
protected
adjustLabsRaiderSpawnRate(): void

Make non-trigger-spawned raiders spawn earlier + always

protected
adjustLocationBotValues(): void
protected
adjustMapBotLimits(): void

Apply custom limits on bot types as defined in configs/location.json/botTypeLimits

protected
checkForAndRemoveUndefinedDialogs(fullProfile: IAkiProfile): void

Check for a dialog with the key 'undefined', and remove it

Out of date/incorrectly made trader mods forget this data

protected
fixBrokenOfflineMapWaves(): void

Waves with an identical min/max values spawn nothing, the number of bots that spawn is the difference between min and max

Make Rogues spawn later to allow for scavs to spawn first instead of rogues filling up all spawn positions

protected
fixShotgunDispersions(): void

BSG have two values for shotgun dispersion, we make sure both have the same value

protected
logProfileDetails(fullProfile: IAkiProfile): void
protected
removePraporTestMessage(): void

Blank out the "test" mail message from prapor

protected
saveActiveModsToProfile(fullProfile: IAkiProfile): void

Get a list of installed mods and save their details to the profile being used

protected
sendPraporGiftsToNewProfiles(pmcProfile: IPmcData): void

Send starting gifts to profile after x days

Find and split waves with large numbers of bots into smaller waves - BSG appears to reduce the size of these waves to one bot when they're waiting to spawn for too long

protected
updateProfileHealthValues(pmcProfile: IPmcData): void

When player logs in, iterate over all active effects and reduce timer

Check for any missing assorts inside each traders assort.json data, checking against traders questassort.json

protected
warnOnActiveBotReloadSkill(pmcProfile: IPmcData): void

Players set botReload to a high value and don't expect the crazy fast reload speeds, give them a warn about it

gameStart(
_url: string,
sessionID: string,
startTimeStampMS: number,
): void

Handle client/game/start

Handle client/match/group/current

Handle client/game/config

Handle client/game/keepalive

Handle singleplayer/settings/getRaidTime

getServer(sessionId: string): IServerDetails[]

Handle client/server/list

Handle client/checkVersion

load(): void