]> git.lizzy.rs Git - dragonfireclient.git/blob - builtin/game/features.lua
623f8183b6aa06f19ee07548466257e9188b8f06
[dragonfireclient.git] / builtin / game / features.lua
1 -- Minetest: builtin/features.lua
2
3 core.features = {
4         glasslike_framed = true,
5         nodebox_as_selectionbox = true,
6         get_all_craft_recipes_works = true,
7         use_texture_alpha = true,
8         no_legacy_abms = true,
9         texture_names_parens = true,
10         area_store_custom_ids = true,
11         add_entity_with_staticdata = true,
12         no_chat_message_prediction = true,
13         object_use_texture_alpha = true,
14         object_independent_selectionbox = true,
15         httpfetch_binary_data = true,
16         formspec_version_element = true,
17         area_store_persistent_ids = true,
18         pathfinder_works = true,
19 }
20
21 function core.has_feature(arg)
22         if type(arg) == "table" then
23                 local missing_features = {}
24                 local result = true
25                 for ftr in pairs(arg) do
26                         if not core.features[ftr] then
27                                 missing_features[ftr] = true
28                                 result = false
29                         end
30                 end
31                 return result, missing_features
32         elseif type(arg) == "string" then
33                 if not core.features[arg] then
34                         return false, {[arg]=true}
35                 end
36                 return true, {}
37         end
38 end