init.lua 2.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  1. --[[
  2. Hyperloop Mod
  3. =============
  4. v2.06 by JoSt
  5. Copyright (C) 2017-2021 Joachim Stolberg
  6. LGPLv2.1+
  7. See LICENSE.txt for more information
  8. History:
  9. 2017-06-18 v0.01 First version
  10. 2017-07-06 v0.02 Version on GitHub
  11. 2017-07-07 v0.03 Recipes added, settingstypes added
  12. 2017-07-08 v0.04 Door removal issue fixed
  13. 2017-07-16 v0.05 Doors can be opened manually
  14. 2017-07-24 v0.06 Tubes with limited slope, elevator and deco blocks added
  15. 2017-07-28 v0.07 Slope removed, Station auto-builder added
  16. 2017-07-30 v0.08 Signs added, tube robot added, crowbar added
  17. 2017-07-31 v0.09 Some bug fixes on the Bocking Machine
  18. 2017-08-01 v0.10 Elevator now with sound and travel animation plus minor bug fixes
  19. 2017-08-06 v0.11 Crowbar now allows repairing of illegally detroyed tubes
  20. 2018-03-27 v0.12 Some minor improvements with player position, arrival time,
  21. Wifi node improvements, Podshell cheating bugfix,
  22. forceload_block removed.
  23. 2018-04-13 v0.13 Potential 'Never Store ObjectRefs' bug fixed
  24. 2018-10-27 v1.00 Release
  25. 2018-10-27 v2.00 Switched to lubelib2 for shafts and tubes
  26. 2018-12-16 v2.01 Adapted to lubelib2 v0.5
  27. 2018-12-20 v2.02 Intllib support added, bugs fixed
  28. 2019-03-23 v2.03 Elevator duplication bugfix
  29. 2020-01-03 v2.04 Elevator door bugfix (MT 5+)
  30. 2020-03-12 v2.05 minetest translator added (thanks to acmgit/Clyde)
  31. 2020-06-14 v2.06 The default value for `hyperloop_free_tube_placement_enabled` is now true
  32. 2021-02-07 v2.07 tube_crowbar: Add tube length check
  33. 2021-11-01 v2.08 Enable the use of hyperloop networks for other mods
  34. ]]--
  35. vents = {}
  36. vents.player_pos = {}
  37. -- Version for compatibility checks, see history
  38. vents.version = 2.08
  39. if minetest.get_translator ~= nil then
  40. vents.S = minetest.get_translator(minetest.get_current_modname())
  41. else
  42. -- Load support for intllib.
  43. local MP = minetest.get_modpath('vents')
  44. vents.S, vents.NS = dofile(MP..'/intllib.lua')
  45. end
  46. -- MT 5.4 new string mode
  47. vents.CLIP = minetest.features.use_texture_alpha_string_modes and 'clip' or false
  48. vents.BLEND = minetest.features.use_texture_alpha_string_modes and 'blend' or true
  49. if tubelib2.version < 1.7 then
  50. error('Vents requires tubelib2 version 1.7 or newer!!!')
  51. else
  52. -- Configuration settings
  53. vents.free_tube_placement_enabled = minetest.settings:get_bool('vents_free_tube_placement_enabled', true)
  54. vents.subnet_enabled = minetest.settings:get_bool('vents_subnet_enabled', true)
  55. dofile(minetest.get_modpath('vents') .. '/network.lua')
  56. dofile(minetest.get_modpath('vents') .. '/data_base.lua')
  57. dofile(minetest.get_modpath('vents') .. '/utils.lua')
  58. dofile(minetest.get_modpath('vents') .. '/tube.lua')
  59. dofile(minetest.get_modpath('vents') .. '/tubecrowbar.lua')
  60. dofile(minetest.get_modpath('vents') .. '/junction.lua')
  61. dofile(minetest.get_modpath('vents') .. '/station.lua')
  62. end