mirror of
https://github.com/clusterio/clusterio.git
synced 2026-11-18 07:33:12 +09:00
Add js templates and config templates
This commit is contained in:
23 files changed
+543
-50
No files matched your search
@@ -0,0 +1,24 @@
|
||||
local clusterio_api = require("modules/clusterio/api")
|
||||
|
||||
local MyModule = {
|
||||
events = {},
|
||||
on_nth_tick = {},
|
||||
}
|
||||
|
||||
function MyModule.foo()
|
||||
game.print("foo")
|
||||
end
|
||||
|
||||
MyModule.events[clusterio_api.events.on_server_startup] = function(event)
|
||||
game.print(game.table_to_json(event))
|
||||
end
|
||||
|
||||
MyModule.events[defines.events.on_player_crafted_item] = function(event)
|
||||
game.print(game.table_to_json(event))
|
||||
end
|
||||
|
||||
MyModule.on_nth_tick[300] = function()
|
||||
game.print(game.tick)
|
||||
end
|
||||
|
||||
return MyModule
|
||||
@@ -0,0 +1,12 @@
|
||||
{
|
||||
"name": "// plugin_name //",
|
||||
"load": [
|
||||
"control.lua"
|
||||
],
|
||||
"require": [
|
||||
|
||||
],
|
||||
"dependencies": [
|
||||
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,2 @@
|
||||
|
||||
return require("./control")
|
||||
Reference in new issue
Block a user