Skip to content

Commit

Permalink
Add CustomWeather to dedi request
Browse files Browse the repository at this point in the history
- Also updated types
  • Loading branch information
Lacyway committed Jul 27, 2024
1 parent 5200d00 commit 5f24926
Show file tree
Hide file tree
Showing 73 changed files with 109 additions and 93 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { BotSettings, TimeAndWeatherSettings, WavesSettings } from "@spt-aki/models/eft/match/IRaidSettings";
import { DateTime } from "@spt-aki/models/enums/DateTime";
import { PlayersSpawnPlace } from "@spt-aki/models/enums/PlayersSpawnPlace";
import { SideType } from "@spt-aki/models/enums/SideType";
import { BotSettings, TimeAndWeatherSettings, WavesSettings } from "@spt/models/eft/match/IRaidSettings";
import { DateTime } from "@spt/models/enums/DateTime";
import { PlayersSpawnPlace } from "@spt/models/enums/PlayersSpawnPlace";
import { SideType } from "@spt/models/enums/SideType";

export interface IStartDedicatedRequest {
expectedNumberOfPlayers: number;
Expand All @@ -13,4 +13,5 @@ export interface IStartDedicatedRequest {
botSettings: BotSettings;
wavesSettings: WavesSettings;
side: SideType;
customWeather: boolean;
}
2 changes: 1 addition & 1 deletion types/controllers/BotController.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ import { DatabaseService } from "@spt/services/DatabaseService";
import { LocalisationService } from "@spt/services/LocalisationService";
import { MatchBotDetailsCacheService } from "@spt/services/MatchBotDetailsCacheService";
import { SeasonalEventService } from "@spt/services/SeasonalEventService";
import { ICloner } from "@spt/utils/cloners/ICloner";
import { RandomUtil } from "@spt/utils/RandomUtil";
import { ICloner } from "@spt/utils/cloners/ICloner";
export declare class BotController {
protected logger: ILogger;
protected databaseService: DatabaseService;
Expand Down
2 changes: 1 addition & 1 deletion types/controllers/BuildController.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ import { EventOutputHolder } from "@spt/routers/EventOutputHolder";
import { SaveServer } from "@spt/servers/SaveServer";
import { DatabaseService } from "@spt/services/DatabaseService";
import { LocalisationService } from "@spt/services/LocalisationService";
import { ICloner } from "@spt/utils/cloners/ICloner";
import { HashUtil } from "@spt/utils/HashUtil";
import { ICloner } from "@spt/utils/cloners/ICloner";
export declare class BuildController {
protected logger: ILogger;
protected hashUtil: HashUtil;
Expand Down
2 changes: 1 addition & 1 deletion types/controllers/GameController.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,10 @@ import { ProfileActivityService } from "@spt/services/ProfileActivityService";
import { ProfileFixerService } from "@spt/services/ProfileFixerService";
import { RaidTimeAdjustmentService } from "@spt/services/RaidTimeAdjustmentService";
import { SeasonalEventService } from "@spt/services/SeasonalEventService";
import { ICloner } from "@spt/utils/cloners/ICloner";
import { HashUtil } from "@spt/utils/HashUtil";
import { RandomUtil } from "@spt/utils/RandomUtil";
import { TimeUtil } from "@spt/utils/TimeUtil";
import { ICloner } from "@spt/utils/cloners/ICloner";
export declare class GameController {
protected logger: ILogger;
protected databaseService: DatabaseService;
Expand Down
2 changes: 1 addition & 1 deletion types/controllers/HealthController.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ import { ILogger } from "@spt/models/spt/utils/ILogger";
import { EventOutputHolder } from "@spt/routers/EventOutputHolder";
import { LocalisationService } from "@spt/services/LocalisationService";
import { PaymentService } from "@spt/services/PaymentService";
import { ICloner } from "@spt/utils/cloners/ICloner";
import { HttpResponseUtil } from "@spt/utils/HttpResponseUtil";
import { ICloner } from "@spt/utils/cloners/ICloner";
export declare class HealthController {
protected logger: ILogger;
protected eventOutputHolder: EventOutputHolder;
Expand Down
2 changes: 1 addition & 1 deletion types/controllers/HideoutController.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,11 @@ import { FenceService } from "@spt/services/FenceService";
import { LocalisationService } from "@spt/services/LocalisationService";
import { PlayerService } from "@spt/services/PlayerService";
import { ProfileActivityService } from "@spt/services/ProfileActivityService";
import { ICloner } from "@spt/utils/cloners/ICloner";
import { HashUtil } from "@spt/utils/HashUtil";
import { HttpResponseUtil } from "@spt/utils/HttpResponseUtil";
import { RandomUtil } from "@spt/utils/RandomUtil";
import { TimeUtil } from "@spt/utils/TimeUtil";
import { ICloner } from "@spt/utils/cloners/ICloner";
export declare class HideoutController {
protected logger: ILogger;
protected hashUtil: HashUtil;
Expand Down
2 changes: 1 addition & 1 deletion types/controllers/InraidController.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import { ISaveProgressRequestData } from "@spt/models/eft/inRaid/ISaveProgressRe
import { PlayerRaidEndState } from "@spt/models/enums/PlayerRaidEndState";
import { IAirdropConfig } from "@spt/models/spt/config/IAirdropConfig";
import { IBTRConfig } from "@spt/models/spt/config/IBTRConfig";
import { IBotConfig } from "@spt/models/spt/config/IBotConfig";
import { IHideoutConfig } from "@spt/models/spt/config/IHideoutConfig";
import { IInRaidConfig } from "@spt/models/spt/config/IInRaidConfig";
import { ILocationConfig } from "@spt/models/spt/config/ILocationConfig";
Expand All @@ -31,7 +32,6 @@ import { PmcChatResponseService } from "@spt/services/PmcChatResponseService";
import { TraderServicesService } from "@spt/services/TraderServicesService";
import { RandomUtil } from "@spt/utils/RandomUtil";
import { TimeUtil } from "@spt/utils/TimeUtil";
import { IBotConfig } from "@spt/models/spt/config/IBotConfig";
/**
* Logic for handling In Raid callbacks
*/
Expand Down
2 changes: 1 addition & 1 deletion types/controllers/InsuranceController.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,11 @@ import { LocalisationService } from "@spt/services/LocalisationService";
import { MailSendService } from "@spt/services/MailSendService";
import { PaymentService } from "@spt/services/PaymentService";
import { RagfairPriceService } from "@spt/services/RagfairPriceService";
import { ICloner } from "@spt/utils/cloners/ICloner";
import { HashUtil } from "@spt/utils/HashUtil";
import { MathUtil } from "@spt/utils/MathUtil";
import { RandomUtil } from "@spt/utils/RandomUtil";
import { TimeUtil } from "@spt/utils/TimeUtil";
import { ICloner } from "@spt/utils/cloners/ICloner";
export declare class InsuranceController {
protected logger: ILogger;
protected randomUtil: RandomUtil;
Expand Down
2 changes: 1 addition & 1 deletion types/controllers/InventoryController.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,10 @@ import { LocalisationService } from "@spt/services/LocalisationService";
import { MapMarkerService } from "@spt/services/MapMarkerService";
import { PlayerService } from "@spt/services/PlayerService";
import { RagfairOfferService } from "@spt/services/RagfairOfferService";
import { ICloner } from "@spt/utils/cloners/ICloner";
import { HashUtil } from "@spt/utils/HashUtil";
import { HttpResponseUtil } from "@spt/utils/HttpResponseUtil";
import { RandomUtil } from "@spt/utils/RandomUtil";
import { ICloner } from "@spt/utils/cloners/ICloner";
export declare class InventoryController {
protected logger: ILogger;
protected hashUtil: HashUtil;
Expand Down
2 changes: 1 addition & 1 deletion types/controllers/LocationController.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@ import { DatabaseService } from "@spt/services/DatabaseService";
import { ItemFilterService } from "@spt/services/ItemFilterService";
import { LocalisationService } from "@spt/services/LocalisationService";
import { RaidTimeAdjustmentService } from "@spt/services/RaidTimeAdjustmentService";
import { ICloner } from "@spt/utils/cloners/ICloner";
import { HashUtil } from "@spt/utils/HashUtil";
import { RandomUtil } from "@spt/utils/RandomUtil";
import { TimeUtil } from "@spt/utils/TimeUtil";
import { ICloner } from "@spt/utils/cloners/ICloner";
export declare class LocationController {
protected hashUtil: HashUtil;
protected randomUtil: RandomUtil;
Expand Down
2 changes: 1 addition & 1 deletion types/controllers/ProfileController.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,9 @@ import { LocalisationService } from "@spt/services/LocalisationService";
import { MailSendService } from "@spt/services/MailSendService";
import { ProfileFixerService } from "@spt/services/ProfileFixerService";
import { SeasonalEventService } from "@spt/services/SeasonalEventService";
import { ICloner } from "@spt/utils/cloners/ICloner";
import { HashUtil } from "@spt/utils/HashUtil";
import { TimeUtil } from "@spt/utils/TimeUtil";
import { ICloner } from "@spt/utils/cloners/ICloner";
export declare class ProfileController {
protected logger: ILogger;
protected hashUtil: HashUtil;
Expand Down
2 changes: 1 addition & 1 deletion types/controllers/QuestController.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@ import { LocaleService } from "@spt/services/LocaleService";
import { LocalisationService } from "@spt/services/LocalisationService";
import { MailSendService } from "@spt/services/MailSendService";
import { PlayerService } from "@spt/services/PlayerService";
import { ICloner } from "@spt/utils/cloners/ICloner";
import { HttpResponseUtil } from "@spt/utils/HttpResponseUtil";
import { TimeUtil } from "@spt/utils/TimeUtil";
import { ICloner } from "@spt/utils/cloners/ICloner";
export declare class QuestController {
protected logger: ILogger;
protected timeUtil: TimeUtil;
Expand Down
2 changes: 1 addition & 1 deletion types/controllers/RepeatableQuestController.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,11 @@ import { DatabaseService } from "@spt/services/DatabaseService";
import { LocalisationService } from "@spt/services/LocalisationService";
import { PaymentService } from "@spt/services/PaymentService";
import { ProfileFixerService } from "@spt/services/ProfileFixerService";
import { ICloner } from "@spt/utils/cloners/ICloner";
import { HttpResponseUtil } from "@spt/utils/HttpResponseUtil";
import { ObjectId } from "@spt/utils/ObjectId";
import { RandomUtil } from "@spt/utils/RandomUtil";
import { TimeUtil } from "@spt/utils/TimeUtil";
import { ICloner } from "@spt/utils/cloners/ICloner";
export declare class RepeatableQuestController {
protected logger: ILogger;
protected databaseService: DatabaseService;
Expand Down
13 changes: 11 additions & 2 deletions types/controllers/TradeController.d.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { ItemHelper } from "@spt/helpers/ItemHelper";
import { ProfileHelper } from "@spt/helpers/ProfileHelper";
import { RagfairOfferHelper } from "@spt/helpers/RagfairOfferHelper";
import { TradeHelper } from "@spt/helpers/TradeHelper";
import { TraderHelper } from "@spt/helpers/TraderHelper";
import { IPmcData } from "@spt/models/eft/common/IPmcData";
Expand Down Expand Up @@ -35,6 +36,7 @@ export declare class TradeController {
protected hashUtil: HashUtil;
protected itemHelper: ItemHelper;
protected profileHelper: ProfileHelper;
protected ragfairOfferHelper: RagfairOfferHelper;
protected traderHelper: TraderHelper;
protected ragfairServer: RagfairServer;
protected httpResponse: HttpResponseUtil;
Expand All @@ -44,7 +46,7 @@ export declare class TradeController {
protected configServer: ConfigServer;
protected ragfairConfig: IRagfairConfig;
protected traderConfig: ITraderConfig;
constructor(logger: ILogger, databaseService: DatabaseService, eventOutputHolder: EventOutputHolder, tradeHelper: TradeHelper, timeUtil: TimeUtil, randomUtil: RandomUtil, hashUtil: HashUtil, itemHelper: ItemHelper, profileHelper: ProfileHelper, traderHelper: TraderHelper, ragfairServer: RagfairServer, httpResponse: HttpResponseUtil, localisationService: LocalisationService, ragfairPriceService: RagfairPriceService, mailSendService: MailSendService, configServer: ConfigServer);
constructor(logger: ILogger, databaseService: DatabaseService, eventOutputHolder: EventOutputHolder, tradeHelper: TradeHelper, timeUtil: TimeUtil, randomUtil: RandomUtil, hashUtil: HashUtil, itemHelper: ItemHelper, profileHelper: ProfileHelper, ragfairOfferHelper: RagfairOfferHelper, traderHelper: TraderHelper, ragfairServer: RagfairServer, httpResponse: HttpResponseUtil, localisationService: LocalisationService, ragfairPriceService: RagfairPriceService, mailSendService: MailSendService, configServer: ConfigServer);
/** Handle TradingConfirm event */
confirmTrading(pmcData: IPmcData, request: IProcessBaseTradeRequestData, sessionID: string): IItemEventRouterResponse;
/** Handle RagFairBuyOffer event */
Expand All @@ -67,10 +69,17 @@ export declare class TradeController {
* @param output Output to send back to client
*/
protected buyPmcItemFromRagfair(sessionId: string, pmcData: IPmcData, fleaOffer: IRagfairOffer, requestOffer: IOfferRequest, output: IItemEventRouterResponse): void;
/**
* Is the provided offerid and ownerid from a player made offer
* @param offerId Id of the offer
* @param offerOwnerId Owner id
* @returns true if offer was made by a player
*/
protected isPlayerOffer(offerId: string, offerOwnerId: string): boolean;
/**
* Does Player have necessary trader loyalty to purchase flea offer
* @param sellerIsTrader is seller trader
* @param fleaOffer FLea offer being bought
* @param fleaOffer Flea offer being bought
* @param pmcData Player profile
* @returns True if player can buy offer
*/
Expand Down
2 changes: 1 addition & 1 deletion types/controllers/TraderController.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ import { DatabaseService } from "@spt/services/DatabaseService";
import { FenceService } from "@spt/services/FenceService";
import { TraderAssortService } from "@spt/services/TraderAssortService";
import { TraderPurchasePersisterService } from "@spt/services/TraderPurchasePersisterService";
import { ICloner } from "@spt/utils/cloners/ICloner";
import { TimeUtil } from "@spt/utils/TimeUtil";
import { ICloner } from "@spt/utils/cloners/ICloner";
export declare class TraderController {
protected logger: ILogger;
protected timeUtil: TimeUtil;
Expand Down
4 changes: 2 additions & 2 deletions types/generators/BotEquipmentModGenerator.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@ import { BotWeaponModLimitService } from "@spt/services/BotWeaponModLimitService
import { DatabaseService } from "@spt/services/DatabaseService";
import { ItemFilterService } from "@spt/services/ItemFilterService";
import { LocalisationService } from "@spt/services/LocalisationService";
import { ICloner } from "@spt/utils/cloners/ICloner";
import { HashUtil } from "@spt/utils/HashUtil";
import { RandomUtil } from "@spt/utils/RandomUtil";
import { ICloner } from "@spt/utils/cloners/ICloner";
export declare class BotEquipmentModGenerator {
protected logger: ILogger;
protected hashUtil: HashUtil;
Expand Down Expand Up @@ -65,7 +65,7 @@ export declare class BotEquipmentModGenerator {
* @param settings Bot equipment generation settings
* @param modSlot Armor slot being filtered
* @param existingPlateTplPool Plates tpls to choose from
* @param armorItem
* @param armorItem The armor items db template
* @returns Array of plate tpls to choose from
*/
protected filterPlateModsForSlotByLevel(settings: IGenerateEquipmentProperties, modSlot: string, existingPlateTplPool: string[], armorItem: ITemplateItem): IFilterPlateModsForSlotByLevelResult;
Expand Down
2 changes: 1 addition & 1 deletion types/generators/BotGenerator.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@ import { DatabaseService } from "@spt/services/DatabaseService";
import { ItemFilterService } from "@spt/services/ItemFilterService";
import { LocalisationService } from "@spt/services/LocalisationService";
import { SeasonalEventService } from "@spt/services/SeasonalEventService";
import { ICloner } from "@spt/utils/cloners/ICloner";
import { HashUtil } from "@spt/utils/HashUtil";
import { RandomUtil } from "@spt/utils/RandomUtil";
import { TimeUtil } from "@spt/utils/TimeUtil";
import { ICloner } from "@spt/utils/cloners/ICloner";
export declare class BotGenerator {
protected logger: ILogger;
protected hashUtil: HashUtil;
Expand Down
5 changes: 4 additions & 1 deletion types/generators/BotLevelGenerator.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,14 @@ import { IBotBase } from "@spt/models/eft/common/tables/IBotBase";
import { BotGenerationDetails } from "@spt/models/spt/bots/BotGenerationDetails";
import { ILogger } from "@spt/models/spt/utils/ILogger";
import { DatabaseService } from "@spt/services/DatabaseService";
import { MathUtil } from "@spt/utils/MathUtil";
import { RandomUtil } from "@spt/utils/RandomUtil";
export declare class BotLevelGenerator {
protected logger: ILogger;
protected randomUtil: RandomUtil;
protected databaseService: DatabaseService;
constructor(logger: ILogger, randomUtil: RandomUtil, databaseService: DatabaseService);
protected mathUtil: MathUtil;
constructor(logger: ILogger, randomUtil: RandomUtil, databaseService: DatabaseService, mathUtil: MathUtil);
/**
* Return a randomised bot level and exp value
* @param levelDetails Min and max of level for bot
Expand All @@ -18,6 +20,7 @@ export declare class BotLevelGenerator {
* @returns IRandomisedBotLevelResult object
*/
generateBotLevel(levelDetails: MinMax, botGenerationDetails: BotGenerationDetails, bot: IBotBase): IRandomisedBotLevelResult;
protected chooseBotLevel(min: number, max: number, shift: number, number: number): number;
/**
* Get the highest level a bot can be relative to the players level, but no further than the max size from globals.exp_table
* @param botGenerationDetails Details to help generate a bot
Expand Down
2 changes: 1 addition & 1 deletion types/generators/BotLootGenerator.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ import { ConfigServer } from "@spt/servers/ConfigServer";
import { BotLootCacheService } from "@spt/services/BotLootCacheService";
import { DatabaseService } from "@spt/services/DatabaseService";
import { LocalisationService } from "@spt/services/LocalisationService";
import { ICloner } from "@spt/utils/cloners/ICloner";
import { HashUtil } from "@spt/utils/HashUtil";
import { RandomUtil } from "@spt/utils/RandomUtil";
import { ICloner } from "@spt/utils/cloners/ICloner";
export declare class BotLootGenerator {
protected logger: ILogger;
protected hashUtil: HashUtil;
Expand Down
2 changes: 1 addition & 1 deletion types/generators/BotWeaponGenerator.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ import { BotWeaponModLimitService } from "@spt/services/BotWeaponModLimitService
import { DatabaseService } from "@spt/services/DatabaseService";
import { LocalisationService } from "@spt/services/LocalisationService";
import { RepairService } from "@spt/services/RepairService";
import { ICloner } from "@spt/utils/cloners/ICloner";
import { HashUtil } from "@spt/utils/HashUtil";
import { RandomUtil } from "@spt/utils/RandomUtil";
import { ICloner } from "@spt/utils/cloners/ICloner";
export declare class BotWeaponGenerator {
protected logger: ILogger;
protected hashUtil: HashUtil;
Expand Down
2 changes: 1 addition & 1 deletion types/generators/LocationGenerator.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ import { DatabaseService } from "@spt/services/DatabaseService";
import { ItemFilterService } from "@spt/services/ItemFilterService";
import { LocalisationService } from "@spt/services/LocalisationService";
import { SeasonalEventService } from "@spt/services/SeasonalEventService";
import { ICloner } from "@spt/utils/cloners/ICloner";
import { MathUtil } from "@spt/utils/MathUtil";
import { ObjectId } from "@spt/utils/ObjectId";
import { ProbabilityObjectArray, RandomUtil } from "@spt/utils/RandomUtil";
import { ICloner } from "@spt/utils/cloners/ICloner";
export interface IContainerItem {
items: Item[];
width: number;
Expand Down
2 changes: 1 addition & 1 deletion types/generators/PlayerScavGenerator.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ import { BotLootCacheService } from "@spt/services/BotLootCacheService";
import { DatabaseService } from "@spt/services/DatabaseService";
import { FenceService } from "@spt/services/FenceService";
import { LocalisationService } from "@spt/services/LocalisationService";
import { ICloner } from "@spt/utils/cloners/ICloner";
import { HashUtil } from "@spt/utils/HashUtil";
import { RandomUtil } from "@spt/utils/RandomUtil";
import { ICloner } from "@spt/utils/cloners/ICloner";
export declare class PlayerScavGenerator {
protected logger: ILogger;
protected randomUtil: RandomUtil;
Expand Down
2 changes: 1 addition & 1 deletion types/generators/RagfairOfferGenerator.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@ import { FenceService } from "@spt/services/FenceService";
import { LocalisationService } from "@spt/services/LocalisationService";
import { RagfairOfferService } from "@spt/services/RagfairOfferService";
import { RagfairPriceService } from "@spt/services/RagfairPriceService";
import { ICloner } from "@spt/utils/cloners/ICloner";
import { HashUtil } from "@spt/utils/HashUtil";
import { RandomUtil } from "@spt/utils/RandomUtil";
import { TimeUtil } from "@spt/utils/TimeUtil";
import { ICloner } from "@spt/utils/cloners/ICloner";
export declare class RagfairOfferGenerator {
protected logger: ILogger;
protected hashUtil: HashUtil;
Expand Down
2 changes: 1 addition & 1 deletion types/generators/RepeatableQuestGenerator.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ import { ILogger } from "@spt/models/spt/utils/ILogger";
import { ConfigServer } from "@spt/servers/ConfigServer";
import { DatabaseService } from "@spt/services/DatabaseService";
import { LocalisationService } from "@spt/services/LocalisationService";
import { ICloner } from "@spt/utils/cloners/ICloner";
import { MathUtil } from "@spt/utils/MathUtil";
import { ObjectId } from "@spt/utils/ObjectId";
import { ProbabilityObjectArray, RandomUtil } from "@spt/utils/RandomUtil";
import { ICloner } from "@spt/utils/cloners/ICloner";
export declare class RepeatableQuestGenerator {
protected logger: ILogger;
protected randomUtil: RandomUtil;
Expand Down
Loading

0 comments on commit 5f24926

Please sign in to comment.