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