mirror of
https://github.com/clusterio/clusterio.git
synced 2026-11-16 07:24:53 +09:00
Add 2.0 support to module template
This commit is contained in:
3 files changed
+42
-18
No files matched your search
@@ -1,11 +1,15 @@
|
||||
local api = require('modules/clusterio/api')
|
||||
local compat = require("modules/clusterio/compat")
|
||||
|
||||
--- @class (exact) EventData.on_server_startup:EventData
|
||||
|
||||
local function check_patch()
|
||||
local script_data = compat.script_data()
|
||||
if script_data.clusterio_patch_number ~= clusterio_patch_number then
|
||||
script_data.clusterio_patch_number = clusterio_patch_number
|
||||
script.raise_event(api.events.on_server_startup, {})
|
||||
script.raise_event(api.events.on_server_startup, {
|
||||
name = api.events.on_server_startup, tick = game.tick
|
||||
})
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
Reference in new issue
Block a user