Unify two rmgen and GUI JSON file loading script functions, refs #4868.

Revert the introduction of the exact copies of FileExists ReadJSONFile
functions in MapGenerator.cpp introduced by 871ed04521.
Include JSInterface_VFS.cpp from MapGenerator.cpp to remove that code
while gaining the other missing VFS file loading functions in rmgen/.
Split RegisterScriptFunctions of JSInterface_VFS.cpp from eb4e66aab3
into RegisterReadOnlyScriptFunctions and RegisterWriteScriptFunctions to
prevent unintentional write access.

This was SVN commit r20507.
This commit is contained in:
elexis
2017-11-24 17:19:16 +00:00
parent 7a17a3152c
commit 4275a8a33c
4 changed files with 11 additions and 20 deletions
+2 -1
View File
@@ -65,6 +65,7 @@ void GuiScriptingInit(ScriptInterface& scriptInterface)
JSI_SavedGame::RegisterScriptFunctions(scriptInterface);
JSI_Simulation::RegisterScriptFunctions(scriptInterface);
JSI_Sound::RegisterScriptFunctions(scriptInterface);
JSI_VFS::RegisterScriptFunctions(scriptInterface);
JSI_VFS::RegisterReadOnlyScriptFunctions(scriptInterface);
JSI_VFS::RegisterWriteScriptFunctions(scriptInterface);
JSI_VisualReplay::RegisterScriptFunctions(scriptInterface);
}