diff options
author | Tor Andersson <tor@ccxvii.net> | 2021-06-23 12:28:57 +0200 |
---|---|---|
committer | Tor Andersson <tor@ccxvii.net> | 2022-11-16 19:19:38 +0100 |
commit | feb3ab2f33cbac726a14aa37ef68ce9cec21131e (patch) | |
tree | 3390e36c67727d62eed1086ff501ecc62ef93c0b | |
parent | 1b85d5997e8416674e345c439d379229d74e44ff (diff) | |
download | crusader-rex-feb3ab2f33cbac726a14aa37ef68ce9cec21131e.tar.gz |
crusader: Kingdom names in tooltip.
-rw-r--r-- | ui.js | 17 |
1 files changed, 17 insertions, 0 deletions
@@ -11,6 +11,18 @@ const ENGLAND = "England"; const FRANCE = "France"; const GERMANIA = "Germania"; +const KINGDOM = { + "Syria": "Syria", + "Jerusalem": "Kingdom of Jerusalem", + "Antioch": "Principality of Antioch", + "Tripoli": "County of Tripoli", +}; + +const VICTORY_TOWNS = [ + "Aleppo", "Damascus", "Egypt", + "Antioch", "Tripoli", "Acre", "Jerusalem" +]; + let label_layout = window.localStorage['crusader-rex/label-layout'] || 'spread'; function set_spread_layout() { @@ -65,6 +77,11 @@ function on_focus_town(evt) { let text = where; if (where in SHIELDS) text += " \u2014 " + SHIELDS[where].join(", "); + let kingdom = KINGDOM[TOWNS[where].region]; + if (kingdom) + text += " \u2014 " + kingdom; + if (VICTORY_TOWNS.includes(where)) + text += " \u2014 1 VP"; document.getElementById("status").textContent = text; } |