From 5728d5af42984bca49e30528d77c15169e4bcce0 Mon Sep 17 00:00:00 2001 From: schneefux Date: Mon, 12 Jun 2017 15:50:39 +0200 Subject: 2.7.0 phase changes --- mappings.js | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 mappings.js (limited to 'mappings.js') diff --git a/mappings.js b/mappings.js new file mode 100644 index 0000000..1da6d6e --- /dev/null +++ b/mappings.js @@ -0,0 +1,20 @@ +#!/usr/bin/node +"use strict"; + +const mappings_source = require("./mappings_source.js"), + mappings = new Map(Object.entries(mappings_source)); + +for (let entry of new Set(Object.values(mappings_source))) { + // add clean name -> clean name + mappings.set(entry, entry); +} + +module.exports = { + map: mappings, + // TODO wtf? + isItem: (str) => str.indexOf("Item") != -1, + isAbility: (str) => str.indexOf("Item") == -1 && + (str.indexOf("Ability") != -1 || + str.indexOf("ABILITY") != -1), + isHero: (str) => str.indexOf("*") != -1 && str.indexOf("Item") == -1 +}; -- cgit v1.3.1