1 --first we join the necessary channels so the mod can "listen" to what the server says and "talk" to it
2 weather_intake = minetest.mod_channel_join("weather_intake")
3 weather = minetest.mod_channel_join("weather_nodes")
4 weather_type = minetest.mod_channel_join("weather_type")
5 running_send = minetest.mod_channel_join("running_send")
6 player_movement_state = minetest.mod_channel_join("player.player_movement_state")
9 local function initialize_all()
10 --first we tell the server we're ready
11 weather_intake:send_all("READY")
12 weather_intake:leave()
13 weather_intake = nil --leave the channel
15 --next we load everything seperately because it's easier to work on individual files than have everything jammed into one file
16 --not into seperate mods because that is unnecessary and cumbersome
17 local path = minetest.get_modpath("crafter_client")
18 dofile(path.."/player_input.lua")
19 dofile(path.."/weather_handling.lua")
20 dofile(path.."/environment_effects.lua")
23 --we must delay initialization until the player's camera exists in the world
24 --since there does not seem to be any client_loaded function
25 local initialize = false
26 minetest.register_globalstep(function(dtime)
27 if not initialize and minetest.camera and not vector.equals(minetest.camera:get_pos(),vector.new(0,0,0)) then