4c33607b2b
- Add static calculateItemValueSC() and getItemValueSC() helpers to MournbladeCYD2Utility to centralize currency conversion logic (1 PO = 100 SC, 1 PA = 10 SC) - Refactor computeRichesse() and computeValeurEquipement() in Actor to use shared helpers - Add localizeAllegiance Handlebars helper to display allegiance values localized (tous->Tous, chaos->Chaos, loi->Loi, betes->Bêtes, elementaires->Élémentaires) - Add joinPredilections helper to fix comma display after single Predilection - Create BaseItemWithPriceDataModel base class for items with pricing fields (prixpo, prixca, prixsc, rarete, quantite, equipped) - Update arme, equipement, protection, monnaie models to extend base class - Update actor-sheet and creature-sheet templates to use new helpers - Update partial-item-prix.hbs to display total item value in SC - Add item-base-sheet.hbs template for future item sheet inheritance Fixes: - Allegiance values now display properly localized in Dons & Pactes tabs - Predilections no longer show trailing comma with single entry - Equipment value totals now update correctly when items are added/modified - Currency conversion logic centralized and consistent across the system Generated by Mistral Vibe. Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
36 lines
1.6 KiB
Handlebars
36 lines
1.6 KiB
Handlebars
<li class="flexrow item">
|
|
<label class="generic-label item-field-label-long">Rareté </label>
|
|
<input type="text" class="padd-right numeric-input item-field-label-short" name="system.rarete"
|
|
value="{{system.rarete}}" data-dtype="Number" />
|
|
</li>
|
|
|
|
<li class="flexrow item">
|
|
<label class="generic-label item-field-label-long">Equipé ? </label>
|
|
<input type="checkbox" name="system.equipped" {{checked system.equipped}} />
|
|
</li>
|
|
|
|
<li class="flexrow item">
|
|
<label class="generic-label item-field-label-long">Quantite </label>
|
|
<input type="text" class="padd-right numeric-input item-field-label-short" name="system.quantite"
|
|
value="{{system.quantite}}" data-dtype="Number" />
|
|
</li>
|
|
|
|
<li class="flexrow item">
|
|
<label class="generic-label item-field-label-long">Prix </label>
|
|
|
|
<input type="text" class="numeric-input item-field-label-short" name="system.prixpo" value="{{system.prixpo}}"
|
|
data-dtype="Number" />
|
|
<label class="generic-label item-field-label-short">PO </label>
|
|
|
|
<input type="text" class="numeric-input item-field-label-short" name="system.prixca" value="{{system.prixca}}"
|
|
data-dtype="Number" />
|
|
<label class="generic-label item-field-label-short">PA </label>
|
|
|
|
<input type="text" class="numeric-input item-field-label-short" name="system.prixsc" value="{{system.prixsc}}"
|
|
data-dtype="Number" />
|
|
<label class="generic-label item-field-label-short">SC </label>
|
|
</li>
|
|
<li class="flexrow item">
|
|
<label class="generic-label item-field-label-long">Valeur totale </label>
|
|
<span class="item-field-label-long">{{calculateItemValueSC system.prixpo system.prixca system.prixsc}} SC</span>
|
|
</li> |