mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-04-24 00:13:39 +02:00
Formatting
This commit is contained in:
parent
2e6253ee1d
commit
c61c90b372
1 changed files with 14 additions and 12 deletions
|
|
@ -57,21 +57,23 @@ export default class DhActorDirectory extends foundry.applications.sidebar.tabs.
|
||||||
const actor = game.actors.get(li.dataset.entryId);
|
const actor = game.actors.get(li.dataset.entryId);
|
||||||
if (!actor) throw new Error('Unexpected missing actor');
|
if (!actor) throw new Error('Unexpected missing actor');
|
||||||
|
|
||||||
const tiers = [1, 2, 3, 4].filter((t) => t !== actor.system.tier);
|
const tiers = [1, 2, 3, 4].filter(t => t !== actor.system.tier);
|
||||||
const content = document.createElement("div");
|
const content = document.createElement('div');
|
||||||
const select = document.createElement("select");
|
const select = document.createElement('select');
|
||||||
select.name = "tier";
|
select.name = 'tier';
|
||||||
select.append(...tiers.map(t => {
|
select.append(
|
||||||
const option = document.createElement("option");
|
...tiers.map(t => {
|
||||||
option.value = t;
|
const option = document.createElement('option');
|
||||||
option.textContent = game.i18n.localize(`DAGGERHEART.GENERAL.Tiers.${t}`);
|
option.value = t;
|
||||||
return option;
|
option.textContent = game.i18n.localize(`DAGGERHEART.GENERAL.Tiers.${t}`);
|
||||||
}));
|
return option;
|
||||||
|
})
|
||||||
|
);
|
||||||
content.append(select);
|
content.append(select);
|
||||||
|
|
||||||
const tier = await foundry.applications.api.Dialog.input({
|
const tier = await foundry.applications.api.Dialog.input({
|
||||||
classes: ["dh-style", "dialog"],
|
classes: ['dh-style', 'dialog'],
|
||||||
window: { title: 'DAGGERHEART.UI.Sidebar.actorDirectory.pickTierTitle', classes: ["dh-style"] },
|
window: { title: 'DAGGERHEART.UI.Sidebar.actorDirectory.pickTierTitle' },
|
||||||
content,
|
content,
|
||||||
ok: {
|
ok: {
|
||||||
label: 'Create Adversary',
|
label: 'Create Adversary',
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue