Guest User

games/eternal/eternal.js

a guest
Feb 25th, 2017
168
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function EternalDictionary(config) {
  2.     this.description = this.description + ' - ' + config.description;
  3.     this.language = config.language;
  4.     this.settings = this.settings.concat(config.settings);
  5. };
  6.  
  7. EternalDictionary.prototype = new Dictionary({
  8.     game: 'eternal',
  9.     description: 'Eternal',
  10.     // Settings and initialisation
  11.     settings: [
  12.         {
  13.             'name': 'linkTarget',
  14.             'description': 'Link target:',
  15.             'type': 'string',
  16.             'default': 'http://www.numotgaming.com/cards/<name:simple>'
  17.         },
  18.         {
  19.             'name': 'imageURL',
  20.             'description': 'Image source:',
  21.             'type': 'string',
  22.             'default': 'http://www.numotgaming.com/cards/images/cards/<name:simple>.png'
  23.         }
  24.     ]
  25. });
  26.  
  27. // Override parent functions
  28. EternalDictionary.prototype.simplify = function(s) {
  29.     return s.replace(/ /g, '%20');
  30. };
  31. EternalDictionary.prototype.findCardById = function(cardID, match, isDict) {
  32.     var cardData = this.cardData[cardID];
  33.     if (!cardData) {return}
  34.     return {
  35.         'game': this.game,
  36.         'language': this.language,
  37.         'name': match.replace(/"/g, '`'),
  38.         'match': match,
  39.         'en': cardID,
  40.         'id': cardID,
  41.         // 'link': cardData[0],
  42.         'isDict': isDict || 0
  43.     };
  44. };
  45.  
  46. //==============================================================================
  47. // Individual language(s)
  48. //==============================================================================
  49. if (typeof(AutocardAnywhere) == 'undefined') {AutocardAnywhere = {};}
  50. if (typeof(AutocardAnywhere.games) == 'undefined') {AutocardAnywhere.games = {};}
  51. AutocardAnywhere.games.eternal = {};
  52. // English
  53. AutocardAnywhere.games.eternal.en = new EternalDictionary({
  54.     description: 'English',
  55.     language: 'en',
  56.     settings: [
  57.         {
  58.             'name': 'ignoreDictionaryWords',
  59.             'description': 'Ignore Dictionary Words',
  60.             'type': 'boolean',
  61.             'default': true,
  62.             'controlType': 'checkbox'
  63.         },
  64.         {
  65.             'name': 'emphasiseText',
  66.             'type': 'boolean',
  67.             'default': true
  68.         }
  69.     ]
  70. });
Advertisement
Add Comment
Please, Sign In to add comment