ds4/templates/sheets/actor/components/talent-rank-equation.hbs

46 lines
2 KiB
Handlebars
Raw Normal View History

2021-06-26 22:02:00 +02:00
{{!--
SPDX-FileCopyrightText: 2021 Johannes Loher
SPDX-FileCopyrightText: 2021 Gesina Schwalbe
SPDX-License-Identifier: MIT
--}}
2021-02-26 02:24:00 +01:00
{{!-- ======================================================================== --}}
{{!-- INLINE PARTIAL DEFINITIONS --}}
{{!-- ======================================================================== --}}
2021-02-25 22:22:05 +01:00
{{!--
!-- Render an input element for a rank value property of an item.
!-- @param talentRank: The talentRank
!-- @param property: The key of the property in item.data (if 'base', the max value is set automatically)
!-- @param disabled: If given, is placed plainly into the input as HTML property; meant to be set to "disabled" to
disable the input element
!-- @param localizeString: The string to use as key for the localized tooltip
--}}
{{#*inline "talentRankValue"}}
2021-07-23 00:43:15 +02:00
<input class="ds4-talent-rank-equation__value change-item" data-dtype="Number" type="number" min="0" step="1" {{#if (eq
2021-02-25 22:22:05 +01:00
property 'base' ) }}max="{{talentRank.max}}" {{/if}} {{disabled}} data-property="data.rank.{{property}}"
value="{{lookup talentRank property}}" title="{{localize localizeString}}" />
{{/inline}}
2021-02-26 02:24:00 +01:00
{{!-- ======================================================================== --}}
2021-02-25 22:22:05 +01:00
{{!--
!-- Render an input element for a rank value property of an item.
!-- @param talentRank: The talent rank
--}}
<div class="ds4-talent-rank-equation">
{{!-- acquired rank --}}
{{> talentRankValue talentRank=talentRank property='base' localizeString='DS4.TalentRankBase'}}
<div> ( {{localize "DS4.TalentRankOf"}} </div>
{{!-- maximum acquirable rank --}}
{{> talentRankValue talentRank=talentRank property='max' localizeString='DS4.TalentRankMax'}}
<div>) + </div>
{{!-- additional ranks --}}
{{> talentRankValue talentRank=talentRank property='mod' localizeString='DS4.TalentRankMod'}}
<div> = </div>
{{!-- derived total rank --}}
{{> talentRankValue talentRank=talentRank property='total' localizeString='DS4.TalentRankTotal'
disabled='disabled'}}
</div>