aboutsummaryrefslogtreecommitdiff
path: root/NorthstarDedicatedTest/scriptsrson.cpp
diff options
context:
space:
mode:
authorBobTheBob <32057864+BobTheBob9@users.noreply.github.com>2021-07-25 04:43:11 +0100
committerBobTheBob <32057864+BobTheBob9@users.noreply.github.com>2021-07-25 04:43:11 +0100
commit153e7f564c4bb1d5da200f2aecdca7c8d1836997 (patch)
tree2d49d5848b57d963e2b1551d55ce336383226fad /NorthstarDedicatedTest/scriptsrson.cpp
parent844e12403400b455fe5df8c2e19145a2ed1a7d45 (diff)
downloadNorthstarLauncher-153e7f564c4bb1d5da200f2aecdca7c8d1836997.tar.gz
NorthstarLauncher-153e7f564c4bb1d5da200f2aecdca7c8d1836997.zip
wasted a day working on something that didn't end up working, rework some modloader code
Diffstat (limited to 'NorthstarDedicatedTest/scriptsrson.cpp')
-rw-r--r--NorthstarDedicatedTest/scriptsrson.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/NorthstarDedicatedTest/scriptsrson.cpp b/NorthstarDedicatedTest/scriptsrson.cpp
index 05386910..1f08e7f1 100644
--- a/NorthstarDedicatedTest/scriptsrson.cpp
+++ b/NorthstarDedicatedTest/scriptsrson.cpp
@@ -2,6 +2,7 @@
#include "modmanager.h"
#include "scriptsrson.h"
#include "filesystem.h"
+#include "squirrel.h"
#include <sstream>
#include <fstream>
@@ -21,11 +22,11 @@ void ModManager::BuildScriptsRson()
{
for (ModScript* script : mod->Scripts)
{
- /* should create something with the format
+ /* should create something with this format for each script
When: "CONTEXT"
Scripts:
[
- "_coolscript.gnut"
+ _coolscript.gnut
]*/
scriptsRson += "When: \"";
@@ -48,4 +49,7 @@ void ModManager::BuildScriptsRson()
overrideFile->owningMod = nullptr;
overrideFile->path = "scripts/vscripts/scripts.rson";
m_modFiles.push_back(overrideFile);
+
+ // todo: for preventing dupe scripts in scripts.rson, we could actually parse when conditions with the squirrel vm, just need a way to get a result out of squirrelmanager.ExecuteCode
+ // this would probably be the best way to do this, imo
} \ No newline at end of file