From 41396ddd7321ec343f26b92b1568543f4ede5d58 Mon Sep 17 00:00:00 2001 From: Megastruktur Date: Thu, 17 Sep 2020 10:57:52 +0300 Subject: [PATCH] GH-77 - Closes #77 - Adds new "concat" handlebars helper to concat str and var - Adds Short attributes names to use them in layout --- lang/en.json | 3 +++ lang/es.json | 3 +++ lang/ru.json | 3 +++ module/blades.js | 13 +++++++++++++ templates/parts/attributes.html | 2 +- 5 files changed, 23 insertions(+), 1 deletion(-) diff --git a/lang/en.json b/lang/en.json index cd0b60a..7a0f03c 100644 --- a/lang/en.json +++ b/lang/en.json @@ -138,18 +138,21 @@ "BITD.EffectGreat": "Great", "BITD.SkillsInsight": "Insight", + "BITD.SkillsInsightShort": "Insight", "BITD.SkillsHunt": "Hunt", "BITD.SkillsStudy": "Study", "BITD.SkillsSurvey": "Survey", "BITD.SkillsTinker": "Tinker", "BITD.SkillsProwess": "Prowess", + "BITD.SkillsProwessShort": "Prowess", "BITD.SkillsFinesse": "Finesse", "BITD.SkillsProwl": "Prowl", "BITD.SkillsSkirmish": "Skirmish", "BITD.SkillsWreck": "Wreck", "BITD.SkillsResolve": "Resolve", + "BITD.SkillsResolveShort": "Resolve", "BITD.SkillsAttune": "Attune", "BITD.SkillsCommand": "Command", "BITD.SkillsConsort": "Consort", diff --git a/lang/es.json b/lang/es.json index efe52e7..de90711 100644 --- a/lang/es.json +++ b/lang/es.json @@ -138,18 +138,21 @@ "BITD.EffectGreat": "Excelente", "BITD.SkillsInsight": "Perspicacia", + "BITD.SkillsInsightShort": "Per.", "BITD.SkillsHunt": "Cazar", "BITD.SkillsStudy": "Estudiar", "BITD.SkillsSurvey": "Analizar", "BITD.SkillsTinker": "Trastear", "BITD.SkillsProwess": "Destreza", + "BITD.SkillsProwessShort": "Des.", "BITD.SkillsFinesse": "Afinar", "BITD.SkillsProwl": "Acechar", "BITD.SkillsSkirmish": "Pelear", "BITD.SkillsWreck": "Destrozar", "BITD.SkillsResolve": "Voluntad", + "BITD.SkillsResolveShort": "Vol.", "BITD.SkillsAttune": "Armonizar", "BITD.SkillsCommand": "Mandar", "BITD.SkillsConsort": "Socializar", diff --git a/lang/ru.json b/lang/ru.json index dfa5222..196b66e 100644 --- a/lang/ru.json +++ b/lang/ru.json @@ -131,16 +131,19 @@ "BITD.EffectStandard": "Средняя", "BITD.EffectGreat": "Высокая", "BITD.SkillsInsight": "Чутьё", + "BITD.SkillsInsightShort": "Чутьё", "BITD.SkillsHunt": "Охота", "BITD.SkillsStudy": "Изучение", "BITD.SkillsSurvey": "Разведка", "BITD.SkillsTinker": "Ремесло", "BITD.SkillsProwess": "Удаль", + "BITD.SkillsProwessShort": "Удаль", "BITD.SkillsFinesse": "Сноровка", "BITD.SkillsProwl": "Проникновение", "BITD.SkillsSkirmish": "Драка", "BITD.SkillsWreck": "Разрушение", "BITD.SkillsResolve": "Воля", + "BITD.SkillsResolveShort": "Воля", "BITD.SkillsAttune": "Манипулирование", "BITD.SkillsCommand": "Приказ", "BITD.SkillsConsort": "Общение", diff --git a/module/blades.js b/module/blades.js index 9316b8f..5171714 100644 --- a/module/blades.js +++ b/module/blades.js @@ -165,6 +165,19 @@ Hooks.once("init", async function() { return accum; }); + // Concat helper + // https://gist.github.com/adg29/f312d6fab93652944a8a1026142491b1 + // Usage: (concat 'first 'second') + Handlebars.registerHelper('concat', function() { + var outStr = ''; + for(var arg in arguments){ + if(typeof arguments[arg]!='object'){ + outStr += arguments[arg]; + } + } + return outStr; + }); + }); /** diff --git a/templates/parts/attributes.html b/templates/parts/attributes.html index 85081cc..fb826ce 100644 --- a/templates/parts/attributes.html +++ b/templates/parts/attributes.html @@ -5,7 +5,7 @@