You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

40 lines
640 B

  1. define([
  2. 'globals',
  3. 'server',
  4. 'world/atlas',
  5. 'components/components',
  6. 'leaderboard/leaderboard',
  7. 'security/io',
  8. 'misc/mods'
  9. ], function(
  10. globals,
  11. server,
  12. atlas,
  13. components,
  14. leaderboard,
  15. io,
  16. mods
  17. ) {
  18. return {
  19. init: function() {
  20. io.init(this.onDbReady.bind(this));
  21. },
  22. onDbReady: function() {
  23. setInterval(function() {
  24. global.gc();
  25. }, 60000);
  26. globals.init();
  27. components.init(this.onComponentsReady.bind(this));
  28. },
  29. onComponentsReady: function() {
  30. server.init(this.onServerReady.bind(this));
  31. },
  32. onServerReady: function() {
  33. mods.init();
  34. atlas.init();
  35. leaderboard.init();
  36. }
  37. };
  38. });