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.
 
 
 

55 lines
1.0 KiB

  1. const events = require('../misc/events');
  2. const tos = require('./tos');
  3. const config = {
  4. logoPath: null,
  5. resourceList: [],
  6. textureList: [
  7. 'tiles',
  8. 'walls',
  9. 'mobs',
  10. 'bosses',
  11. 'animBigObjects',
  12. 'bigObjects',
  13. 'objects',
  14. 'characters',
  15. 'attacks',
  16. 'ui',
  17. 'auras',
  18. 'animChar',
  19. 'animMob',
  20. 'animBoss',
  21. 'white',
  22. 'ray',
  23. 'images/skins/0001.png',
  24. 'images/skins/0010.png',
  25. 'images/skins/0012.png'
  26. ],
  27. //Client components required by mods
  28. // Format: [ 'cpnPath', ... ]
  29. components: [],
  30. uiList: [],
  31. contextMenuActions: {
  32. player: [],
  33. npc: []
  34. },
  35. tos
  36. };
  37. module.exports = {
  38. init: function () {
  39. events.emit('onBeforeGetClientConfig', config);
  40. //Deprecated
  41. events.emit('onBeforeGetResourceList', config.resourceList);
  42. events.emit('onBeforeGetUiList', config.uiList);
  43. events.emit('onBeforeGetContextMenuActions', config.contextMenuActions);
  44. events.emit('onBeforeGetTermsOfService', config.tos);
  45. events.emit('onBeforeGetTextureList', config.textureList);
  46. },
  47. getClientConfig: function (msg) {
  48. msg.callback(config);
  49. }
  50. };