46 lines
1.7 KiB
Lua
46 lines
1.7 KiB
Lua
-- VARIOUS MISC ADVENTURETEST RELATED STUFF
|
|
adventuretest = {}
|
|
|
|
adventuretest.seed = os.time()
|
|
|
|
local enable_blood
|
|
if minetest.setting_get("enable_blood") ~= nil then
|
|
enable_blood = minetest.setting_getbool("enable_blood") or true
|
|
end
|
|
|
|
game_origin = nil
|
|
if minetest.setting_get("game_origin") ~= nil then
|
|
game_origin = minetest.string_to_pos(minetest.setting_get("game_origin"))
|
|
else
|
|
game_origin = {x=0,y=3,z=0}
|
|
end
|
|
|
|
adventuretest.blood = enable_blood
|
|
|
|
-- check for minetest 5.x compatibility and mantains backguard 4.X/0.4
|
|
local is_57 = minetest.has_feature("get_light_data_buffer")
|
|
local is_56 = minetest.has_feature("particlespawner_tweenable")
|
|
local is_55 = minetest.has_feature("dynamic_add_media_table")
|
|
local is_54 = minetest.has_feature("direct_velocity_on_players")
|
|
local is_53 = minetest.has_feature("object_step_has_moveresult")
|
|
local is_52 = minetest.has_feature("pathfinder_works")
|
|
local is_51 = minetest.has_feature("httpfetch_binary_data")
|
|
local is_50 = minetest.has_feature("object_use_texture_alpha")
|
|
local is_04 = minetest.has_feature("area_store_custom_ids")
|
|
local is_40 = minetest.has_feature("add_entity_with_staticdata")
|
|
-- expose api check of minetest version compatibility, 40 is 4.0.17+ and 0.4 is 0.4.14 to 0.4.17.1
|
|
adventuretest.is_57 = is_57
|
|
adventuretest.is_56 = is_56
|
|
adventuretest.is_55 = is_55
|
|
adventuretest.is_54 = is_54
|
|
adventuretest.is_53 = is_53
|
|
adventuretest.is_52 = is_52
|
|
adventuretest.is_51 = is_51
|
|
adventuretest.is_50 = is_50
|
|
adventuretest.is_04 = is_04
|
|
adventuretest.is_40 = is_40
|
|
|
|
dofile(minetest.get_modpath("adventuretest").."/functions.lua");
|
|
dofile(minetest.get_modpath("adventuretest").."/register_functions.lua");
|
|
dofile(minetest.get_modpath("adventuretest").."/privs.lua")
|