init.lua 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124
  1. local S = minetest.get_translator("block_league")
  2. local modpath = minetest.get_modpath("block_league")
  3. local srcpath = modpath .. "/src"
  4. local version = "0.5.0-dev"
  5. block_league = {}
  6. dofile(modpath .. "/GLOBALS.lua")
  7. arena_lib.register_minigame("block_league", {
  8. prefix = "[Block League] ",
  9. teams = { S("orange"), S("blue") },
  10. teams_color_overlay = { "orange", "blue"},
  11. camera_offset = {
  12. nil,
  13. {x=8, y=4, z=-1}
  14. },
  15. hotbar = {
  16. slots = 4,
  17. background_image = "bl_gui_hotbar.png"
  18. },
  19. time_mode = "decremental",
  20. join_while_in_progress = true,
  21. load_time = 6,
  22. celebration_time = 5,
  23. in_game_physics = {
  24. speed = block_league.SPEED,
  25. jump = 1.5,
  26. gravity = 1.15,
  27. sneak_glitch = true,
  28. new_move = true
  29. },
  30. disabled_damage_types = {"fall", "punch"},
  31. properties = {
  32. -- 1 = Touchdown
  33. -- 2 = Deathmatch
  34. mode = 1,
  35. score_cap = 5,
  36. immunity_time = 6,
  37. goal_orange = {},
  38. goal_blue = {},
  39. waiting_room_orange = {},
  40. waiting_room_blue = {},
  41. ball_spawn = {},
  42. min_y = 0
  43. },
  44. temp_properties = {
  45. weapons_disabled = true,
  46. },
  47. team_properties = {
  48. TDs = 0,
  49. kills = 0,
  50. deaths = 0
  51. },
  52. player_properties = {
  53. energy = 100,
  54. TDs = 0,
  55. points = 0,
  56. entering_time = 0,
  57. weapons_magazine = {}
  58. }
  59. })
  60. -- load other scripts
  61. dofile(srcpath .. "/achievements.lua")
  62. dofile(srcpath .. "/chatcmdbuilder.lua")
  63. dofile(srcpath .. "/commands.lua")
  64. dofile(srcpath .. "/database_manager.lua")
  65. dofile(srcpath .. "/exp_manager.lua")
  66. dofile(srcpath .. "/input_manager.lua")
  67. dofile(srcpath .. "/player_manager.lua")
  68. dofile(srcpath .. "/privs.lua")
  69. dofile(srcpath .. "/utils.lua")
  70. -- arena_lib
  71. dofile(srcpath .. "/arena_lib/arena_manager.lua")
  72. dofile(srcpath .. "/arena_lib/arena_timer.lua")
  73. -- debug
  74. dofile(srcpath .. "/debug/debug.lua")
  75. dofile(srcpath .. "/debug/testkit.lua")
  76. -- HUD
  77. dofile(srcpath .. "/HUD/hud_achievements.lua")
  78. dofile(srcpath .. "/HUD/hud_broadcast.lua")
  79. dofile(srcpath .. "/HUD/hud_bullets.lua")
  80. dofile(srcpath .. "/HUD/hud_critical.lua")
  81. dofile(srcpath .. "/HUD/hud_energy.lua")
  82. dofile(srcpath .. "/HUD/hud_info_panel.lua")
  83. dofile(srcpath .. "/HUD/hud_inputs.lua")
  84. dofile(srcpath .. "/HUD/hud_log.lua")
  85. dofile(srcpath .. "/HUD/hud_scoreboard.lua")
  86. dofile(srcpath .. "/HUD/hud_spectate.lua")
  87. -- abstract weapons
  88. dofile(srcpath .. "/weapons/bullets.lua")
  89. dofile(srcpath .. "/weapons/weapons.lua")
  90. dofile(srcpath .. "/weapons/weapons_utils.lua")
  91. -- weapons
  92. dofile(srcpath .. "/weapons/bouncer.lua")
  93. dofile(srcpath .. "/weapons/grenade_launcher.lua")
  94. dofile(srcpath .. "/weapons/pixelgun.lua")
  95. dofile(srcpath .. "/weapons/rocket_launcher.lua")
  96. dofile(srcpath .. "/weapons/sword.lua")
  97. dofile(srcpath .. "/weapons/smg.lua")
  98. -- modes
  99. dofile(srcpath .. "/modes/game_main.lua")
  100. dofile(srcpath .. "/modes/TD/ball.lua")
  101. -- misc
  102. dofile(srcpath .. "/misc/energy.lua")
  103. dofile(srcpath .. "/misc/immunity.lua")
  104. block_league.init_storage()
  105. minetest.log("action", "[BLOCK_LEAGUE] Mod initialised, running version " .. version)