From a3aee5dcf67321430980833281899698c54a59aa Mon Sep 17 00:00:00 2001
From: Cj <161484149+CJ-SPT@users.noreply.github.com>
Date: Mon, 6 Jan 2025 21:46:30 -0500
Subject: [PATCH] Moreeee controllers
---
Core/Controllers/GameController.cs | 182 +++++++++++++++++++++++++
Core/Controllers/HandBookController.cs | 10 ++
Core/Controllers/HealthController.cs | 68 +++++++++
3 files changed, 260 insertions(+)
create mode 100644 Core/Controllers/GameController.cs
create mode 100644 Core/Controllers/HandBookController.cs
create mode 100644 Core/Controllers/HealthController.cs
diff --git a/Core/Controllers/GameController.cs b/Core/Controllers/GameController.cs
new file mode 100644
index 00000000..845bfb8c
--- /dev/null
+++ b/Core/Controllers/GameController.cs
@@ -0,0 +1,182 @@
+using Core.Models.Eft.Common;
+using Core.Models.Eft.Profile;
+
+namespace Core.Controllers;
+
+public class GameController
+{
+ ///
+ /// Handle client/game/start
+ ///
+ ///
+ ///
+ ///
+ ///
+ public void GameStart(
+ string url,
+ EmptyRequestData info,
+ string sessionId,
+ long startTimeStampMs)
+ {
+ throw new NotImplementedException();
+ }
+
+ ///
+ /// Handles migrating profiles from older SPT versions
+ ///
+ ///
+ /// Formerly migrate39xProfile in node server
+ private void MigrateProfile(SptProfile fullProfile)
+ {
+ throw new NotImplementedException();
+ }
+
+ ///
+ /// Handle client/game/config
+ ///
+ ///
+ ///
+ public GameConfigResponse GetGameConfig(string sessionId)
+ {
+ throw new NotImplementedException();
+ }
+
+ ///
+ /// Handle client/game/mode
+ ///
+ ///
+ ///
+ ///
+ public object GetGameMode( // TODO: Returns `any` in node server
+ string sessionId,
+ GameModeRequestData requestData)
+ {
+ throw new NotImplementedException();
+ }
+
+ ///
+ /// Handle client/server/list
+ ///
+ ///
+ ///
+ public List GetServer(string sessionId)
+ {
+ throw new NotImplementedException();
+ }
+
+ ///
+ /// Handle client/match/group/current
+ ///
+ ///
+ ///
+ public CurrentGroupResponse GetCurrentGroup(string sessionId)
+ {
+ throw new NotImplementedException();
+ }
+
+ ///
+ /// Handle client/checkVersion
+ ///
+ ///
+ ///
+ public CheckVersionResponse GetValidGameVersion(string sessionId)
+ {
+ throw new NotImplementedException();
+ }
+
+ ///
+ /// Handle client/game/keepalive
+ ///
+ ///
+ ///
+ public GameKeepAliveResponse GetKeepAlive(string sessionId)
+ {
+ throw new NotImplementedException();
+ }
+
+ ///
+ /// Handle singleplayer/settings/getRaidTime
+ ///
+ ///
+ ///
+ ///
+ public GetRaidTimeResponse GetRaidTime(
+ string sessionId,
+ GetRaidTimeRequest request)
+ {
+ throw new NotImplementedException();
+ }
+
+ ///
+ ///
+ ///
+ ///
+ ///
+ public SurveyResponseData GetSurvey(string sessionId)
+ {
+ throw new NotImplementedException();
+ }
+
+ ///
+ /// Players set botReload to a high value and don't expect the crazy fast reload speeds, give them a warn about it
+ ///
+ /// Player profile
+ private void WarnOnActiveBotReloadSkill(PmcData pmcProfile)
+ {
+ throw new NotImplementedException();
+ }
+
+ ///
+ /// When player logs in, iterate over all active effects and reduce timer
+ ///
+ /// Profile to adjust values for
+ private void UpdateProfileHealthValues(PmcData pmcProfile)
+ {
+ throw new NotImplementedException();
+ }
+
+ ///
+ /// Send starting gifts to profile after x days
+ ///
+ /// Profile to add gifts to
+ private void SendPraporGiftsToNewProfiles(PmcData pmcProfile)
+ {
+ throw new NotImplementedException();
+ }
+
+ ///
+ /// Get a list of installed mods and save their details to the profile being used
+ ///
+ /// Profile to add mod details to
+ private void SaveActiveModsToProfile(SptProfile fullProfile)
+ {
+ throw new NotImplementedException();
+ }
+
+ ///
+ /// Add the logged in players name to PMC name pool
+ ///
+ /// Profile of player to get name from
+ private void AddPlayerToPmcNames(PmcData pmcProfile)
+ {
+ throw new NotImplementedException();
+ }
+
+ ///
+ /// Check for a dialog with the key 'undefined', and remove it
+ ///
+ /// Profile to check for dialog in
+ private void CheckForAndRemoveUndefinedDialogues(SptProfile fullProfile)
+ {
+ throw new NotImplementedException();
+ }
+
+ ///
+ ///
+ ///
+ ///
+ private void LogProfileDetails(SptProfile fullProfile)
+ {
+ throw new NotImplementedException();
+ }
+}
\ No newline at end of file
diff --git a/Core/Controllers/HandBookController.cs b/Core/Controllers/HandBookController.cs
new file mode 100644
index 00000000..e12cea12
--- /dev/null
+++ b/Core/Controllers/HandBookController.cs
@@ -0,0 +1,10 @@
+namespace Core.Controllers;
+
+// TODO: This seems unused, is it even needed?
+public class HandBookController
+{
+ public void Load()
+ {
+ throw new NotImplementedException();
+ }
+}
\ No newline at end of file
diff --git a/Core/Controllers/HealthController.cs b/Core/Controllers/HealthController.cs
new file mode 100644
index 00000000..a4cf719c
--- /dev/null
+++ b/Core/Controllers/HealthController.cs
@@ -0,0 +1,68 @@
+using Core.Models.Eft.Common;
+using Core.Models.Eft.Health;
+
+namespace Core.Controllers;
+
+public class HealthController
+{
+ ///
+ /// When healing in menu
+ ///
+ /// Player profile
+ /// Healing request
+ /// Player id
+ /// ItemEventRouterResponse
+ public ItemEventRouterResponse OffRaidHeal(
+ PmcData pmcData,
+ OffraidHealRequestData request,
+ string sessionId)
+ {
+ throw new NotImplementedException();
+ }
+
+ ///
+ /// Handle Eat event
+ /// Consume food/water outside of a raid
+ ///
+ /// Player profile
+ /// Eat request
+ /// Session id
+ /// ItemEventRouterResponse
+ public ItemEventRouterResponse OffRaidEat(
+ PmcData pmcData,
+ OffraidEatRequestData request,
+ string sessionId)
+ {
+ throw new NotImplementedException();
+ }
+
+ ///
+ /// Handle RestoreHealth event
+ /// Occurs on post-raid healing page
+ ///
+ /// player profile
+ /// Request data from client
+ /// Session id
+ ///
+ public ItemEventRouterResponse HealthTreatment(
+ PmcData pmcData,
+ HealthTreatmentRequestData request,
+ string sessionId)
+ {
+ throw new NotImplementedException();
+ }
+
+ ///
+ /// applies skills from hideout workout.
+ ///
+ /// Player profile
+ /// Request data
+ /// session id
+ public void ApplyWorkoutChanges(
+ PmcData pmcData,
+ WorkoutData info,
+ string sessionId)
+ {
+ throw new NotImplementedException();
+ }
+}
\ No newline at end of file