From 6565a944615b6c2756a82e8b2c21fcdf121e3eb5 Mon Sep 17 00:00:00 2001 From: oilboi <47129783+oilboi@users.noreply.github.com> Date: Sat, 30 May 2020 00:02:38 -0400 Subject: [PATCH] Add version sending --- init.lua | 3 +++ version_send.lua | 3 +++ 2 files changed, 6 insertions(+) create mode 100644 version_send.lua diff --git a/init.lua b/init.lua index 33dcc3a..cde4606 100644 --- a/init.lua +++ b/init.lua @@ -6,6 +6,7 @@ player_movement_state = nil nether = nil aether = nil name = nil +version_channel = nil function initialize_all() --declare globals for now @@ -15,6 +16,7 @@ function initialize_all() player_movement_state = minetest.mod_channel_join(name..":player_movement_state") nether = minetest.mod_channel_join(name..":nether_teleporters") aether = minetest.mod_channel_join(name..":aether_teleporters") + version_channel = minetest.mod_channel_join(name..":client_version_channel") --next we load everything seperately because it's easier to work on individual files than have everything jammed into one file --not into seperate mods because that is unnecessary and cumbersome @@ -26,6 +28,7 @@ function initialize_all() dofile(path.."/aether.lua") dofile(path.."/waila.lua") dofile(path.."/music_handling.lua") + dofile(path.."/version_send.lua") end --we must delay initialization until the player exists in the world diff --git a/version_send.lua b/version_send.lua new file mode 100644 index 0000000..5fd4e64 --- /dev/null +++ b/version_send.lua @@ -0,0 +1,3 @@ +minetest.after(0,function() + version_channel:send_all("0.5000") +end) \ No newline at end of file -- 2.44.0