1 --don't crash if not in crafter client
2 for _,r in pairs(minetest.get_csm_restrictions()) do
12 player_movement_state = nil
17 fire_handling_channel = nil
19 function initialize_all()
20 --declare globals for now
21 weather_intake = minetest.mod_channel_join("weather_intake")
22 weather = minetest.mod_channel_join("weather_nodes")
23 weather_type = minetest.mod_channel_join("weather_type")
24 player_movement_state = minetest.mod_channel_join(name..":player_movement_state")
25 nether = minetest.mod_channel_join(name..":nether_teleporters")
26 aether = minetest.mod_channel_join(name..":aether_teleporters")
27 version_channel = minetest.mod_channel_join(name..":client_version_channel")
28 fire_handling_channel = minetest.mod_channel_join(name..":fire_state")
30 --next we load everything seperately because it's easier to work on individual files than have everything jammed into one file
31 --not into seperate mods because that is unnecessary and cumbersome
32 local path = minetest.get_modpath("crafter_client")
33 dofile(path.."/player_input.lua")
34 dofile(path.."/weather_handling.lua")
35 dofile(path.."/environment_effects.lua")
36 dofile(path.."/nether.lua")
37 dofile(path.."/aether.lua")
38 dofile(path.."/waila.lua")
39 dofile(path.."/music_handling.lua")
40 dofile(path.."/version_send.lua")
41 dofile(path.."/colored_names/colored_names.lua")
42 dofile(path.."/fire_handling.lua")
45 --we must delay initialization until the player exists in the world
46 local function recursive_startup_attempt()
47 local ready_to_go = minetest.localplayer
48 if ready_to_go and minetest.get_node_or_nil(minetest.localplayer:get_pos()) then
49 name = minetest.localplayer:get_name()
54 minetest.after(0,function()
55 recursive_startup_attempt()
60 --begin initial attempt
61 recursive_startup_attempt()