diff --git a/ExampleMods/ExampleMods.csproj b/ExampleMods/ExampleMods.csproj
index 807c933a..d2c59028 100644
--- a/ExampleMods/ExampleMods.csproj
+++ b/ExampleMods/ExampleMods.csproj
@@ -1,29 +1,29 @@
-
- Exe
- net9.0
- enable
- enable
- Library
-
+
+ Exe
+ net9.0
+ enable
+ enable
+ Library
+
-
-
- false
- false
- false
-
-
- false
- false
- false
-
-
- false
- false
- false
-
-
+
+
+ false
+ false
+ false
+
+
+ false
+ false
+ false
+
+
+ false
+ false
+ false
+
+
diff --git a/ExampleMods/Mods/EditConfigs.cs b/ExampleMods/Mods/EditConfigs.cs
index df52229b..6464daab 100644
--- a/ExampleMods/Mods/EditConfigs.cs
+++ b/ExampleMods/Mods/EditConfigs.cs
@@ -1,25 +1,25 @@
-using SptCommon.Annotations;
using Core.Models.Enums;
using Core.Models.External;
using Core.Models.Spt.Config;
using Core.Models.Utils;
using Core.Servers;
+using SptCommon.Annotations;
namespace ExampleMods.Mods;
[Injectable]
public class EditConfigs : IPostDBLoadMod
{
- private readonly ConfigServer _configServer;
- private readonly BotConfig _botConfig;
- private readonly HideoutConfig _hideoutConfig;
- private readonly WeatherConfig _weatherConfig;
private readonly AirdropConfig _airdropConfig;
- private readonly PmcChatResponse _pmcChatResponseConfig;
- private readonly QuestConfig _questConfig;
- private readonly PmcConfig _pmcConfig;
+ private readonly BotConfig _botConfig;
+ private readonly ConfigServer _configServer;
+ private readonly HideoutConfig _hideoutConfig;
private readonly ISptLogger _logger;
+ private readonly PmcChatResponse _pmcChatResponseConfig;
+ private readonly PmcConfig _pmcConfig;
+ private readonly QuestConfig _questConfig;
+ private readonly WeatherConfig _weatherConfig;
// We access configs via ConfigServer
public EditConfigs(
@@ -39,7 +39,7 @@ public class EditConfigs : IPostDBLoadMod
_questConfig = _configServer.GetConfig();
_pmcConfig = _configServer.GetConfig();
}
-
+
public void PostDBLoad()
{
// Let's edit the weather config to make the season winter
@@ -76,7 +76,7 @@ public class EditConfigs : IPostDBLoadMod
var assaultConversionSettings = factory4DayConversionSettings["assault"];
assaultConversionSettings.Min = 100;
assaultConversionSettings.Max = 100;
-
+
_logger.Success("Finished Editing Configs");
}
}
diff --git a/ExampleMods/Mods/EditDatabaseValues.cs b/ExampleMods/Mods/EditDatabaseValues.cs
index 40a6a732..6d6832a4 100644
--- a/ExampleMods/Mods/EditDatabaseValues.cs
+++ b/ExampleMods/Mods/EditDatabaseValues.cs
@@ -1,9 +1,8 @@
-using SptCommon.Annotations;
-using Core.Models.Eft.Hideout;
using Core.Models.Enums;
using Core.Models.External;
using Core.Models.Utils;
using Core.Services;
+using SptCommon.Annotations;
namespace ExampleMods.Mods;
@@ -12,7 +11,7 @@ public class EditDatabaseValues : IPostDBLoadMod
{
private readonly DatabaseService _databaseService;
private readonly ISptLogger _logger;
-
+
public EditDatabaseValues(
DatabaseService databaseService,
ISptLogger logger
@@ -41,7 +40,7 @@ public class EditDatabaseValues : IPostDBLoadMod
// Lets edit Customs
EditCustoms();
-
+
_logger.Success("Finished Editing Database");
}
@@ -64,7 +63,10 @@ public class EditDatabaseValues : IPostDBLoadMod
// The max is stored in a list, different flea ratings give different offer amounts
// We loop over all the settings, setting all of them to be 20
- foreach (var offerCountSettings in ragfairSettings.MaxActiveOfferCount) offerCountSettings.Count = 20;
+ foreach (var offerCountSettings in ragfairSettings.MaxActiveOfferCount)
+ {
+ offerCountSettings.Count = 20;
+ }
}
private void EditBtr()
diff --git a/ExampleMods/Mods/Logging.cs b/ExampleMods/Mods/Logging.cs
index 4875d277..d0abdf80 100644
--- a/ExampleMods/Mods/Logging.cs
+++ b/ExampleMods/Mods/Logging.cs
@@ -1,12 +1,7 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
using Core.Models.External;
-using SptCommon.Annotations;
using Core.Models.Logging;
using Core.Models.Utils;
+using SptCommon.Annotations;
namespace ExampleMods.Mods;
@@ -23,7 +18,7 @@ public class Logging : IPostSptLoadMod
// Save the logger we're injecting into a private variable that is scoped to this class (only this class has access to it)
_logger = logger;
}
-
+
public void PostSptLoad()
{
// We can access the logger to assigned in the constructor here
diff --git a/ExampleMods/Mods/WatermarkOverride.cs b/ExampleMods/Mods/WatermarkOverride.cs
index 05c8a7df..afafb8bc 100644
--- a/ExampleMods/Mods/WatermarkOverride.cs
+++ b/ExampleMods/Mods/WatermarkOverride.cs
@@ -1,8 +1,8 @@
-using SptCommon.Annotations;
using Core.Models.Utils;
using Core.Servers;
using Core.Services;
using Core.Utils;
+using SptCommon.Annotations;
namespace ExampleMods.Mods.Override;
diff --git a/Libraries/Core/Callbacks/AchievementCallbacks.cs b/Libraries/Core/Callbacks/AchievementCallbacks.cs
index e03226dd..572c9c94 100644
--- a/Libraries/Core/Callbacks/AchievementCallbacks.cs
+++ b/Libraries/Core/Callbacks/AchievementCallbacks.cs
@@ -1,7 +1,7 @@
-using SptCommon.Annotations;
-using Core.Controllers;
+using Core.Controllers;
using Core.Models.Eft.Common;
using Core.Utils;
+using SptCommon.Annotations;
namespace Core.Callbacks;
@@ -12,7 +12,7 @@ public class AchievementCallbacks(
)
{
///
- /// Handle client/achievement/list
+ /// Handle client/achievement/list
///
///
///
@@ -24,7 +24,7 @@ public class AchievementCallbacks(
}
///
- /// Handle client/achievement/statistic
+ /// Handle client/achievement/statistic
///
///
///
diff --git a/Libraries/Core/Callbacks/BotCallbacks.cs b/Libraries/Core/Callbacks/BotCallbacks.cs
index d4e13670..8d605c29 100644
--- a/Libraries/Core/Callbacks/BotCallbacks.cs
+++ b/Libraries/Core/Callbacks/BotCallbacks.cs
@@ -16,8 +16,8 @@ public class BotCallbacks(
)
{
///
- /// Handle singleplayer/settings/bot/limit
- /// Is called by client to define each bot roles wave limit
+ /// Handle singleplayer/settings/bot/limit
+ /// Is called by client to define each bot roles wave limit
///
///
///
@@ -31,7 +31,7 @@ public class BotCallbacks(
}
///
- /// Handle singleplayer/settings/bot/difficulty
+ /// Handle singleplayer/settings/bot/difficulty
///
///
///
@@ -43,7 +43,9 @@ public class BotCallbacks(
var type = splitUrl[^2].ToLower();
var difficulty = splitUrl[^1];
if (difficulty == "core")
+ {
return _httpResponseUtil.NoBody(_botController.GetBotCoreDifficulty());
+ }
var raidConfig = _applicationContext.GetLatestValue(ContextVariableType.RAID_CONFIGURATION)
?.GetValue();
@@ -52,7 +54,7 @@ public class BotCallbacks(
}
///
- /// Handle singleplayer/settings/bot/difficulties
+ /// Handle singleplayer/settings/bot/difficulties
///
///
///
@@ -64,7 +66,7 @@ public class BotCallbacks(
}
///
- /// Handle client/game/bot/generate
+ /// Handle client/game/bot/generate
///
///
///
@@ -76,7 +78,7 @@ public class BotCallbacks(
}
///
- /// Handle singleplayer/settings/bot/maxCap
+ /// Handle singleplayer/settings/bot/maxCap
///
///
public string GetBotCap(string url, EmptyRequestData info, string sessionID)
@@ -87,7 +89,7 @@ public class BotCallbacks(
}
///
- /// Handle singleplayer/settings/bot/getBotBehaviours
+ /// Handle singleplayer/settings/bot/getBotBehaviours
///
///
public string GetBotBehaviours()
diff --git a/Libraries/Core/Callbacks/BuildsCallbacks.cs b/Libraries/Core/Callbacks/BuildsCallbacks.cs
index cfd8f64e..379d8629 100644
--- a/Libraries/Core/Callbacks/BuildsCallbacks.cs
+++ b/Libraries/Core/Callbacks/BuildsCallbacks.cs
@@ -1,9 +1,9 @@
-using SptCommon.Annotations;
-using Core.Controllers;
+using Core.Controllers;
using Core.Models.Eft.Builds;
using Core.Models.Eft.Common;
using Core.Models.Eft.PresetBuild;
using Core.Utils;
+using SptCommon.Annotations;
namespace Core.Callbacks;
@@ -14,7 +14,7 @@ public class BuildsCallbacks(
)
{
///
- /// Handle client/builds/list
+ /// Handle client/builds/list
///
///
///
@@ -26,7 +26,7 @@ public class BuildsCallbacks(
}
///
- /// Handle client/builds/magazine/save
+ /// Handle client/builds/magazine/save
///
///
///
@@ -39,7 +39,7 @@ public class BuildsCallbacks(
}
///
- /// Handle client/builds/weapon/save
+ /// Handle client/builds/weapon/save
///
///
///
@@ -52,7 +52,7 @@ public class BuildsCallbacks(
}
///
- /// Handle client/builds/equipment/save
+ /// Handle client/builds/equipment/save
///
///
///
@@ -65,7 +65,7 @@ public class BuildsCallbacks(
}
///
- /// Handle client/builds/delete
+ /// Handle client/builds/delete
///
///
///
diff --git a/Libraries/Core/Callbacks/BundleCallbacks.cs b/Libraries/Core/Callbacks/BundleCallbacks.cs
index fa0b4549..2affebda 100644
--- a/Libraries/Core/Callbacks/BundleCallbacks.cs
+++ b/Libraries/Core/Callbacks/BundleCallbacks.cs
@@ -1,6 +1,6 @@
-using SptCommon.Annotations;
-using Core.Models.Eft.Common;
+using Core.Models.Eft.Common;
using Core.Utils;
+using SptCommon.Annotations;
namespace Core.Callbacks;
@@ -11,7 +11,7 @@ public class BundleCallbacks(
)
{
///
- /// Handle singleplayer/bundles
+ /// Handle singleplayer/bundles
///
///
///
diff --git a/Libraries/Core/Callbacks/ClientLogCallbacks.cs b/Libraries/Core/Callbacks/ClientLogCallbacks.cs
index 32310496..9086fc4f 100644
--- a/Libraries/Core/Callbacks/ClientLogCallbacks.cs
+++ b/Libraries/Core/Callbacks/ClientLogCallbacks.cs
@@ -1,11 +1,11 @@
-using SptCommon.Annotations;
-using Core.Controllers;
+using Core.Controllers;
using Core.Models.Spt.Config;
using Core.Models.Spt.Logging;
using Core.Servers;
using Core.Services;
using Core.Utils;
using Server;
+using SptCommon.Annotations;
namespace Core.Callbacks;
@@ -19,7 +19,7 @@ public class ClientLogCallbacks(
)
{
///
- /// Handle /singleplayer/log
+ /// Handle /singleplayer/log
///
///
///
@@ -32,7 +32,7 @@ public class ClientLogCallbacks(
}
///
- /// Handle /singleplayer/release
+ /// Handle /singleplayer/release
///
///
public string ReleaseNotes()
@@ -59,7 +59,7 @@ public class ClientLogCallbacks(
}
///
- /// Handle /singleplayer/enableBSGlogging
+ /// Handle /singleplayer/enableBSGlogging
///
///
public string BsgLogging()
diff --git a/Libraries/Core/Callbacks/CustomizationCallbacks.cs b/Libraries/Core/Callbacks/CustomizationCallbacks.cs
index e64ee31e..f45942e0 100644
--- a/Libraries/Core/Callbacks/CustomizationCallbacks.cs
+++ b/Libraries/Core/Callbacks/CustomizationCallbacks.cs
@@ -1,10 +1,10 @@
-using SptCommon.Annotations;
using Core.Controllers;
using Core.Models.Eft.Common;
using Core.Models.Eft.Customization;
using Core.Models.Eft.ItemEvent;
using Core.Servers;
using Core.Utils;
+using SptCommon.Annotations;
namespace Core.Callbacks;
@@ -16,7 +16,7 @@ public class CustomizationCallbacks(
)
{
///
- /// Handle client/trading/customization/storage
+ /// Handle client/trading/customization/storage
///
///
///
@@ -28,7 +28,7 @@ public class CustomizationCallbacks(
}
///
- /// Handle client/trading/customization
+ /// Handle client/trading/customization
///
///
///
@@ -43,7 +43,7 @@ public class CustomizationCallbacks(
}
///
- /// Handle CustomizationBuy event
+ /// Handle CustomizationBuy event
///
///
///
@@ -55,7 +55,7 @@ public class CustomizationCallbacks(
}
///
- /// Handle client/hideout/customization/offer/list
+ /// Handle client/hideout/customization/offer/list
///
///
///
@@ -67,7 +67,7 @@ public class CustomizationCallbacks(
}
///
- /// Handle client/customization/storage
+ /// Handle client/customization/storage
///
///
///
@@ -79,7 +79,7 @@ public class CustomizationCallbacks(
}
///
- /// Handle CustomizationSet
+ /// Handle CustomizationSet
///
///
///
diff --git a/Libraries/Core/Callbacks/DataCallbacks.cs b/Libraries/Core/Callbacks/DataCallbacks.cs
index 9426e8f6..388bb347 100644
--- a/Libraries/Core/Callbacks/DataCallbacks.cs
+++ b/Libraries/Core/Callbacks/DataCallbacks.cs
@@ -1,8 +1,8 @@
-using SptCommon.Annotations;
using Core.Controllers;
using Core.Models.Eft.Common;
using Core.Services;
using Core.Utils;
+using SptCommon.Annotations;
namespace Core.Callbacks;
@@ -15,7 +15,7 @@ public class DataCallbacks(
)
{
///
- /// Handle client/settings
+ /// Handle client/settings
///
///
///
@@ -28,7 +28,7 @@ public class DataCallbacks(
}
///
- /// Handle client/globals
+ /// Handle client/globals
///
///
///
@@ -43,7 +43,7 @@ public class DataCallbacks(
}
///
- /// Handle client/items
+ /// Handle client/items
///
///
///
@@ -55,7 +55,7 @@ public class DataCallbacks(
}
///
- /// Handle client/handbook/templates
+ /// Handle client/handbook/templates
///
///
///
@@ -67,7 +67,7 @@ public class DataCallbacks(
}
///
- /// Handle client/customization
+ /// Handle client/customization
///
///
///
@@ -79,7 +79,7 @@ public class DataCallbacks(
}
///
- /// Handle client/account/customization
+ /// Handle client/account/customization
///
///
///
@@ -91,7 +91,7 @@ public class DataCallbacks(
}
///
- /// Handle client/hideout/settings
+ /// Handle client/hideout/settings
///
///
///
@@ -103,7 +103,7 @@ public class DataCallbacks(
}
///
- /// Handle client/hideout/areas
+ /// Handle client/hideout/areas
///
///
///
@@ -115,7 +115,7 @@ public class DataCallbacks(
}
///
- /// Handle client/hideout/production/recipes
+ /// Handle client/hideout/production/recipes
///
///
///
@@ -127,7 +127,7 @@ public class DataCallbacks(
}
///
- /// Handle client/languages
+ /// Handle client/languages
///
///
///
@@ -139,7 +139,7 @@ public class DataCallbacks(
}
///
- /// Handle client/menu/locale
+ /// Handle client/menu/locale
///
///
///
@@ -151,13 +151,16 @@ public class DataCallbacks(
var locales = _databaseService.GetLocales();
var result = locales.Menu?[localeId] ?? locales.Menu?.FirstOrDefault(m => m.Key == "en").Value;
- if (result == null) throw new Exception($"Unable to determine locale for request with {localeId}");
+ if (result == null)
+ {
+ throw new Exception($"Unable to determine locale for request with {localeId}");
+ }
return _httpResponseUtil.GetBody(result);
}
///
- /// Handle client/locale
+ /// Handle client/locale
///
///
///
@@ -173,7 +176,7 @@ public class DataCallbacks(
}
///
- /// Handle client/hideout/qte/list
+ /// Handle client/hideout/qte/list
///
///
///
@@ -185,7 +188,7 @@ public class DataCallbacks(
}
///
- /// Handle client/items/prices/
+ /// Handle client/items/prices/
///
///
///
diff --git a/Libraries/Core/Callbacks/DialogueCallbacks.cs b/Libraries/Core/Callbacks/DialogueCallbacks.cs
index 95476264..e5394838 100644
--- a/Libraries/Core/Callbacks/DialogueCallbacks.cs
+++ b/Libraries/Core/Callbacks/DialogueCallbacks.cs
@@ -1,10 +1,10 @@
-using SptCommon.Annotations;
using Core.Controllers;
using Core.DI;
using Core.Models.Eft.Common;
using Core.Models.Eft.Common.Request;
using Core.Models.Eft.Dialog;
using Core.Utils;
+using SptCommon.Annotations;
namespace Core.Callbacks;
@@ -18,8 +18,19 @@ public class DialogueCallbacks(
)
: OnUpdate
{
+ public bool OnUpdate(long timeSinceLastRun)
+ {
+ _dialogueController.Update();
+ return true;
+ }
+
+ public string GetRoute()
+ {
+ return "spt-dialogue";
+ }
+
///
- /// Handle client/friend/list
+ /// Handle client/friend/list
///
///
///
@@ -31,7 +42,7 @@ public class DialogueCallbacks(
}
///
- /// Handle client/chatServer/list
+ /// Handle client/chatServer/list
///
///
///
@@ -51,7 +62,14 @@ public class DialogueCallbacks(
VersionId = "bgkidft87ddd",
Ip = "",
Port = 0,
- Chats = [new Chat { Id = "0", Members = 0 }]
+ Chats =
+ [
+ new Chat
+ {
+ Id = "0",
+ Members = 0
+ }
+ ]
}
};
@@ -59,7 +77,7 @@ public class DialogueCallbacks(
}
///
- /// Handle client/mail/dialog/list
+ /// Handle client/mail/dialog/list
///
///
///
@@ -71,7 +89,7 @@ public class DialogueCallbacks(
}
///
- /// Handle client/mail/dialog/view
+ /// Handle client/mail/dialog/view
///
///
///
@@ -83,7 +101,7 @@ public class DialogueCallbacks(
}
///
- /// Handle client/mail/dialog/info
+ /// Handle client/mail/dialog/info
///
///
///
@@ -95,7 +113,7 @@ public class DialogueCallbacks(
}
///
- /// Handle client/mail/dialog/remove
+ /// Handle client/mail/dialog/remove
///
///
///
@@ -108,7 +126,7 @@ public class DialogueCallbacks(
}
///
- /// Handle client/mail/dialog/pin
+ /// Handle client/mail/dialog/pin
///
///
///
@@ -121,7 +139,7 @@ public class DialogueCallbacks(
}
///
- /// Handle client/mail/dialog/unpin
+ /// Handle client/mail/dialog/unpin
///
///
///
@@ -134,7 +152,7 @@ public class DialogueCallbacks(
}
///
- /// Handle client/mail/dialog/read
+ /// Handle client/mail/dialog/read
///
///
///
@@ -147,7 +165,7 @@ public class DialogueCallbacks(
}
///
- /// Handle client/mail/dialog/getAllAttachments
+ /// Handle client/mail/dialog/getAllAttachments
///
///
///
@@ -159,7 +177,7 @@ public class DialogueCallbacks(
}
///
- /// Handle client/mail/msg/send
+ /// Handle client/mail/msg/send
///
///
///
@@ -171,7 +189,7 @@ public class DialogueCallbacks(
}
///
- /// Handle client/friend/request/list/outbox
+ /// Handle client/friend/request/list/outbox
///
///
///
@@ -183,7 +201,7 @@ public class DialogueCallbacks(
}
///
- /// Handle client/friend/request/list/inbox
+ /// Handle client/friend/request/list/inbox
///
///
///
@@ -195,7 +213,7 @@ public class DialogueCallbacks(
}
///
- /// Handle client/friend/request/send
+ /// Handle client/friend/request/send
///
///
///
@@ -207,7 +225,7 @@ public class DialogueCallbacks(
}
///
- /// Handle client/friend/request/accept-all
+ /// Handle client/friend/request/accept-all
///
///
///
@@ -219,7 +237,7 @@ public class DialogueCallbacks(
}
///
- /// Handle client/friend/request/accept
+ /// Handle client/friend/request/accept
///
///
///
@@ -231,7 +249,7 @@ public class DialogueCallbacks(
}
///
- /// Handle client/friend/request/decline
+ /// Handle client/friend/request/decline
///
///
///
@@ -243,7 +261,7 @@ public class DialogueCallbacks(
}
///
- /// Handle client/friend/request/cancel
+ /// Handle client/friend/request/cancel
///
///
///
@@ -255,7 +273,7 @@ public class DialogueCallbacks(
}
///
- /// Handle client/friend/delete
+ /// Handle client/friend/delete
///
///
///
@@ -268,7 +286,7 @@ public class DialogueCallbacks(
}
///
- /// Handle client/friend/ignore/set
+ /// Handle client/friend/ignore/set
///
///
///
@@ -280,7 +298,7 @@ public class DialogueCallbacks(
}
///
- /// Handle client/friend/ignore/remove
+ /// Handle client/friend/ignore/remove
///
///
///
@@ -315,15 +333,4 @@ public class DialogueCallbacks(
{
return "Not Implemented!"; // Not implemented in Node
}
-
- public bool OnUpdate(long timeSinceLastRun)
- {
- _dialogueController.Update();
- return true;
- }
-
- public string GetRoute()
- {
- return "spt-dialogue";
- }
}
diff --git a/Libraries/Core/Callbacks/GameCallbacks.cs b/Libraries/Core/Callbacks/GameCallbacks.cs
index 1d514791..0150d466 100644
--- a/Libraries/Core/Callbacks/GameCallbacks.cs
+++ b/Libraries/Core/Callbacks/GameCallbacks.cs
@@ -1,11 +1,11 @@
-using SptCommon.Annotations;
-using Core.Controllers;
+using Core.Controllers;
using Core.DI;
using Core.Models.Eft.Common;
using Core.Models.Eft.Common.Request;
using Core.Models.Eft.Game;
using Core.Servers;
using Core.Utils;
+using SptCommon.Annotations;
namespace Core.Callbacks;
@@ -31,7 +31,7 @@ public class GameCallbacks(
}
///
- /// Handle client/game/version/validate
+ /// Handle client/game/version/validate
///
///
///
@@ -43,7 +43,7 @@ public class GameCallbacks(
}
///
- /// Handle client/game/start
+ /// Handle client/game/start
///
///
///
@@ -53,12 +53,17 @@ public class GameCallbacks(
{
var startTimestampSec = _timeUtil.GetTimeStamp();
_gameController.GameStart(url, info, sessionID, startTimestampSec);
- return _httpResponseUtil.GetBody(new GameStartResponse() { UtcTime = startTimestampSec });
+ return _httpResponseUtil.GetBody(
+ new GameStartResponse
+ {
+ UtcTime = startTimestampSec
+ }
+ );
}
///
- /// Handle client/game/logout
- /// Save profiles on game close
+ /// Handle client/game/logout
+ /// Save profiles on game close
///
///
///
@@ -67,11 +72,16 @@ public class GameCallbacks(
public string GameLogout(string url, EmptyRequestData info, string sessionID)
{
_saveServer.Save();
- return _httpResponseUtil.GetBody(new GameLogoutResponseData() { Status = "ok" });
+ return _httpResponseUtil.GetBody(
+ new GameLogoutResponseData
+ {
+ Status = "ok"
+ }
+ );
}
///
- /// Handle client/game/config
+ /// Handle client/game/config
///
///
///
@@ -83,7 +93,7 @@ public class GameCallbacks(
}
///
- /// Handle client/game/mode
+ /// Handle client/game/mode
///
///
///
@@ -95,7 +105,7 @@ public class GameCallbacks(
}
///
- /// Handle client/server/list
+ /// Handle client/server/list
///
///
///
@@ -107,7 +117,7 @@ public class GameCallbacks(
}
///
- /// Handle client/match/group/current
+ /// Handle client/match/group/current
///
///
///
@@ -119,7 +129,7 @@ public class GameCallbacks(
}
///
- /// Handle client/checkVersion
+ /// Handle client/checkVersion
///
///
///
@@ -131,7 +141,7 @@ public class GameCallbacks(
}
///
- /// Handle client/game/keepalive
+ /// Handle client/game/keepalive
///
///
///
@@ -143,7 +153,7 @@ public class GameCallbacks(
}
///
- /// Handle singleplayer/settings/version
+ /// Handle singleplayer/settings/version
///
///
///
@@ -152,11 +162,16 @@ public class GameCallbacks(
public string GetVersion(string url, EmptyRequestData info, string sessionID)
{
// change to be a proper type
- return _httpResponseUtil.NoBody(new { Version = _watermark.GetInGameVersionLabel() });
+ return _httpResponseUtil.NoBody(
+ new
+ {
+ Version = _watermark.GetInGameVersionLabel()
+ }
+ );
}
///
- /// Handle /client/report/send & /client/reports/lobby/send
+ /// Handle /client/report/send & /client/reports/lobby/send
///
///
///
@@ -168,7 +183,7 @@ public class GameCallbacks(
}
///
- /// Handle singleplayer/settings/getRaidTime
+ /// Handle singleplayer/settings/getRaidTime
///
///
///
@@ -180,7 +195,7 @@ public class GameCallbacks(
}
///
- /// Handle /client/survey
+ /// Handle /client/survey
///
///
///
@@ -192,7 +207,7 @@ public class GameCallbacks(
}
///
- /// Handle client/survey/view
+ /// Handle client/survey/view
///
///
///
@@ -204,7 +219,7 @@ public class GameCallbacks(
}
///
- /// Handle client/survey/opinion
+ /// Handle client/survey/opinion
///
///
///
diff --git a/Libraries/Core/Callbacks/HandbookCallbacks.cs b/Libraries/Core/Callbacks/HandbookCallbacks.cs
index d5e5a1cf..bcabda1a 100644
--- a/Libraries/Core/Callbacks/HandbookCallbacks.cs
+++ b/Libraries/Core/Callbacks/HandbookCallbacks.cs
@@ -1,6 +1,6 @@
-using SptCommon.Annotations;
-using Core.Controllers;
+using Core.Controllers;
using Core.DI;
+using SptCommon.Annotations;
namespace Core.Callbacks;
diff --git a/Libraries/Core/Callbacks/HealthCallbacks.cs b/Libraries/Core/Callbacks/HealthCallbacks.cs
index 79249f90..275f5f63 100644
--- a/Libraries/Core/Callbacks/HealthCallbacks.cs
+++ b/Libraries/Core/Callbacks/HealthCallbacks.cs
@@ -1,10 +1,10 @@
-using SptCommon.Annotations;
using Core.Controllers;
using Core.Helpers;
using Core.Models.Eft.Common;
using Core.Models.Eft.Health;
using Core.Models.Eft.ItemEvent;
using Core.Utils;
+using SptCommon.Annotations;
namespace Core.Callbacks;
@@ -16,7 +16,7 @@ public class HealthCallbacks(
)
{
///
- /// Custom spt server request found in modules/QTEPatch.cs
+ /// Custom spt server request found in modules/QTEPatch.cs
///
///
/// HealthListener.Instance.CurrentHealth class
@@ -29,7 +29,7 @@ public class HealthCallbacks(
}
///
- /// Handle Eat
+ /// Handle Eat
///
///
///
@@ -41,7 +41,7 @@ public class HealthCallbacks(
}
///
- /// Handle Heal
+ /// Handle Heal
///
///
///
@@ -53,7 +53,7 @@ public class HealthCallbacks(
}
///
- /// Handle RestoreHealth
+ /// Handle RestoreHealth
///
///
///
diff --git a/Libraries/Core/Callbacks/HideoutCallbacks.cs b/Libraries/Core/Callbacks/HideoutCallbacks.cs
index 11e19ac3..21dc69cc 100644
--- a/Libraries/Core/Callbacks/HideoutCallbacks.cs
+++ b/Libraries/Core/Callbacks/HideoutCallbacks.cs
@@ -1,4 +1,3 @@
-using SptCommon.Annotations;
using Core.Controllers;
using Core.DI;
using Core.Models.Eft.Common;
@@ -6,6 +5,7 @@ using Core.Models.Eft.Hideout;
using Core.Models.Eft.ItemEvent;
using Core.Models.Spt.Config;
using Core.Servers;
+using SptCommon.Annotations;
namespace Core.Callbacks;
@@ -18,151 +18,6 @@ public class HideoutCallbacks(
{
private readonly HideoutConfig _hideoutConfig = _configServer.GetConfig();
- ///
- /// Handle HideoutUpgrade event
- ///
- public ItemEventRouterResponse Upgrade(PmcData pmcData, HideoutUpgradeRequestData request, string sessionID, ItemEventRouterResponse output)
- {
- _hideoutController.StartUpgrade(pmcData, request, sessionID, output);
-
- return output;
- }
-
- ///
- /// Handle HideoutUpgradeComplete event
- ///
- public ItemEventRouterResponse UpgradeComplete(PmcData pmcData, HideoutUpgradeCompleteRequestData request, string sessionID, ItemEventRouterResponse output)
- {
- _hideoutController.UpgradeComplete(pmcData, request, sessionID, output);
-
- return output;
- }
-
- ///
- /// Handle HideoutPutItemsInAreaSlots
- ///
- public ItemEventRouterResponse PutItemsInAreaSlots(PmcData pmcData, HideoutPutItemInRequestData request, string sessionID)
- {
- return _hideoutController.PutItemsInAreaSlots(pmcData, request, sessionID);
- }
-
- ///
- /// Handle HideoutTakeItemsFromAreaSlots event
- ///
- public ItemEventRouterResponse TakeItemsFromAreaSlots(PmcData pmcData, HideoutTakeItemOutRequestData request, string sessionID)
- {
- return _hideoutController.TakeItemsFromAreaSlots(pmcData, request, sessionID);
- }
-
- ///
- /// Handle HideoutToggleArea event
- ///
- public ItemEventRouterResponse ToggleArea(PmcData pmcData, HideoutToggleAreaRequestData request, string sessionID)
- {
- return _hideoutController.ToggleArea(pmcData, request, sessionID);
- }
-
- ///
- /// Handle HideoutSingleProductionStart event
- ///
- public ItemEventRouterResponse SingleProductionStart(PmcData pmcData, HideoutSingleProductionStartRequestData request, string sessionID)
- {
- return _hideoutController.SingleProductionStart(pmcData, request, sessionID);
- }
-
- ///
- /// Handle HideoutScavCaseProductionStart event
- ///
- public ItemEventRouterResponse ScavCaseProductionStart(PmcData pmcData, HideoutScavCaseStartRequestData request, string sessionID)
- {
- return _hideoutController.ScavCaseProductionStart(pmcData, request, sessionID);
- }
-
- ///
- /// Handle HideoutContinuousProductionStart
- ///
- public ItemEventRouterResponse ContinuousProductionStart(PmcData pmcData, HideoutContinuousProductionStartRequestData request, string sessionID)
- {
- return _hideoutController.ContinuousProductionStart(pmcData, request, sessionID);
- }
-
- ///
- /// Handle HideoutTakeProduction event
- ///
- public ItemEventRouterResponse TakeProduction(PmcData pmcData, HideoutTakeProductionRequestData request, string sessionID)
- {
- return _hideoutController.TakeProduction(pmcData, request, sessionID);
- }
-
- ///
- /// Handle HideoutQuickTimeEvent
- ///
- public ItemEventRouterResponse HandleQTEEvent(PmcData pmcData, HandleQTEEventRequestData request, string sessionID, ItemEventRouterResponse output)
- {
- _hideoutController.HandleQTEEventOutcome(sessionID, pmcData, request, output);
-
- return output;
- }
-
- ///
- /// Handle client/game/profile/items/moving - RecordShootingRangePoints
- ///
- public ItemEventRouterResponse RecordShootingRangePoints(PmcData pmcData, RecordShootingRangePoints request, string sessionID,
- ItemEventRouterResponse output)
- {
- _hideoutController.RecordShootingRangePoints(sessionID, pmcData, request);
-
- return output;
- }
-
- ///
- /// Handle client/game/profile/items/moving - RecordShootingRangePoints
- ///
- public ItemEventRouterResponse ImproveArea(PmcData pmcData, HideoutImproveAreaRequestData request, string sessionID)
- {
- return _hideoutController.ImproveArea(sessionID, pmcData, request);
- }
-
- ///
- /// Handle client/game/profile/items/moving - HideoutCancelProductionCommand
- ///
- public ItemEventRouterResponse CancelProduction(PmcData pmcData, HideoutCancelProductionRequestData request, string sessionID)
- {
- return _hideoutController.CancelProduction(sessionID, pmcData, request);
- }
-
- ///
- /// Handle client/game/profile/items/moving - HideoutCircleOfCultistProductionStart
- ///
- public ItemEventRouterResponse CicleOfCultistProductionStart(PmcData pmcData, HideoutCircleOfCultistProductionStartRequestData request, string sessionID)
- {
- return _hideoutController.CicleOfCultistProductionStart(sessionID, pmcData, request);
- }
-
- ///
- /// Handle client/game/profile/items/moving - HideoutDeleteProductionCommand
- ///
- public ItemEventRouterResponse HideoutDeleteProductionCommand(PmcData pmcData, HideoutDeleteProductionRequestData request, string sessionID)
- {
- return _hideoutController.HideoutDeleteProductionCommand(sessionID, pmcData, request);
- }
-
- ///
- /// Handle client/game/profile/items/moving - HideoutCustomizationApply
- ///
- public ItemEventRouterResponse HideoutCustomizationApplyCommand(PmcData pmcData, HideoutCustomizationApplyRequestData request, string sessionID)
- {
- return _hideoutController.HideoutCustomizationApply(sessionID, pmcData, request);
- }
-
- /**
- * Handle client/game/profile/items/moving - hideoutCustomizationSetMannequinPose
- */
- public ItemEventRouterResponse HideoutCustomizationSetMannequinPose(PmcData pmcData, HideoutCustomizationSetMannequinPoseRequest request, string sessionId)
- {
- return _hideoutController.HideoutCustomizationSetMannequinPose(sessionId, pmcData, request);
- }
-
public bool OnUpdate(long timeSinceLastRun)
{
if (timeSinceLastRun > _hideoutConfig.RunIntervalSeconds)
@@ -178,4 +33,149 @@ public class HideoutCallbacks(
{
return "spt-hideout";
}
+
+ ///
+ /// Handle HideoutUpgrade event
+ ///
+ public ItemEventRouterResponse Upgrade(PmcData pmcData, HideoutUpgradeRequestData request, string sessionID, ItemEventRouterResponse output)
+ {
+ _hideoutController.StartUpgrade(pmcData, request, sessionID, output);
+
+ return output;
+ }
+
+ ///
+ /// Handle HideoutUpgradeComplete event
+ ///
+ public ItemEventRouterResponse UpgradeComplete(PmcData pmcData, HideoutUpgradeCompleteRequestData request, string sessionID, ItemEventRouterResponse output)
+ {
+ _hideoutController.UpgradeComplete(pmcData, request, sessionID, output);
+
+ return output;
+ }
+
+ ///
+ /// Handle HideoutPutItemsInAreaSlots
+ ///
+ public ItemEventRouterResponse PutItemsInAreaSlots(PmcData pmcData, HideoutPutItemInRequestData request, string sessionID)
+ {
+ return _hideoutController.PutItemsInAreaSlots(pmcData, request, sessionID);
+ }
+
+ ///
+ /// Handle HideoutTakeItemsFromAreaSlots event
+ ///
+ public ItemEventRouterResponse TakeItemsFromAreaSlots(PmcData pmcData, HideoutTakeItemOutRequestData request, string sessionID)
+ {
+ return _hideoutController.TakeItemsFromAreaSlots(pmcData, request, sessionID);
+ }
+
+ ///
+ /// Handle HideoutToggleArea event
+ ///
+ public ItemEventRouterResponse ToggleArea(PmcData pmcData, HideoutToggleAreaRequestData request, string sessionID)
+ {
+ return _hideoutController.ToggleArea(pmcData, request, sessionID);
+ }
+
+ ///
+ /// Handle HideoutSingleProductionStart event
+ ///
+ public ItemEventRouterResponse SingleProductionStart(PmcData pmcData, HideoutSingleProductionStartRequestData request, string sessionID)
+ {
+ return _hideoutController.SingleProductionStart(pmcData, request, sessionID);
+ }
+
+ ///
+ /// Handle HideoutScavCaseProductionStart event
+ ///
+ public ItemEventRouterResponse ScavCaseProductionStart(PmcData pmcData, HideoutScavCaseStartRequestData request, string sessionID)
+ {
+ return _hideoutController.ScavCaseProductionStart(pmcData, request, sessionID);
+ }
+
+ ///
+ /// Handle HideoutContinuousProductionStart
+ ///
+ public ItemEventRouterResponse ContinuousProductionStart(PmcData pmcData, HideoutContinuousProductionStartRequestData request, string sessionID)
+ {
+ return _hideoutController.ContinuousProductionStart(pmcData, request, sessionID);
+ }
+
+ ///
+ /// Handle HideoutTakeProduction event
+ ///
+ public ItemEventRouterResponse TakeProduction(PmcData pmcData, HideoutTakeProductionRequestData request, string sessionID)
+ {
+ return _hideoutController.TakeProduction(pmcData, request, sessionID);
+ }
+
+ ///
+ /// Handle HideoutQuickTimeEvent
+ ///
+ public ItemEventRouterResponse HandleQTEEvent(PmcData pmcData, HandleQTEEventRequestData request, string sessionID, ItemEventRouterResponse output)
+ {
+ _hideoutController.HandleQTEEventOutcome(sessionID, pmcData, request, output);
+
+ return output;
+ }
+
+ ///
+ /// Handle client/game/profile/items/moving - RecordShootingRangePoints
+ ///
+ public ItemEventRouterResponse RecordShootingRangePoints(PmcData pmcData, RecordShootingRangePoints request, string sessionID,
+ ItemEventRouterResponse output)
+ {
+ _hideoutController.RecordShootingRangePoints(sessionID, pmcData, request);
+
+ return output;
+ }
+
+ ///
+ /// Handle client/game/profile/items/moving - RecordShootingRangePoints
+ ///
+ public ItemEventRouterResponse ImproveArea(PmcData pmcData, HideoutImproveAreaRequestData request, string sessionID)
+ {
+ return _hideoutController.ImproveArea(sessionID, pmcData, request);
+ }
+
+ ///
+ /// Handle client/game/profile/items/moving - HideoutCancelProductionCommand
+ ///
+ public ItemEventRouterResponse CancelProduction(PmcData pmcData, HideoutCancelProductionRequestData request, string sessionID)
+ {
+ return _hideoutController.CancelProduction(sessionID, pmcData, request);
+ }
+
+ ///
+ /// Handle client/game/profile/items/moving - HideoutCircleOfCultistProductionStart
+ ///
+ public ItemEventRouterResponse CicleOfCultistProductionStart(PmcData pmcData, HideoutCircleOfCultistProductionStartRequestData request, string sessionID)
+ {
+ return _hideoutController.CicleOfCultistProductionStart(sessionID, pmcData, request);
+ }
+
+ ///
+ /// Handle client/game/profile/items/moving - HideoutDeleteProductionCommand
+ ///
+ public ItemEventRouterResponse HideoutDeleteProductionCommand(PmcData pmcData, HideoutDeleteProductionRequestData request, string sessionID)
+ {
+ return _hideoutController.HideoutDeleteProductionCommand(sessionID, pmcData, request);
+ }
+
+ ///
+ /// Handle client/game/profile/items/moving - HideoutCustomizationApply
+ ///
+ public ItemEventRouterResponse HideoutCustomizationApplyCommand(PmcData pmcData, HideoutCustomizationApplyRequestData request, string sessionID)
+ {
+ return _hideoutController.HideoutCustomizationApply(sessionID, pmcData, request);
+ }
+
+ /**
+ * Handle client/game/profile/items/moving - hideoutCustomizationSetMannequinPose
+ */
+ public ItemEventRouterResponse HideoutCustomizationSetMannequinPose(PmcData pmcData, HideoutCustomizationSetMannequinPoseRequest request, string sessionId)
+ {
+ return _hideoutController.HideoutCustomizationSetMannequinPose(sessionId, pmcData, request);
+ }
}
diff --git a/Libraries/Core/Callbacks/HttpCallbacks.cs b/Libraries/Core/Callbacks/HttpCallbacks.cs
index 9e82d047..43e1f7be 100644
--- a/Libraries/Core/Callbacks/HttpCallbacks.cs
+++ b/Libraries/Core/Callbacks/HttpCallbacks.cs
@@ -1,7 +1,7 @@
-using SptCommon.Annotations;
using Core.Context;
using Core.DI;
using Core.Servers;
+using SptCommon.Annotations;
namespace Core.Callbacks;
diff --git a/Libraries/Core/Callbacks/InraidCallbacks.cs b/Libraries/Core/Callbacks/InraidCallbacks.cs
index c7e77b38..89c016af 100644
--- a/Libraries/Core/Callbacks/InraidCallbacks.cs
+++ b/Libraries/Core/Callbacks/InraidCallbacks.cs
@@ -1,8 +1,8 @@
-using SptCommon.Annotations;
-using Core.Controllers;
+using Core.Controllers;
using Core.Models.Eft.Common;
using Core.Models.Eft.InRaid;
using Core.Utils;
+using SptCommon.Annotations;
namespace Core.Callbacks;
@@ -13,8 +13,8 @@ public class InraidCallbacks(
)
{
///
- /// Handle client/location/getLocalloot
- /// Store active map in profile + applicationContext
+ /// Handle client/location/getLocalloot
+ /// Store active map in profile + applicationContext
///
///
/// register player request
@@ -27,7 +27,7 @@ public class InraidCallbacks(
}
///
- /// Handle raid/profile/scavsave
+ /// Handle raid/profile/scavsave
///
///
/// Save progress request
@@ -40,7 +40,7 @@ public class InraidCallbacks(
}
///
- /// Handle singleplayer/settings/raid/menu
+ /// Handle singleplayer/settings/raid/menu
///
/// JSON as string
public string GetRaidMenuSettings()
diff --git a/Libraries/Core/Callbacks/InsuranceCallbacks.cs b/Libraries/Core/Callbacks/InsuranceCallbacks.cs
index af39be6b..546e4ba2 100644
--- a/Libraries/Core/Callbacks/InsuranceCallbacks.cs
+++ b/Libraries/Core/Callbacks/InsuranceCallbacks.cs
@@ -1,5 +1,4 @@
-using SptCommon.Annotations;
-using Core.Controllers;
+using Core.Controllers;
using Core.DI;
using Core.Models.Eft.Common;
using Core.Models.Eft.Insurance;
@@ -8,6 +7,7 @@ using Core.Models.Spt.Config;
using Core.Servers;
using Core.Services;
using Core.Utils;
+using SptCommon.Annotations;
namespace Core.Callbacks;
@@ -21,10 +21,26 @@ public class InsuranceCallbacks(
)
: OnUpdate
{
- private InsuranceConfig _insuranceConfig = _configServer.GetConfig();
+ private readonly InsuranceConfig _insuranceConfig = _configServer.GetConfig();
+
+ public bool OnUpdate(long timeSinceLastRun)
+ {
+ if (timeSinceLastRun > Math.Max(_insuranceConfig.RunIntervalSeconds, 1))
+ {
+ _insuranceController.ProcessReturn();
+ return true;
+ }
+
+ return false;
+ }
+
+ public string GetRoute()
+ {
+ return "spt-insurance";
+ }
///
- /// Handle client/insurance/items/list/cost
+ /// Handle client/insurance/items/list/cost
///
///
///
@@ -36,7 +52,7 @@ public class InsuranceCallbacks(
}
///
- /// Handle Insure event
+ /// Handle Insure event
///
///
///
@@ -46,18 +62,4 @@ public class InsuranceCallbacks(
{
return _insuranceController.Insure(pmcData, info, sessionID);
}
-
- public bool OnUpdate(long timeSinceLastRun)
- {
- if (timeSinceLastRun > Math.Max(_insuranceConfig.RunIntervalSeconds, 1))
- _insuranceController.ProcessReturn();
- return true;
-
- return false;
- }
-
- public string GetRoute()
- {
- return "spt-insurance";
- }
}
diff --git a/Libraries/Core/Callbacks/InventoryCallbacks.cs b/Libraries/Core/Callbacks/InventoryCallbacks.cs
index cd5eb169..9effcc91 100644
--- a/Libraries/Core/Callbacks/InventoryCallbacks.cs
+++ b/Libraries/Core/Callbacks/InventoryCallbacks.cs
@@ -1,5 +1,4 @@
using Core.Controllers;
-using Core.Helpers;
using Core.Models.Eft.Common;
using Core.Models.Eft.Inventory;
using Core.Models.Eft.ItemEvent;
diff --git a/Libraries/Core/Callbacks/ItemEventCallbacks.cs b/Libraries/Core/Callbacks/ItemEventCallbacks.cs
index d43f40e5..0a2a8cd4 100644
--- a/Libraries/Core/Callbacks/ItemEventCallbacks.cs
+++ b/Libraries/Core/Callbacks/ItemEventCallbacks.cs
@@ -1,8 +1,8 @@
-using SptCommon.Annotations;
using Core.Models.Eft.ItemEvent;
using Core.Models.Enums;
using Core.Routers;
using Core.Utils;
+using SptCommon.Annotations;
namespace Core.Callbacks;
@@ -20,21 +20,29 @@ public class ItemEventCallbacks(HttpResponseUtil _httpResponseUtil, ItemEventRou
}
///
- /// Return true if the passed in list of warnings contains critical issues
+ /// Return true if the passed in list of warnings contains critical issues
///
/// The list of warnings to check for critical errors
///
public bool IsCriticalError(List? warnings)
{
- if (warnings is null) return false;
+ if (warnings is null)
+ {
+ return false;
+ }
// List of non-critical error codes, we return true if any error NOT included is passed in
- var nonCriticalErrorCodes = new List { BackendErrorCodes.NotEnoughSpace };
+ var nonCriticalErrorCodes = new List
+ {
+ BackendErrorCodes.NotEnoughSpace
+ };
foreach (var warning in warnings)
{
if (!nonCriticalErrorCodes.Contains(warning.Code ?? BackendErrorCodes.None))
+ {
return true;
+ }
}
return false;
@@ -44,6 +52,5 @@ public class ItemEventCallbacks(HttpResponseUtil _httpResponseUtil, ItemEventRou
{
// Cast int to string to get the error code of 220 for Unknown Error.
return warnings.FirstOrDefault()?.Code is null ? BackendErrorCodes.UnknownError : warnings.FirstOrDefault()?.Code ?? BackendErrorCodes.UnknownError;
-
}
}
diff --git a/Libraries/Core/Callbacks/LauncherCallbacks.cs b/Libraries/Core/Callbacks/LauncherCallbacks.cs
index 37c30082..2b9fc0d0 100644
--- a/Libraries/Core/Callbacks/LauncherCallbacks.cs
+++ b/Libraries/Core/Callbacks/LauncherCallbacks.cs
@@ -1,9 +1,9 @@
-using SptCommon.Annotations;
-using Core.Controllers;
+using Core.Controllers;
using Core.Models.Eft.Common;
using Core.Models.Eft.Launcher;
using Core.Servers;
using Core.Utils;
+using SptCommon.Annotations;
namespace Core.Callbacks;
diff --git a/Libraries/Core/Callbacks/LauncherV2Callbacks.cs b/Libraries/Core/Callbacks/LauncherV2Callbacks.cs
index cfb8fff8..f27e04e9 100644
--- a/Libraries/Core/Callbacks/LauncherV2Callbacks.cs
+++ b/Libraries/Core/Callbacks/LauncherV2Callbacks.cs
@@ -1,8 +1,8 @@
-using SptCommon.Annotations;
-using Core.Controllers;
+using Core.Controllers;
using Core.Models.Eft.Launcher;
using Core.Models.Spt.Launcher;
using Core.Utils;
+using SptCommon.Annotations;
namespace Core.Callbacks;
diff --git a/Libraries/Core/Callbacks/LocationCallbacks.cs b/Libraries/Core/Callbacks/LocationCallbacks.cs
index e9a76430..2b14a456 100644
--- a/Libraries/Core/Callbacks/LocationCallbacks.cs
+++ b/Libraries/Core/Callbacks/LocationCallbacks.cs
@@ -1,8 +1,8 @@
-using SptCommon.Annotations;
-using Core.Controllers;
+using Core.Controllers;
using Core.Models.Eft.Common;
using Core.Models.Eft.Location;
using Core.Utils;
+using SptCommon.Annotations;
namespace Core.Callbacks;
@@ -13,7 +13,7 @@ public class LocationCallbacks(
)
{
///
- /// Handle client/locations
+ /// Handle client/locations
///
///
///
@@ -25,7 +25,7 @@ public class LocationCallbacks(
}
///
- /// Handle client/airdrop/loot
+ /// Handle client/airdrop/loot
///
///
///
diff --git a/Libraries/Core/Callbacks/MatchCallbacks.cs b/Libraries/Core/Callbacks/MatchCallbacks.cs
index 7494bbb9..00fbe392 100644
--- a/Libraries/Core/Callbacks/MatchCallbacks.cs
+++ b/Libraries/Core/Callbacks/MatchCallbacks.cs
@@ -1,9 +1,9 @@
-using SptCommon.Annotations;
using Core.Controllers;
using Core.Models.Eft.Common;
using Core.Models.Eft.Match;
using Core.Services;
using Core.Utils;
+using SptCommon.Annotations;
using static Core.Services.MatchLocationService;
namespace Core.Callbacks;
@@ -16,7 +16,7 @@ public class MatchCallbacks(
)
{
///
- /// Handle client/match/updatePing
+ /// Handle client/match/updatePing
///
///
///
@@ -28,7 +28,7 @@ public class MatchCallbacks(
}
///
- /// Handle client/match/exit
+ /// Handle client/match/exit
///
///
///
@@ -40,7 +40,7 @@ public class MatchCallbacks(
}
///
- /// Handle client/match/group/exit_from_menu
+ /// Handle client/match/group/exit_from_menu
///
///
///
@@ -52,7 +52,7 @@ public class MatchCallbacks(
}
///
- /// Handle client/match/group/current
+ /// Handle client/match/group/current
///
///
///
@@ -60,11 +60,16 @@ public class MatchCallbacks(
///
public string GroupCurrent(string url, EmptyRequestData info, string sessionID)
{
- return _httpResponseUtil.GetBody(new MatchGroupCurrentResponse { Squad = [] });
+ return _httpResponseUtil.GetBody(
+ new MatchGroupCurrentResponse
+ {
+ Squad = []
+ }
+ );
}
///
- /// Handle client/match/group/looking/start
+ /// Handle client/match/group/looking/start
///
///
///
@@ -76,7 +81,7 @@ public class MatchCallbacks(
}
///
- /// Handle client/match/group/looking/stop
+ /// Handle client/match/group/looking/stop
///
///
///
@@ -88,7 +93,7 @@ public class MatchCallbacks(
}
///
- /// Handle client/match/group/invite/send
+ /// Handle client/match/group/invite/send
///
///
///
@@ -100,7 +105,7 @@ public class MatchCallbacks(
}
///
- /// Handle client/match/group/invite/accept
+ /// Handle client/match/group/invite/accept
///
///
///
@@ -108,11 +113,16 @@ public class MatchCallbacks(
///
public string AcceptGroupInvite(string url, RequestIdRequest info, string sessionID)
{
- return _httpResponseUtil.GetBody(new List() { new() });
+ return _httpResponseUtil.GetBody(
+ new List
+ {
+ new()
+ }
+ );
}
///
- /// Handle client/match/group/invite/decline
+ /// Handle client/match/group/invite/decline
///
///
///
@@ -124,7 +134,7 @@ public class MatchCallbacks(
}
///
- /// Handle client/match/group/invite/cancel
+ /// Handle client/match/group/invite/cancel
///
///
///
@@ -136,7 +146,7 @@ public class MatchCallbacks(
}
///
- /// Handle client/match/group/transfer
+ /// Handle client/match/group/transfer
///
///
///
@@ -148,7 +158,7 @@ public class MatchCallbacks(
}
///
- /// Handle client/match/group/invite/cancel-all
+ /// Handle client/match/group/invite/cancel-all
///
///
///
@@ -160,7 +170,7 @@ public class MatchCallbacks(
}
///
- /// Handle client/putMetrics
+ /// Handle client/putMetrics
///
///
///
@@ -172,7 +182,7 @@ public class MatchCallbacks(
}
///
- /// Handle client/analytics/event-disconnect
+ /// Handle client/analytics/event-disconnect
///
///
///
@@ -184,7 +194,7 @@ public class MatchCallbacks(
}
///
- /// Handle client/match/available
+ /// Handle client/match/available
///
///
///
@@ -196,7 +206,7 @@ public class MatchCallbacks(
}
///
- /// Handle match/group/start_game
+ /// Handle match/group/start_game
///
///
///
@@ -208,7 +218,7 @@ public class MatchCallbacks(
}
///
- /// Handle client/getMetricsConfig
+ /// Handle client/getMetricsConfig
///
///
///
@@ -220,8 +230,8 @@ public class MatchCallbacks(
}
///
- /// Called periodically while in a group
- /// Handle client/match/group/status
+ /// Called periodically while in a group
+ /// Handle client/match/group/status
///
///
///
@@ -233,7 +243,7 @@ public class MatchCallbacks(
}
///
- /// Handle client/match/group/delete
+ /// Handle client/match/group/delete
///
///
///
@@ -246,7 +256,7 @@ public class MatchCallbacks(
}
///
- /// Handle client/match/group/leave
+ /// Handle client/match/group/leave
///
///
///
@@ -258,7 +268,7 @@ public class MatchCallbacks(
}
///
- /// Handle client/match/group/player/remove
+ /// Handle client/match/group/player/remove
///
///
///
@@ -270,7 +280,7 @@ public class MatchCallbacks(
}
///
- /// Handle client/match/local/start
+ /// Handle client/match/local/start
///
///
///
@@ -282,7 +292,7 @@ public class MatchCallbacks(
}
///
- /// Handle client/match/local/end
+ /// Handle client/match/local/end
///
///
///
@@ -295,7 +305,7 @@ public class MatchCallbacks(
}
///
- /// Handle client/raid/configuration
+ /// Handle client/raid/configuration
///
///
///
@@ -308,7 +318,7 @@ public class MatchCallbacks(
}
///
- /// Handle client/raid/configuration-by-profile
+ /// Handle client/raid/configuration-by-profile
///
///
///
@@ -320,7 +330,7 @@ public class MatchCallbacks(
}
///
- /// Handle client/match/group/raid/ready
+ /// Handle client/match/group/raid/ready
///
///
///
@@ -332,7 +342,7 @@ public class MatchCallbacks(
}
///
- /// Handle client/match/group/raid/not-ready
+ /// Handle client/match/group/raid/not-ready
///
///
///
diff --git a/Libraries/Core/Callbacks/NoteCallbacks.cs b/Libraries/Core/Callbacks/NoteCallbacks.cs
index c5ebbf6d..76e29c6f 100644
--- a/Libraries/Core/Callbacks/NoteCallbacks.cs
+++ b/Libraries/Core/Callbacks/NoteCallbacks.cs
@@ -1,8 +1,8 @@
-using SptCommon.Annotations;
using Core.Controllers;
using Core.Models.Eft.Common;
using Core.Models.Eft.ItemEvent;
using Core.Models.Eft.Notes;
+using SptCommon.Annotations;
namespace Core.Callbacks;
@@ -10,7 +10,7 @@ namespace Core.Callbacks;
public class NoteCallbacks(NoteController _noteController)
{
///
- /// Handle AddNote event
+ /// Handle AddNote event
///
///
///
@@ -22,7 +22,7 @@ public class NoteCallbacks(NoteController _noteController)
}
///
- /// Handle EditNote event
+ /// Handle EditNote event
///
///
///
@@ -34,7 +34,7 @@ public class NoteCallbacks(NoteController _noteController)
}
///
- /// Handle DeleteNote event
+ /// Handle DeleteNote event
///
///
///
diff --git a/Libraries/Core/Callbacks/NotifierCallbacks.cs b/Libraries/Core/Callbacks/NotifierCallbacks.cs
index 97adf5f6..2818916b 100644
--- a/Libraries/Core/Callbacks/NotifierCallbacks.cs
+++ b/Libraries/Core/Callbacks/NotifierCallbacks.cs
@@ -1,9 +1,9 @@
-using SptCommon.Annotations;
using Core.Controllers;
using Core.Models.Eft.Common;
using Core.Models.Eft.Common.Request;
using Core.Models.Eft.Notifier;
using Core.Utils;
+using SptCommon.Annotations;
namespace Core.Callbacks;
@@ -14,7 +14,7 @@ public class NotifierCallbacks(
)
{
///
- /// Handle client/notifier/channel/create
+ /// Handle client/notifier/channel/create
///
///
///
@@ -26,7 +26,7 @@ public class NotifierCallbacks(
}
///
- /// Handle client/game/profile/select
+ /// Handle client/game/profile/select
///
///
///
@@ -34,11 +34,15 @@ public class NotifierCallbacks(
///
public string SelectProfile(string url, UIDRequestData info, string sessionID)
{
- return _httpResponseUtil.GetBody(new SelectProfileResponse { Status = "ok" });
+ return _httpResponseUtil.GetBody(
+ new SelectProfileResponse
+ {
+ Status = "ok"
+ }
+ );
}
///
- ///
///
///
///
diff --git a/Libraries/Core/Callbacks/PresetCallbacks.cs b/Libraries/Core/Callbacks/PresetCallbacks.cs
index 96209026..641d122a 100644
--- a/Libraries/Core/Callbacks/PresetCallbacks.cs
+++ b/Libraries/Core/Callbacks/PresetCallbacks.cs
@@ -1,6 +1,6 @@
-using SptCommon.Annotations;
-using Core.Controllers;
+using Core.Controllers;
using Core.DI;
+using SptCommon.Annotations;
namespace Core.Callbacks;
diff --git a/Libraries/Core/Callbacks/PrestigeCallbacks.cs b/Libraries/Core/Callbacks/PrestigeCallbacks.cs
index b6000b6b..5ae586b4 100644
--- a/Libraries/Core/Callbacks/PrestigeCallbacks.cs
+++ b/Libraries/Core/Callbacks/PrestigeCallbacks.cs
@@ -1,8 +1,8 @@
-using SptCommon.Annotations;
using Core.Controllers;
using Core.Models.Eft.Common;
using Core.Models.Eft.Prestige;
using Core.Utils;
+using SptCommon.Annotations;
namespace Core.Callbacks;
@@ -13,7 +13,7 @@ public class PrestigeCallbacks(
)
{
///
- /// Handle client/prestige/list
+ /// Handle client/prestige/list
///
///
///
@@ -25,7 +25,7 @@ public class PrestigeCallbacks(
}
///
- /// Handle client/prestige/obtain
+ /// Handle client/prestige/obtain
///
///
///
diff --git a/Libraries/Core/Callbacks/ProfileCallbacks.cs b/Libraries/Core/Callbacks/ProfileCallbacks.cs
index 5844ce89..9b575892 100644
--- a/Libraries/Core/Callbacks/ProfileCallbacks.cs
+++ b/Libraries/Core/Callbacks/ProfileCallbacks.cs
@@ -1,4 +1,3 @@
-using SptCommon.Annotations;
using Core.Controllers;
using Core.Helpers;
using Core.Models.Eft.Common;
@@ -6,6 +5,7 @@ using Core.Models.Eft.Launcher;
using Core.Models.Eft.Profile;
using Core.Models.Enums;
using Core.Utils;
+using SptCommon.Annotations;
namespace Core.Callbacks;
@@ -23,7 +23,12 @@ public class ProfileCallbacks(
public string CreateProfile(string url, ProfileCreateRequestData info, string sessionID)
{
var id = _profileController.CreateProfile(info, sessionID);
- return _httpResponse.GetBody(new CreateProfileResponse { UserId = id });
+ return _httpResponse.GetBody(
+ new CreateProfileResponse
+ {
+ UserId = id
+ }
+ );
}
/**
@@ -46,7 +51,12 @@ public class ProfileCallbacks(
*/
public string RegenerateScav(string url, EmptyRequestData info, string sessionID)
{
- return _httpResponse.GetBody(new List { _profileController.GeneratePlayerScav(sessionID) });
+ return _httpResponse.GetBody(
+ new List
+ {
+ _profileController.GeneratePlayerScav(sessionID)
+ }
+ );
}
/**
@@ -70,7 +80,13 @@ public class ProfileCallbacks(
{
"taken" => _httpResponse.GetBody