summaryrefslogtreecommitdiff
path: root/mappings.js
diff options
context:
space:
mode:
authorschneefux <schneefux+commit@schneefux.xyz>2017-06-12 15:50:39 +0200
committerschneefux <schneefux+commit@schneefux.xyz>2017-06-12 15:50:39 +0200
commit5728d5af42984bca49e30528d77c15169e4bcce0 (patch)
tree4b73ae9bf6026d130062e6a5d4ceb11eff0e8fde /mappings.js
parentc5cd9e53d7413ce960a2170eedb466073175bf80 (diff)
downloadorm-5728d5af42984bca49e30528d77c15169e4bcce0.tar.gz
orm-5728d5af42984bca49e30528d77c15169e4bcce0.zip
2.7.0 phase changesrelease/2.7.0
Diffstat (limited to 'mappings.js')
-rw-r--r--mappings.js20
1 files changed, 20 insertions, 0 deletions
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
+};