features.lua 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. core.features = {
  2. glasslike_framed = true,
  3. nodebox_as_selectionbox = true,
  4. get_all_craft_recipes_works = true,
  5. use_texture_alpha = true,
  6. no_legacy_abms = true,
  7. texture_names_parens = true,
  8. area_store_custom_ids = true,
  9. add_entity_with_staticdata = true,
  10. no_chat_message_prediction = true,
  11. object_use_texture_alpha = true,
  12. object_independent_selectionbox = true,
  13. httpfetch_binary_data = true,
  14. formspec_version_element = true,
  15. area_store_persistent_ids = true,
  16. pathfinder_works = true,
  17. object_step_has_moveresult = true,
  18. direct_velocity_on_players = true,
  19. use_texture_alpha_string_modes = true,
  20. degrotate_240_steps = true,
  21. abm_min_max_y = true,
  22. particlespawner_tweenable = true,
  23. dynamic_add_media_table = true,
  24. get_sky_as_table = true,
  25. get_light_data_buffer = true,
  26. mod_storage_on_disk = true,
  27. compress_zstd = true,
  28. sound_params_start_time = true,
  29. physics_overrides_v2 = true,
  30. hud_def_type_field = true,
  31. random_state_restore = true,
  32. after_order_expiry_registration = true,
  33. wallmounted_rotate = true,
  34. item_specific_pointabilities = true,
  35. blocking_pointability_type = true,
  36. dynamic_add_media_startup = true,
  37. dynamic_add_media_filepath = true,
  38. lsystem_decoration_type = true,
  39. item_meta_range = true,
  40. node_interaction_actor = true,
  41. moveresult_new_pos = true,
  42. override_item_remove_fields = true,
  43. hotbar_hud_element = true,
  44. bulk_lbms = true,
  45. abm_without_neighbors = true,
  46. biome_weights = true,
  47. particle_blend_clip = true,
  48. }
  49. function core.has_feature(arg)
  50. if type(arg) == "table" then
  51. local missing_features = {}
  52. local result = true
  53. for ftr in pairs(arg) do
  54. if not core.features[ftr] then
  55. missing_features[ftr] = true
  56. result = false
  57. end
  58. end
  59. return result, missing_features
  60. elseif type(arg) == "string" then
  61. if not core.features[arg] then
  62. return false, {[arg]=true}
  63. end
  64. return true, {}
  65. end
  66. end