Rework module loading

Change module loading to use a module.json file describing the module
and patch in all files in a directory path passed to the patcher instead
of having to pass the files names and their content.  This allows the
specification of which files should be passed to the event_handler lib
and an easy implementation of loading stand alone modules.
This commit is contained in:
Hornwitser committed 2020-01-04 17:34:16 +01:00
1 parent 11992d1839
commit 80bd75ba16
11 files changed
+120 -47

No files matched your search

+1 -1
View File
@@ -59,7 +59,7 @@ describe("lib/factorio", function() {
'event_handler.add_lib(require("foo"))',
'',
'-- Clusterio modules',
'event_handler.add_lib(require("modules/bar"))',
'event_handler.add_lib(require("modules/spam/bar"))',
'',
].join('\n');
let patchInfo = {