diff options
author | Emma Miler <emma.pi@protonmail.com> | 2023-04-11 20:49:16 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-04-11 20:49:16 +0200 |
commit | 450d0b1ed437cf37b4309af952af8904f3f07768 (patch) | |
tree | 3f0fd39b5663b5c3f4b9e76c70cc4987f22d66c7 /NorthstarDLL/mods | |
parent | 72da1da5b4c04ccc1154853a308cab6459c60b79 (diff) | |
download | NorthstarLauncher-450d0b1ed437cf37b4309af952af8904f3f07768.tar.gz NorthstarLauncher-450d0b1ed437cf37b4309af952af8904f3f07768.zip |
Plugin system v2 (#343)
* Some work
* Rewrite gamestate presence
* Add plugin system logger
* Format changes
* Format chjange
* Fix gamestate stuff
* some callback stuff
* move around invite stuff
* move invite to funcs
* fix presence server data
* Actually call InformSQVMCreated
* bruh
* Fix TODO's
* Formatting
* Fix filters
* Add InformDLLLoads
* Fix plugin handle always being 0
* Formatting
* Fix merge issues
* Formatting
* Mods can add files compiled at SQVM init
* Some Small Fixes
* Add changes from review
* Fix load failure
* Add new squirrel functions
* actually call InformSQVMDestroyed
* add CreateObject function
* answers to complaints
* remove snake cases from GameStatePresence
---------
Co-authored-by: cat_or_not <41955154+catornot@users.noreply.github.com>
Diffstat (limited to 'NorthstarDLL/mods')
-rw-r--r-- | NorthstarDLL/mods/modmanager.cpp | 5 | ||||
-rw-r--r-- | NorthstarDLL/mods/modmanager.h | 2 |
2 files changed, 7 insertions, 0 deletions
diff --git a/NorthstarDLL/mods/modmanager.cpp b/NorthstarDLL/mods/modmanager.cpp index bc0cb2ed..0f904bcd 100644 --- a/NorthstarDLL/mods/modmanager.cpp +++ b/NorthstarDLL/mods/modmanager.cpp @@ -241,6 +241,11 @@ Mod::Mod(fs::path modDir, char* jsonBuf) } } + if (modJson.HasMember("InitScript") && modJson["InitScript"].IsString()) + { + initScript = modJson["InitScript"].GetString(); + } + if (modJson.HasMember("Localisation") && modJson["Localisation"].IsArray()) { for (auto& localisationStr : modJson["Localisation"].GetArray()) diff --git a/NorthstarDLL/mods/modmanager.h b/NorthstarDLL/mods/modmanager.h index 369eb07b..a4c72f77 100644 --- a/NorthstarDLL/mods/modmanager.h +++ b/NorthstarDLL/mods/modmanager.h @@ -103,6 +103,8 @@ class Mod std::vector<ModConCommand*> ConCommands; // custom localisation files created by the mod std::vector<std::string> LocalisationFiles; + // custom script init.nut + std::string initScript; // other files: |