Você não pode selecionar mais de 25 tópicos Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.
 
 
 

23 linhas
371 B

  1. let events = require('../misc/events');
  2. module.exports = {
  3. mappings: {
  4. },
  5. init: function () {
  6. events.emit('onBeforeGetFactions', this.mappings);
  7. },
  8. getFaction: function (id) {
  9. let mapping = this.mappings[id];
  10. let faction = null;
  11. if (mapping)
  12. faction = require('./' + mapping);
  13. else
  14. faction = require('./factions/' + id);
  15. return faction;
  16. }
  17. };