add currency and basic display

This commit is contained in:
Siegfried Krug 2021-01-10 19:32:10 +01:00
parent 5d58803256
commit 45e7400e82
7 changed files with 49 additions and 0 deletions

View file

@ -113,6 +113,10 @@
"DS4.ProfileWeight": "Gewicht",
"DS4.ProfileEyeColor": "Augenfarbe",
"DS4.ProfileSpecialCharacteristics": "Besondere Eigenschaften",
"DS4.CurrencyGold": "Gold",
"DS4.CurrencySilver": "Silber",
"DS4.CurrencyCopper": "Kupfer",
"DS4.Currency": "Währung",
"DS4.WarningManageActiveEffectOnOwnedItem": "Das Verwalten von aktiven Effekten innerhalb eines besessen Items wird derzeit nicht unterstützt und wird in einem nachfolgenden Update hinzugefügt.",
"DS4.ErrorDiceCritOverlap": "Es gibt eine Überlappung zwischen Patzern und Immersiegen.",
"DS4.ErrorExplodingRecursionLimitExceeded": "Die maximale Rekursionstiefe für slayende Würfelwürfe wurde überschritten."

View file

@ -113,6 +113,10 @@
"DS4.ProfileWeight": "Weight",
"DS4.ProfileEyeColor": "Eye Color",
"DS4.ProfileSpecialCharacteristics": "Special Characteristics",
"DS4.CurrencyGold": "Gold",
"DS4.CurrencySilver": "Silver",
"DS4.CurrencyCopper": "Copper",
"DS4.Currency": "Currency",
"DS4.WarningManageActiveEffectOnOwnedItem": "Managing Active Effects within an Owned Item is not currently supported and will be added in a subsequent update.",
"DS4.ErrorDiceCritOverlap": "There's an overlap between Fumbles and Coups",
"DS4.ErrorExplodingRecursionLimitExceeded": "Maximum recursion depth for exploding dice roll exceeded"

View file

@ -6,6 +6,7 @@ export interface DS4ActorDataType {
progression: DS4ActorDataProgression;
language: DS4ActorDataLanguage;
profile: DS4ActorDataProfile;
currency: DS4ActorDataCurrency;
}
interface DS4ActorDataAttributes {
@ -83,3 +84,9 @@ interface DS4ActorDataProfile {
eyeColor: string;
specialCharacteristics: string;
}
interface DS4ActorDataCurrency {
gold: number;
silver: number;
copper: number;
}

View file

@ -188,4 +188,10 @@ export const DS4 = {
eyeColor: "String",
specialCharacteristics: "String",
},
currency: {
gold: "DS4.CurrencyGold",
silver: "DS4.CurrencySilver",
copper: "DS4.CurrencyCopper",
},
};

View file

@ -83,6 +83,7 @@ Hooks.once("setup", function () {
"progression",
"language",
"profile",
"currency",
];
// Exclude some from sorting where the default order matters

View file

@ -107,6 +107,11 @@
"weight": 0,
"eyeColor": "",
"specialCharacteristics": ""
},
"currency": {
"gold": 0,
"silver": 0,
"copper": 0
}
}
},

View file

@ -97,6 +97,28 @@
<div class="tab inventory" data-group="primary" data-tab="inventory">
{{!-- Money --}}
<h4 class="items-list-title">{{localize 'DS4.Currency'}}</h4>
<ol class="items-list">
<li class="item flexrow item-header">
<div class="flex3 item-num-val" title="gold">{{config.currency.gold}}</div>
<div class="flex3 item-num-val" title="silver">{{config.currency.silver}}</div>
<div class="flex3 item-num-val" title="copper">{{config.currency.copper}}</div>
</li>
<li class="item flexrow">
<input class="flex3 item-num-val item-change" data-dtype="Number" type="number" min="0" step="1" data-property="data.currency.copper"
value="{{data.currency.gold}}" title="Gold" />
<input class="flex3 item-num-val item-change" data-dtype="Number" type="number" min="0" step="1" data-property="data.currency.copper"
value="{{data.currency.silver}}" title="Silber" />
<input class="flex3 item-num-val item-change" data-dtype="Number" type="number" min="0" step="1" data-property="data.currency.copper"
value="{{data.currency.copper}}" title="Kupfer" />
</li>
</ol>
</li>
</ol>
{{!-- WEAPONS --}}
<h4 class="items-list-title">{{localize 'DS4.ItemTypeWeaponPlural'}}</h4>
{{!-- {{#if (and (ne itemsByType.weapon undefined) (gt itemsByType.weapon.length 0)) }} --}}