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