From 1e5c4a7f6a734352f802c82b293fe3b215e3a5b2 Mon Sep 17 00:00:00 2001 From: Northstar Date: Wed, 20 Dec 2023 15:20:02 +0100 Subject: Format project --- NorthstarDLL/mods/autodownload/moddownloader.h | 4 ++-- NorthstarDLL/mods/modmanager.h | 26 +++++++++++++------------- NorthstarDLL/mods/modsavefiles.h | 4 ++-- 3 files changed, 17 insertions(+), 17 deletions(-) (limited to 'NorthstarDLL/mods') diff --git a/NorthstarDLL/mods/autodownload/moddownloader.h b/NorthstarDLL/mods/autodownload/moddownloader.h index 747b3c01..5302c21e 100644 --- a/NorthstarDLL/mods/autodownload/moddownloader.h +++ b/NorthstarDLL/mods/autodownload/moddownloader.h @@ -1,6 +1,6 @@ class ModDownloader { - private: +private: const char* VERIFICATION_FLAG = "-disablemodverification"; const char* CUSTOM_MODS_URL_FLAG = "-customverifiedurl="; const char* STORE_URL = "https://gcdn.thunderstore.io/live/repository/packages/"; @@ -70,7 +70,7 @@ class ModDownloader */ void ExtractMod(fs::path modPath); - public: +public: ModDownloader(); /** diff --git a/NorthstarDLL/mods/modmanager.h b/NorthstarDLL/mods/modmanager.h index c141414f..233f004d 100644 --- a/NorthstarDLL/mods/modmanager.h +++ b/NorthstarDLL/mods/modmanager.h @@ -19,7 +19,7 @@ const std::set MODS_BLACKLIST = {"Mod Settings"}; struct ModConVar { - public: +public: std::string Name; std::string DefaultValue; std::string HelpString; @@ -28,7 +28,7 @@ struct ModConVar struct ModConCommand { - public: +public: std::string Name; std::string Function; std::string HelpString; @@ -38,7 +38,7 @@ struct ModConCommand struct ModScriptCallback { - public: +public: ScriptContext Context; // called before the codecallback is executed @@ -51,7 +51,7 @@ struct ModScriptCallback struct ModScript { - public: +public: std::string Path; std::string RunOn; @@ -61,14 +61,14 @@ struct ModScript // these are pretty much identical, could refactor to use the same stuff? struct ModVPKEntry { - public: +public: bool m_bAutoLoad; std::string m_sVpkPath; }; struct ModRpakEntry { - public: +public: bool m_bAutoLoad; std::string m_sPakName; std::string m_sLoadAfterPak; @@ -76,7 +76,7 @@ struct ModRpakEntry class Mod { - public: +public: // runtime stuff bool m_bEnabled = true; bool m_bWasReadSuccessfully = false; @@ -127,10 +127,10 @@ class Mod std::unordered_map DependencyConstants; std::vector PluginDependencyConstants; - public: +public: Mod(fs::path modPath, char* jsonBuf); - private: +private: void ParseConVars(rapidjson_document& json); void ParseConCommands(rapidjson_document& json); void ParseScripts(rapidjson_document& json); @@ -142,14 +142,14 @@ class Mod struct ModOverrideFile { - public: +public: Mod* m_pOwningMod; fs::path m_Path; }; class ModManager { - private: +private: bool m_bHasLoadedMods = false; bool m_bHasEnabledModsCfg; rapidjson_document m_EnabledModsCfg; @@ -159,13 +159,13 @@ class ModManager size_t m_hPdefHash; size_t m_hKBActHash; - public: +public: std::vector m_LoadedMods; std::unordered_map m_ModFiles; std::unordered_map m_DependencyConstants; std::unordered_set m_PluginDependencyConstants; - public: +public: ModManager(); void LoadMods(); void UnloadMods(); diff --git a/NorthstarDLL/mods/modsavefiles.h b/NorthstarDLL/mods/modsavefiles.h index a50fe62c..f9d39723 100644 --- a/NorthstarDLL/mods/modsavefiles.h +++ b/NorthstarDLL/mods/modsavefiles.h @@ -4,13 +4,13 @@ bool ContainsInvalidChars(std::string str); class SaveFileManager { - public: +public: template void SaveFileAsync(fs::path file, std::string content); template int LoadFileAsync(fs::path file); template void DeleteFileAsync(fs::path file); // Future proofed in that if we ever get multi-threaded SSDs this code will take advantage of them. std::mutex fileMutex; - private: +private: int m_iLastRequestHandle = 0; }; -- cgit v1.2.3