]> git.lizzy.rs Git - crafter_client.git/commitdiff
Add version sending
authoroilboi <47129783+oilboi@users.noreply.github.com>
Sat, 30 May 2020 04:02:38 +0000 (00:02 -0400)
committeroilboi <47129783+oilboi@users.noreply.github.com>
Sat, 30 May 2020 04:02:38 +0000 (00:02 -0400)
init.lua
version_send.lua [new file with mode: 0644]

index 33dcc3a4750578d6d659903d2453ba4669c68834..cde460646d16743fae1337209092e7834c0ecbbe 100644 (file)
--- 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 (file)
index 0000000..5fd4e64
--- /dev/null
@@ -0,0 +1,3 @@
+minetest.after(0,function()
+    version_channel:send_all("0.5000")
+end)
\ No newline at end of file