From: oilboi <47129783+oilboi@users.noreply.github.com> Date: Sat, 30 May 2020 04:02:38 +0000 (-0400) Subject: Add version sending X-Git-Url: https://git.lizzy.rs/?a=commitdiff_plain;h=6565a944615b6c2756a82e8b2c21fcdf121e3eb5;p=crafter_client.git Add version sending --- 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