aboutsummaryrefslogtreecommitdiff
path: root/advtrains_luaautomation/operation_panel.lua
diff options
context:
space:
mode:
authororwell <orwell@bleipb.de>2025-05-27 21:03:14 +0200
committerorwell <orwell@bleipb.de>2025-05-27 21:03:14 +0200
commit8506dd2825b715293138976a5ad1fa11a46206a7 (patch)
tree1f48c1dc03c3bbc6ed6762bd04d10e543a3a580c /advtrains_luaautomation/operation_panel.lua
parent2a9891577c1b00068cc4ec858c7dc6c5196f0a2b (diff)
parentadc01a0bba29b40278e45c50caa954c435374f7b (diff)
downloadadvtrains-8506dd2825b715293138976a5ad1fa11a46206a7.tar.gz
advtrains-8506dd2825b715293138976a5ad1fa11a46206a7.tar.bz2
advtrains-8506dd2825b715293138976a5ad1fa11a46206a7.zip
Merge branch 'master' into cesky-hvozd
Throw away most of the changes in everything except line_automation. Merge line_automation changes between CH and master
Diffstat (limited to 'advtrains_luaautomation/operation_panel.lua')
-rw-r--r--advtrains_luaautomation/operation_panel.lua29
1 files changed, 29 insertions, 0 deletions
diff --git a/advtrains_luaautomation/operation_panel.lua b/advtrains_luaautomation/operation_panel.lua
new file mode 100644
index 0000000..8e12651
--- /dev/null
+++ b/advtrains_luaautomation/operation_panel.lua
@@ -0,0 +1,29 @@
+local S = atltrans
+
+local function on_punch(pos,node,player)
+ atlatc.interrupt.add(0, pos, {type="punch", punch=true, name=player:get_player_name()})
+end
+
+
+minetest.register_node("advtrains_luaautomation:oppanel", {
+ drawtype = "normal",
+ tiles={"atlatc_oppanel.png"},
+ description = S("LuaATC Operation Panel"),
+ groups = {
+ cracky = 1,
+ save_in_at_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
+ },
+ digiline = {
+ receptor = {},
+ effector = {
+ action = atlatc.active.on_digiline_receive
+ },
+ },
+})