Fortune: Fix indenting in character sheet code
When moving this part of the code to a dedicated function, the IDE "helpfully" "fixed" the indentation, making the organization of this part of the code less clear. Re-introduce the indentation to make the structure clearer.
This commit is contained in:
parent
67d4b0387a
commit
6d4c5b74dc
1 changed files with 23 additions and 23 deletions
|
@ -67,30 +67,30 @@ function character_sheet_fortune(app, html) {
|
|||
|
||||
let fortune_div = document.createElement("div")
|
||||
fortune_div.classList.add("flex-group-center", "resource-content")
|
||||
let fortune_label = document.createElement("span")
|
||||
fortune_label.classList.add("resource-label-l")
|
||||
let fortune_icon = document.createElement("i")
|
||||
fortune_icon.classList.add("fas", "fa-leaf", "icon")
|
||||
fortune_label.appendChild(fortune_icon)
|
||||
fortune_label.appendChild(document.createTextNode(game.i18n.localize('MF.Fortune.Name')))
|
||||
let fortune_label = document.createElement("span")
|
||||
fortune_label.classList.add("resource-label-l")
|
||||
let fortune_icon = document.createElement("i")
|
||||
fortune_icon.classList.add("fas", "fa-leaf", "icon")
|
||||
fortune_label.appendChild(fortune_icon)
|
||||
fortune_label.appendChild(document.createTextNode(game.i18n.localize('MF.Fortune.Name')))
|
||||
fortune_div.appendChild(fortune_label)
|
||||
let fortune_data_div = document.createElement("div")
|
||||
fortune_data_div.classList.add("buttons-inc")
|
||||
let fortune_input = foundry.applications.fields.createNumberInput({
|
||||
/*
|
||||
* By setting the name of the field using this format, the backing
|
||||
* flag will automatically be picked up by Foundry's code and updated
|
||||
* when the field is changed on the sheet.
|
||||
* This works even if it wasn't set previously !
|
||||
*/
|
||||
name: `flags.${MillsFabula.id}.${fortune_flag}`,
|
||||
value: app.document.getFlag(MillsFabula.id, fortune_flag) ?? 0,
|
||||
step: 1,
|
||||
min: 0,
|
||||
type: "number"
|
||||
})
|
||||
fortune_input.classList.add("fp-resource-inputs")
|
||||
fortune_data_div.appendChild(fortune_input)
|
||||
let fortune_data_div = document.createElement("div")
|
||||
fortune_data_div.classList.add("buttons-inc")
|
||||
let fortune_input = foundry.applications.fields.createNumberInput({
|
||||
/*
|
||||
* By setting the name of the field using this format, the backing
|
||||
* flag will automatically be picked up by Foundry's code and updated
|
||||
* when the field is changed on the sheet.
|
||||
* This works even if it wasn't set previously !
|
||||
*/
|
||||
name: `flags.${MillsFabula.id}.${fortune_flag}`,
|
||||
value: app.document.getFlag(MillsFabula.id, fortune_flag) ?? 0,
|
||||
step: 1,
|
||||
min: 0,
|
||||
type: "number"
|
||||
})
|
||||
fortune_input.classList.add("fp-resource-inputs")
|
||||
fortune_data_div.appendChild(fortune_input)
|
||||
fortune_div.appendChild(fortune_data_div)
|
||||
|
||||
fortune_fabula_div.appendChild(fortune_div)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue