config.lua 4.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108
  1. -- set this to 0 if you want no limit
  2. travelnet.MAX_STATIONS_PER_NETWORK = tonumber(minetest.settings:get("travelnet.MAX_STATIONS_PER_NETWORK")) or 24
  3. -- set this to true if you want a simulated beam effect
  4. travelnet.travelnet_effect_enabled = minetest.settings:get_bool("travelnet.travelnet_effect_enabled", false)
  5. -- set this to true if you want a sound to be played when the travelnet is used
  6. travelnet.travelnet_sound_enabled = minetest.settings:get_bool("travelnet.travelnet_sound_enabled", true)
  7. -- if you set this to false, travelnets cannot be created
  8. -- (this may be useful if you want nothing but the elevators on your server)
  9. travelnet.travelnet_enabled = minetest.settings:get_bool("travelnet.travelnet_enabled", true)
  10. travelnet.travelnet_cleanup_lbm = minetest.settings:get_bool("travelnet.travelnet_cleanup_lbm", false)
  11. -- if you set travelnet.elevator_enabled to false, you will not be able to
  12. -- craft, place or use elevators
  13. travelnet.elevator_enabled = minetest.settings:get_bool("travelnet.elevator_enabled", true)
  14. -- if you set this to false, doors will be disabled
  15. travelnet.doors_enabled = minetest.settings:get_bool("travelnet.doors_enabled", true)
  16. -- starts an abm which re-adds travelnet stations to networks in case the savefile got lost
  17. travelnet.abm_enabled = minetest.settings:get_bool("travelnet.abm_enabled", false)
  18. -- change these if you want other receipes for travelnet or elevator
  19. travelnet.travelnet_recipe = {
  20. { "default:glass", "default:steel_ingot", "default:glass" },
  21. { "default:glass", "default:mese", "default:glass" },
  22. { "default:glass", "default:steel_ingot", "default:glass" }
  23. }
  24. travelnet.elevator_recipe = {
  25. { "default:steel_ingot", "default:glass", "default:steel_ingot" },
  26. { "default:steel_ingot", "", "default:steel_ingot" },
  27. { "default:steel_ingot", "default:glass", "default:steel_ingot" }
  28. }
  29. travelnet.tiles_elevator = {
  30. "travelnet_elevator_front.png",
  31. "travelnet_elevator_inside_controls.png",
  32. "travelnet_elevator_sides_outside.png",
  33. "travelnet_elevator_inside_ceiling.png",
  34. "travelnet_elevator_inside_floor.png",
  35. "travelnet_top.png"
  36. }
  37. travelnet.elevator_inventory_image = "travelnet_elevator_inv.png"
  38. if minetest.registered_nodes["mcl_core:wood"] then
  39. travelnet.travelnet_recipe = {
  40. { "mcl_core:glass", "mcl_core:iron_ingot", "mcl_core:glass" },
  41. { "mcl_core:glass", "mesecons_torch:redstoneblock", "mcl_core:glass" },
  42. { "mcl_core:glass", "mcl_core:iron_ingot", "mcl_core:glass" }
  43. }
  44. travelnet.elevator_recipe = {
  45. { "mcl_core:iron_ingot", "mcl_core:glass", "mcl_core:iron_ingot" },
  46. { "mcl_core:iron_ingot", "", "mcl_core:iron_ingot" },
  47. { "mcl_core:iron_ingot", "mcl_core:glass", "mcl_core:iron_ingot" }
  48. }
  49. end
  50. travelnet.node_box = {
  51. type = "fixed",
  52. fixed = {
  53. {-0.5, -0.5, 0.4375, 0.5, 1.5, 0.5}, -- Back
  54. {-0.5, -0.5, -0.5, -0.4375, 1.5, 0.5}, -- Right
  55. {0.4375, -0.5, -0.5, 0.5, 1.5, 0.5}, -- Left
  56. {-0.5, -0.5, -0.5, 0.5, -0.4375, 0.5}, -- Floor
  57. {-0.5, 1.4375, -0.5, 0.5, 1.5, 0.5}, -- Roof
  58. }
  59. }
  60. -- if this function returns true, the player with the name player_name is
  61. -- allowed to add a box to the network named network_name, which is owned
  62. -- by the player owner_name;
  63. -- if you want to allow *everybody* to attach stations to all nets, let the
  64. -- function always return true;
  65. -- if the function returns false, players with the travelnet_attach priv
  66. -- can still add stations to that network
  67. -- params: player_name, owner_name, network_name
  68. travelnet.allow_attach = function()
  69. return minetest.settings:get_bool("travelnet.allow_attach", false)
  70. end
  71. -- if this returns true, a player named player_name can remove a travelnet station
  72. -- from network_name (owned by owner_name) even though he is neither the owner nor
  73. -- has the travelnet_remove priv
  74. -- params: player_name, owner_name, network_name, pos
  75. travelnet.allow_dig = function()
  76. return minetest.settings:get_bool("travelnet.allow_dig", false)
  77. end
  78. -- if this function returns false, then player player_name will not be allowed to use
  79. -- the travelnet station_name_start on networ network_name owned by owner_name to travel to
  80. -- the station station_name_target on the same network;
  81. -- if this function returns true, the player will be transfered to the target station;
  82. -- you can use this code to i.e. charge the player money for the transfer or to limit
  83. -- usage of stations to players in the same fraction on PvP servers
  84. -- params: player_name, owner_name, network_name, station_name_start, station_name_target
  85. travelnet.allow_travel = function()
  86. return minetest.settings:get_bool("travelnet.allow_travel", true)
  87. end
  88. -- allows an custom attach priv
  89. travelnet.attach_priv = minetest.settings:get("travelnet.attach_priv") or "travelnet_attach"
  90. -- allows an custom remove priv
  91. travelnet.remove_priv = minetest.settings:get("travelnet.remove_priv") or "travelnet_remove"