]> git.lizzy.rs Git - dragonfireclient.git/blob - builtin/game/features.lua
0af0dc1dafaf153870e783a487830bafad4fae15
[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 }
19
20 function core.has_feature(arg)
21         if type(arg) == "table" then
22                 local missing_features = {}
23                 local result = true
24                 for ftr in pairs(arg) do
25                         if not core.features[ftr] then
26                                 missing_features[ftr] = true
27                                 result = false
28                         end
29                 end
30                 return result, missing_features
31         elseif type(arg) == "string" then
32                 if not core.features[arg] then
33                         return false, {[arg]=true}
34                 end
35                 return true, {}
36         end
37 end