mirror of
https://github.com/clusterio/clusterio.git
synced 2026-11-16 15:30:41 +09:00
Add on_server_startup event
Add startup event to the Clusterio module API which is raised at startup of a Factorio server. This is to server as a replacement for the on_init and on_configuration_changed events which cannot be used in modules. Adds clusterio_patch_number global from the patcher in order to implement this. This is a number that's incremented every time the save is patched.
This commit is contained in:
1 parent
b8fb73f863
commit
892c803496
6 files changed
+46
-9
No files matched your search
@@ -52,6 +52,7 @@ describe("lib/factorio", function() {
|
||||
let reference = [
|
||||
'-- Auto generated scenario module loader created by Clusterio',
|
||||
'-- Modifications to this file will be lost when loaded in Clusterio',
|
||||
'clusterio_patch_number = 1',
|
||||
'',
|
||||
'local event_handler = require("event_handler")',
|
||||
'',
|
||||
@@ -64,6 +65,7 @@ describe("lib/factorio", function() {
|
||||
'',
|
||||
].join('\n');
|
||||
let patchInfo = {
|
||||
"patch_number": 1,
|
||||
"scenario": { "modules": ["foo"] },
|
||||
"modules": [{
|
||||
"name": "spam",
|
||||
|
||||
Reference in new issue
Block a user