150 Sheet Changes

@sdenec @lordzeel Sheet Changes required: - New Cog-menu for Ability Scores and Skills to support new config dialog
7 Replies
Calego
Calego3y ago
As far as I know that's all though (haven't updated mine yet, will holler more when i get there)
zeel
zeel3y ago
I have a feeling this might cause me some headaches...
Calego
Calego3y ago
I expect you would be right! I forsee more context menus in your future
Unknown User
Unknown User3y ago
Message Not Public
Sign In & Join Server To View
Calego
Calego3y ago
yeah, tidy's item changes are purely css <:chef_kiss:740293552965156935>
Unknown User
Unknown User3y ago
Message Not Public
Sign In & Join Server To View
Calego
Calego3y ago
Some changes I'm seeing: Localized Currency labels were added at some point. available in the default getData labels.currencies:
{{#each data.currency as |v k|}}
<label class="denomination {{k}}">{{ lookup ../labels.currencies k }}</label>
<input type="text" name="data.currency.{{k}}" value="{{v}}" data-dtype="Number"/>
{{/each}}
{{#each data.currency as |v k|}}
<label class="denomination {{k}}">{{ lookup ../labels.currencies k }}</label>
<input type="text" name="data.currency.{{k}}" value="{{v}}" data-dtype="Number"/>
{{/each}}
Another label proficiency was added in that object too which handles displaying either the prof value or prof die value. Proficiency can be displayed with this:
<span>{{ localize "DND5E.Proficiency" }} {{labels.proficiency}}</span>
<span>{{ localize "DND5E.Proficiency" }} {{labels.proficiency}}</span>
Otherwise the only changes needed are in the addition of the config buttons for attributes and skills. I've put these 1.5.0 specific things behind {{#if}}s with a systemFeatures object in my getData:
sheetData.systemFeatures = {
skillConfig: !foundry.utils.isNewerVersion('1.5.0', systemVersion),
attributeConfig: !foundry.utils.isNewerVersion('1.5.0', systemVersion),
profLabel: !foundry.utils.isNewerVersion('1.5.0', systemVersion),
currencyLabel: !foundry.utils.isNewerVersion('1.5.0', systemVersion),
};
sheetData.systemFeatures = {
skillConfig: !foundry.utils.isNewerVersion('1.5.0', systemVersion),
attributeConfig: !foundry.utils.isNewerVersion('1.5.0', systemVersion),
profLabel: !foundry.utils.isNewerVersion('1.5.0', systemVersion),
currencyLabel: !foundry.utils.isNewerVersion('1.5.0', systemVersion),
};
<div>{{#if systemFeatures.profLabel}}
{{labels.proficiency}}
{{else}}
{{numberFormat data.attributes.prof decimals=0
sign=true}}
{{/if}}</div>
<div>{{#if systemFeatures.profLabel}}
{{labels.proficiency}}
{{else}}
{{numberFormat data.attributes.prof decimals=0
sign=true}}
{{/if}}</div>