forked from xziino/ff14-mitigator
Planer: Gantt-Zeilenreihenfolge auf Healer → DPS → Tank geändert
Innerhalb DPS: Phys. Range (BRD/MCH/DNC) → Caster (BLM/SMN/RDM/PCT) → Melee (MNK/DRG/NIN/SAM/RPR/VPR). Sortierung unabhängig von der Reihenfolge der Job-Slots im Info-Panel. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
bb4eb301e0
commit
eecab6d76a
@ -599,11 +599,23 @@ function timelineScale(plan) {
|
|||||||
return { duration, width: Math.max(720, Math.ceil(duration / 1000 * pxPerSecond)) };
|
return { duration, width: Math.max(720, Math.ceil(duration / 1000 * pxPerSecond)) };
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Sortierreihenfolge im Gantt: Healer → Phys.Range → Caster → Melee → Tank
|
||||||
|
const JOB_GANTT_ORDER = {
|
||||||
|
'WHM': 0, 'SCH': 1, 'AST': 2, 'SGE': 3,
|
||||||
|
'BRD': 10, 'MCH': 11, 'DNC': 12,
|
||||||
|
'BLM': 20, 'SMN': 21, 'RDM': 22, 'PCT': 23,
|
||||||
|
'MNK': 30, 'DRG': 31, 'NIN': 32, 'SAM': 33, 'RPR': 34, 'VPR': 35,
|
||||||
|
'PLD': 40, 'WAR': 41, 'DRK': 42, 'GNB': 43,
|
||||||
|
};
|
||||||
|
|
||||||
function timelinePlayerRows(plan) {
|
function timelinePlayerRows(plan) {
|
||||||
const roster = plan.playerRoster ?? [];
|
const roster = plan.playerRoster ?? [];
|
||||||
const rows = [];
|
const rows = [];
|
||||||
(plan.jobComposition ?? []).forEach((job, idx) => {
|
const jobEntries = (plan.jobComposition ?? [])
|
||||||
if (!job) return;
|
.map((job, idx) => ({ job, idx }))
|
||||||
|
.filter(e => !!e.job)
|
||||||
|
.sort((a, b) => (JOB_GANTT_ORDER[a.job] ?? 99) - (JOB_GANTT_ORDER[b.job] ?? 99));
|
||||||
|
jobEntries.forEach(({ job, idx }) => {
|
||||||
const name = roster[idx]?.name ?? '';
|
const name = roster[idx]?.name ?? '';
|
||||||
const role = JOB_ROLE[job] ?? '';
|
const role = JOB_ROLE[job] ?? '';
|
||||||
const abilities = (JOB_ABILITIES[job] ?? [])
|
const abilities = (JOB_ABILITIES[job] ?? [])
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user