Module stuff and fixes on other items
This commit is contained in:
parent
17bfd3eecd
commit
85f4ba0e99
@ -72,6 +72,7 @@ export class Avd12ItemSheet extends ItemSheet {
|
|||||||
limited: this.object.limited,
|
limited: this.object.limited,
|
||||||
options: this.options,
|
options: this.options,
|
||||||
owner: this.document.isOwner,
|
owner: this.document.isOwner,
|
||||||
|
bonusList: Avd12Utility.buildBonusList(),
|
||||||
description: await TextEditor.enrichHTML(this.object.system.description, { async: true }),
|
description: await TextEditor.enrichHTML(this.object.system.description, { async: true }),
|
||||||
isGM: game.user.isGM
|
isGM: game.user.isGM
|
||||||
}
|
}
|
||||||
|
@ -62,6 +62,18 @@ export class Avd12Utility {
|
|||||||
return duplicate(this.shieldSkills)
|
return duplicate(this.shieldSkills)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* -------------------------------------------- */
|
||||||
|
static buildBonusList() {
|
||||||
|
let bonusList = []
|
||||||
|
for(let key in game.system.model.Actor.character.bonus) {
|
||||||
|
let bonuses = game.system.model.Actor.character.bonus[key]
|
||||||
|
for (let bonus in bonuses) {
|
||||||
|
bonusList.push( key + "." + bonus )
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return bonusList
|
||||||
|
}
|
||||||
|
|
||||||
/* -------------------------------------------- */
|
/* -------------------------------------------- */
|
||||||
static async ready() {
|
static async ready() {
|
||||||
const skills = await Avd12Utility.loadCompendium("fvtt-avd12.skills")
|
const skills = await Avd12Utility.loadCompendium("fvtt-avd12.skills")
|
||||||
|
@ -35,7 +35,7 @@
|
|||||||
],
|
],
|
||||||
"title": "AnyVenture D12 RPG",
|
"title": "AnyVenture D12 RPG",
|
||||||
"url": "https://www.uberwald.me/gitea/public/fvtt-avd12",
|
"url": "https://www.uberwald.me/gitea/public/fvtt-avd12",
|
||||||
"version": "10.0.3",
|
"version": "10.0.4",
|
||||||
"download": "https://www.uberwald.me/gitea/public/fvtt-avd12/archive/fvtt-avd12-v10.0.3.zip",
|
"download": "https://www.uberwald.me/gitea/public/fvtt-avd12/archive/fvtt-avd12-v10.0.4.zip",
|
||||||
"background": "systems/fvtt-avd12/images/ui/avd12_welcome_page.webp"
|
"background": "systems/fvtt-avd12/images/ui/avd12_welcome_page.webp"
|
||||||
}
|
}
|
@ -18,18 +18,8 @@
|
|||||||
|
|
||||||
<div class="tab" data-group="primary">
|
<div class="tab" data-group="primary">
|
||||||
<ul>
|
<ul>
|
||||||
<li class="flexrow">
|
|
||||||
<label class="item-field-label-long">Type of trait</label>
|
|
||||||
<select class="item-field-label-long" type="text" name="system.traittype" value="{{system.traittype}}" data-dtype="String">
|
|
||||||
{{#select system.traittype}}
|
|
||||||
<option value="traitonly">Trait only</option>
|
|
||||||
<option value="traitbonus">Trait with bonus or spells</option>
|
|
||||||
{{/select}}
|
|
||||||
</select>
|
|
||||||
</li>
|
|
||||||
|
|
||||||
{{#if (eq system.traittype "traitbonus")}}
|
<li class="flexrow">
|
||||||
<li class="flexrow">
|
|
||||||
<label class="item-field-label-long">Bonus automation</label>
|
<label class="item-field-label-long">Bonus automation</label>
|
||||||
<input type="checkbox" class="item-field-label-short" name="system.computebonus" {{checked system.computebonus}} />
|
<input type="checkbox" class="item-field-label-short" name="system.computebonus" {{checked system.computebonus}} />
|
||||||
</li>
|
</li>
|
||||||
@ -37,14 +27,19 @@
|
|||||||
<li class="flexrow">
|
<li class="flexrow">
|
||||||
|
|
||||||
<label class="item-field-label-long">Bonus path</label>
|
<label class="item-field-label-long">Bonus path</label>
|
||||||
<input type="text" class="item-field-label-medium" name="system.bonusdata" value="{{system.bonusdata}}" data-dtype="String"/>
|
<select class="item-field-label-long" type="text" name="system.bonusdata" value="{{system.bonusdata}}" data-dtype="String">
|
||||||
|
{{#select system.bonusdata}}
|
||||||
|
{{#each bonusList as |bonus idx|}}
|
||||||
|
<option value="{{bonus}}">{{bonus}}</option>
|
||||||
|
{{/each}}
|
||||||
|
{{/select}}
|
||||||
|
</select>
|
||||||
</li>
|
</li>
|
||||||
<li class="flexrow">
|
<li class="flexrow">
|
||||||
<label class="item-field-label-long">Bonus value</label>
|
<label class="item-field-label-long">Bonus value</label>
|
||||||
<input type="text" class="item-field-label-short" name="system.bonusvalue" value="{{system.bonusvalue}}" data-dtype="Number"/>
|
<input type="text" class="item-field-label-short" name="system.bonusvalue" value="{{system.bonusvalue}}" data-dtype="Number"/>
|
||||||
</li>
|
</li>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
{{/if}}
|
|
||||||
|
|
||||||
<li class="flexrow">
|
<li class="flexrow">
|
||||||
<label class="item-field-label-long">Selected</label>
|
<label class="item-field-label-long">Selected</label>
|
||||||
|
Reference in New Issue
Block a user