diff options
author | Gabriel Pérez-Cerezo <gabriel@gpcf.eu> | 2017-02-05 16:32:53 +0100 |
---|---|---|
committer | Gabriel Pérez-Cerezo <gabriel@gpcf.eu> | 2017-02-05 16:32:53 +0100 |
commit | 746e328b7b77514d343bfe76922de0244b608278 (patch) | |
tree | e098b101c3ab96239f2827d44b8f8b97b3dc95d1 /advtrains/advtrains_luaautomation/operation_panel.lua | |
parent | bfd24ee43a10ab79674636e9dad725cdba093f63 (diff) | |
parent | 61e48fff280075ec52bfaa31644c22b08814d680 (diff) | |
download | advtrains-746e328b7b77514d343bfe76922de0244b608278.tar.gz advtrains-746e328b7b77514d343bfe76922de0244b608278.tar.bz2 advtrains-746e328b7b77514d343bfe76922de0244b608278.zip |
Merge branch 'master' of https://github.com/orwell96/advtrains
Diffstat (limited to 'advtrains/advtrains_luaautomation/operation_panel.lua')
-rw-r--r-- | advtrains/advtrains_luaautomation/operation_panel.lua | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/advtrains/advtrains_luaautomation/operation_panel.lua b/advtrains/advtrains_luaautomation/operation_panel.lua new file mode 100644 index 0000000..1d585f7 --- /dev/null +++ b/advtrains/advtrains_luaautomation/operation_panel.lua @@ -0,0 +1,23 @@ + +local function on_punch(pos, player) + atlatc.interrupt.add(0, pos, {type="punch", punch=true}) +end + + +minetest.register_node("advtrains_luaautomation:oppanel", { + drawtype = "normal", + tiles={"atlatc_oppanel.png"}, + description = "LuaAutomation operation panel", + groups = { + choppy = 1, + save_in_nodedb=1, + }, + after_place_node = atlatc.active.after_place_node, + after_dig_node = atlatc.active.after_dig_node, + on_receive_fields = atlatc.active.on_receive_fields, + on_punch = on_punch, + luaautomation = { + fire_event=atlatc.active.run_in_env + } + +}) |