npc, unnatural sorting by column working better
This commit is contained in:
+1
-1
@@ -457,7 +457,7 @@ explicitly define a number of rows, rather than columns. */
|
||||
}
|
||||
|
||||
.deltagreen .skill-and-training-controls {
|
||||
flex: 0 0 80px;
|
||||
flex: 0 0 35px;
|
||||
}
|
||||
|
||||
.deltagreen .action-pill {
|
||||
|
||||
@@ -79,16 +79,28 @@ export default class DeltaGreenActorSheet extends ActorSheet {
|
||||
skill.sortLabel = skill.label;
|
||||
}
|
||||
|
||||
sortedSkills.push(skill);
|
||||
if (
|
||||
!(
|
||||
(this.actor.type == "npc" || this.actor.type == "unnatural") &&
|
||||
this.actor.system.showUntrainedSkills == true &&
|
||||
skill.proficiency < 1
|
||||
)
|
||||
) {
|
||||
sortedSkills.push(skill);
|
||||
}
|
||||
}
|
||||
|
||||
//console.log(sortedSkills);
|
||||
|
||||
sortedSkills.sort(function (a, b) {
|
||||
return a.sortLabel.localeCompare(b.sortLabel, game.i18n.lang);
|
||||
});
|
||||
|
||||
this.actor.system.sortedSkills = sortedSkills;
|
||||
if (game.settings.get("deltagreen", "sortSkills")) {
|
||||
let columnSortedSkills = this.reorderForColumnSorting(sortedSkills, 3);
|
||||
|
||||
this.actor.system.sortedSkills = columnSortedSkills;
|
||||
} else {
|
||||
this.actor.system.sortedSkills = sortedSkills;
|
||||
}
|
||||
|
||||
// Prepare a simplified version of the special training for display on sheet.
|
||||
if (this.actor.type !== "vehicle") {
|
||||
|
||||
@@ -96,9 +96,9 @@
|
||||
<span>{{localize "DG.Sheet.BlockHeaders.SkillsAndTraining"}}</span>
|
||||
</div>
|
||||
|
||||
<div class="grid grid-3col {{#if sortSkillsSetting}}grid-13row{{/if}}">
|
||||
<div class="grid grid-3col">
|
||||
{{#each actor.system.sortedSkills as |skill key|}}
|
||||
<div class="flexrow flex-group-center flex-thin-border">
|
||||
<div class="flexrow flex-group-left flex-thin-border">
|
||||
<label class="{{if_gt skill.proficiency 0 'rollable' 'not-rollable'}} skill-label" data-key="{{skill.key}}" data-rolltype="skill" for="system.skills.{{skill.key}}.value"
|
||||
{{#if skill.proficiency}}title="{{localize 'DG.Tooltip.SkillLabel'}}"{{/if}}
|
||||
{{#unless skill.proficiency}}title="{{localize 'DG.Tooltip.CannotRollSkillLabel'}}"{{/unless}}
|
||||
|
||||
@@ -97,11 +97,11 @@
|
||||
<i class="far fa-eye{{#if actor.system.showUntrainedSkills}}-slash{{/if}}"></i>
|
||||
</a>
|
||||
</div>
|
||||
<div class="grid grid-3col {{#if sortSkillsSetting}}grid-13row{{/if}}">
|
||||
<div class="grid grid-3col">
|
||||
{{#each actor.system.sortedSkills as |skill key|}}
|
||||
|
||||
{{#if (hideSkillBasedOnProficiencyAndUserChoice ../actor.system.showUntrainedSkills skill.proficiency)}}
|
||||
<div class="flexrow flex-group-center flex-thin-border">
|
||||
<div class="flexrow flex-group-left flex-thin-border">
|
||||
<label class="{{if_gt skill.proficiency 0 'rollable' 'not-rollable'}} skill-label" data-rolltype="skill" data-key="{{skill.key}}" for="system.skills.{{skill.key}}.value"
|
||||
{{#if skill.proficiency}}title="{{localize 'DG.Tooltip.SkillLabel'}}"{{/if}}
|
||||
{{#unless skill.proficiency}}title="{{localize 'DG.Tooltip.CannotRollSkillLabel'}}"{{/unless}}
|
||||
|
||||
@@ -8,9 +8,10 @@
|
||||
<div class="grid-2col">
|
||||
|
||||
{{#each actor.system.sortedCustomSkills as |skill|}}
|
||||
|
||||
{{#if_eq type "typeSkill"}}
|
||||
{{log skill}}
|
||||
<div class="item flexrow flex-group-center flex-thin-border">
|
||||
|
||||
<div class="item flexrow flex-group-left flex-thin-border">
|
||||
<div class="flexrow">
|
||||
<label class="{{if_gt skill.proficiency 0 'rollable' 'not-rollable'}} skill-label" data-key="{{skill.key}}" data-rolltype="skill" data-roll="d100" data-target="{{skill.proficiency}}" data-label="{{skill.label}}"
|
||||
{{#if skill.proficiency}}title="{{localize 'DG.Tooltip.SkillLabel'}}"{{/if}}
|
||||
@@ -29,19 +30,24 @@
|
||||
<a class="item-control typed-skill-delete" title="Delete Skill"><i class="fas fa-trash" data-typedskill="{{skill.key}}" ></i></a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{{/if_eq}}
|
||||
|
||||
{{#if_eq type "training"}}
|
||||
<div class="item flexrow flex-group-center flex-thin-border special-training-box">
|
||||
<label class="{{if_gt skill.targetNumber 0 'rollable' 'not-rollable'}}" data-key="{{skill.key}}" data-name="{{skill.name}}" data-rolltype="special-training">
|
||||
{{skill.name}} ({{skill.attribute}}, {{skill.targetNumber}}%)
|
||||
<i class="fas fa-dice"></i>
|
||||
</label>
|
||||
<div class="item-controls skill-and-training-controls">
|
||||
<a class="item-control special-training-action" data-action="Edit" data-id="{{skill.id}}" title="Edit Training"><i class="fas fa-edit"></i></a>
|
||||
<a class="item-control special-training-delete" title="Delete Training" data-id="{{skill.id}}" ><i class="fas fa-trash"></i></a>
|
||||
|
||||
<div class="item flexrow flex-group-left flex-thin-border special-training-box">
|
||||
<div class="flexrow">
|
||||
<label class="{{if_gt skill.targetNumber 0 'rollable' 'not-rollable'}}" data-key="{{skill.key}}" data-name="{{skill.name}}" data-rolltype="special-training">
|
||||
{{skill.name}} ({{skill.attribute}}, {{skill.targetNumber}}%)
|
||||
<i class="fas fa-dice"></i>
|
||||
</label>
|
||||
<div class="item-controls skill-and-training-controls">
|
||||
<a class="item-control special-training-action" data-action="Edit" data-id="{{skill.id}}" title="Edit Training"><i class="fas fa-edit"></i></a>
|
||||
<a class="item-control special-training-delete" title="Delete Training" data-id="{{skill.id}}" ><i class="fas fa-trash"></i></a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{{/if_eq}}
|
||||
|
||||
{{/each}}
|
||||
|
||||
Reference in New Issue
Block a user