starts cleaning code and also localisation #64
|
|
@ -1 +1,22 @@
|
||||||
{}
|
{
|
||||||
|
"TYPES": {
|
||||||
|
"Actor": {
|
||||||
|
"Character": "Held",
|
||||||
|
"Creature": "Kreatur",
|
||||||
|
"Group": "Heldengruppe",
|
||||||
|
"Merchant": "Händler"
|
||||||
|
},
|
||||||
|
"Item": {
|
||||||
|
"ActiveEffect": "Aktiver Effekt",
|
||||||
|
"Equipment": "Ausrüstungsgegenstand",
|
||||||
|
"Skill": "Talent",
|
||||||
|
"Advantage": "Vor-/Nachteil",
|
||||||
|
"SpecialAbility": "Sonderfertigkeit",
|
||||||
|
"Spell": "Zauber",
|
||||||
|
"Liturgy": "Liturgie",
|
||||||
|
"Species": "Spezies",
|
||||||
|
"Culture": "Kultur",
|
||||||
|
"Profession": "Profession"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
import BaseItem from "./base-item.mjs";
|
import BaseItem from "./baseItem.mjs";
|
||||||
|
|
||||||
const {ArrayField, BooleanField, NumberField, AnyField, StringField, HTMLField} = foundry.data.fields;
|
const {ArrayField, BooleanField, NumberField, AnyField, StringField, HTMLField} = foundry.data.fields;
|
||||||
|
|
||||||
|
|
@ -1,8 +1,15 @@
|
||||||
import BaseItem from "./base-item.mjs";
|
import BaseItem from "./base-item.mjs";
|
||||||
|
|
||||||
const {ArrayField, SchemaField, BooleanField, NumberField, StringField, HTMLField} = foundry.data.fields;
|
const {
|
||||||
|
ArrayField,
|
||||||
|
SchemaField,
|
||||||
|
BooleanField,
|
||||||
|
NumberField,
|
||||||
|
StringField,
|
||||||
|
HTMLField
|
||||||
|
} = foundry.data.fields;
|
||||||
|
|
||||||
export class VornachteileDataModel extends BaseItem {
|
export class AdvantageDataModel extends BaseItem {
|
||||||
|
|
||||||
static defineSchema() {
|
static defineSchema() {
|
||||||
return {
|
return {
|
||||||
|
|
@ -1,6 +1,9 @@
|
||||||
import BaseItem from "./base-item.mjs";
|
import BaseItem from "./base-item.mjs";
|
||||||
|
|
||||||
const {BooleanField, StringField, HTMLField} = foundry.data.fields;
|
const {
|
||||||
|
StringField,
|
||||||
|
HTMLField
|
||||||
|
} = foundry.data.fields;
|
||||||
|
|
||||||
export class CultureDataModel extends BaseItem {
|
export class CultureDataModel extends BaseItem {
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,11 @@
|
||||||
import BaseItem from "./base-item.mjs";
|
import BaseItem from "./base-item.mjs";
|
||||||
import {Equipment} from "../documents/equipment.mjs";
|
|
||||||
|
|
||||||
const {
|
const {
|
||||||
ArrayField, EmbeddedCollectionField, SchemaField, NumberField, StringField, HTMLField
|
ArrayField,
|
||||||
|
SchemaField,
|
||||||
|
NumberField,
|
||||||
|
StringField,
|
||||||
|
HTMLField
|
||||||
} = foundry.data.fields;
|
} = foundry.data.fields;
|
||||||
|
|
||||||
export class EquipmentDataModel extends BaseItem {
|
export class EquipmentDataModel extends BaseItem {
|
||||||
|
|
|
||||||
|
|
@ -3,10 +3,8 @@ const {
|
||||||
ObjectField,
|
ObjectField,
|
||||||
NumberField,
|
NumberField,
|
||||||
StringField,
|
StringField,
|
||||||
EmbeddedDocumentField,
|
|
||||||
DocumentIdField,
|
DocumentIdField,
|
||||||
ArrayField,
|
ArrayField,
|
||||||
ForeignDocumentField
|
|
||||||
} = foundry.data.fields;
|
} = foundry.data.fields;
|
||||||
|
|
||||||
export class GroupDataModel extends foundry.abstract.TypeDataModel {
|
export class GroupDataModel extends foundry.abstract.TypeDataModel {
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,12 @@
|
||||||
import BaseItem from "./base-item.mjs";
|
import BaseItem from "./base-item.mjs";
|
||||||
|
|
||||||
const {BooleanField, NumberField, SchemaField, ArrayField, StringField, HTMLField} = foundry.data.fields;
|
const {
|
||||||
|
NumberField,
|
||||||
|
SchemaField,
|
||||||
|
ArrayField,
|
||||||
|
StringField,
|
||||||
|
HTMLField
|
||||||
|
} = foundry.data.fields;
|
||||||
|
|
||||||
export class LiturgyDataModel extends BaseItem {
|
export class LiturgyDataModel extends BaseItem {
|
||||||
|
|
||||||
|
|
@ -17,14 +23,14 @@ export class LiturgyDataModel extends BaseItem {
|
||||||
wirkungsdauer: new StringField(),
|
wirkungsdauer: new StringField(),
|
||||||
zauberdauer: new StringField(),
|
zauberdauer: new StringField(),
|
||||||
auswirkung: new SchemaField({
|
auswirkung: new SchemaField({
|
||||||
I: new StringField(),
|
I: new HTMLField(),
|
||||||
II: new StringField(),
|
II: new HTMLField(),
|
||||||
III: new StringField(),
|
III: new HTMLField(),
|
||||||
IV: new StringField(),
|
IV: new HTMLField(),
|
||||||
V: new StringField(),
|
V: new HTMLField(),
|
||||||
VI: new StringField(),
|
VI: new HTMLField(),
|
||||||
VII: new StringField(),
|
VII: new HTMLField(),
|
||||||
VIII: new StringField(),
|
VIII: new HTMLField(),
|
||||||
})
|
})
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,11 +1,9 @@
|
||||||
const {
|
const {
|
||||||
SchemaField,
|
SchemaField,
|
||||||
NumberField,
|
NumberField,
|
||||||
ObjectField,
|
|
||||||
StringField,
|
StringField,
|
||||||
HTMLField,
|
HTMLField,
|
||||||
FilePathField,
|
FilePathField,
|
||||||
DocumentIdField,
|
|
||||||
ArrayField,
|
ArrayField,
|
||||||
} = foundry.data.fields;
|
} = foundry.data.fields;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,10 @@
|
||||||
import BaseItem from "./base-item.mjs";
|
import BaseItem from "./base-item.mjs";
|
||||||
|
|
||||||
const {BooleanField, StringField, HTMLField} = foundry.data.fields;
|
const {
|
||||||
|
BooleanField,
|
||||||
|
StringField,
|
||||||
|
HTMLField
|
||||||
|
} = foundry.data.fields;
|
||||||
|
|
||||||
export class ProfessionDataModel extends BaseItem {
|
export class ProfessionDataModel extends BaseItem {
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,6 @@
|
||||||
import BaseItem from "./base-item.mjs";
|
import BaseItem from "./base-item.mjs";
|
||||||
|
|
||||||
const {
|
const {
|
||||||
BooleanField,
|
|
||||||
DocumentIdField,
|
DocumentIdField,
|
||||||
ArrayField,
|
ArrayField,
|
||||||
NumberField,
|
NumberField,
|
||||||
|
|
|
||||||
|
|
@ -1,14 +1,12 @@
|
||||||
import BaseItem from "./base-item.mjs";
|
import BaseItem from "./base-item.mjs";
|
||||||
|
|
||||||
const {
|
const {
|
||||||
AnyField,
|
|
||||||
BooleanField,
|
BooleanField,
|
||||||
NumberField,
|
NumberField,
|
||||||
SchemaField,
|
SchemaField,
|
||||||
ArrayField,
|
ArrayField,
|
||||||
StringField,
|
StringField,
|
||||||
HTMLField,
|
HTMLField,
|
||||||
ObjectField
|
|
||||||
} = foundry.data.fields;
|
} = foundry.data.fields;
|
||||||
|
|
||||||
export class SpecialAbilityDataModel extends BaseItem {
|
export class SpecialAbilityDataModel extends BaseItem {
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,12 @@
|
||||||
import BaseItem from "./base-item.mjs";
|
import BaseItem from "./base-item.mjs";
|
||||||
|
|
||||||
const {BooleanField, ArrayField, SchemaField, NumberField, StringField, HTMLField} = foundry.data.fields;
|
const {
|
||||||
|
ArrayField,
|
||||||
|
SchemaField,
|
||||||
|
NumberField,
|
||||||
|
StringField,
|
||||||
|
HTMLField
|
||||||
|
} = foundry.data.fields;
|
||||||
|
|
||||||
export class SpeciesDataModel extends BaseItem {
|
export class SpeciesDataModel extends BaseItem {
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,12 @@
|
||||||
import BaseItem from "./base-item.mjs";
|
import BaseItem from "./base-item.mjs";
|
||||||
|
|
||||||
const {BooleanField, NumberField, SchemaField, ArrayField, StringField, HTMLField} = foundry.data.fields;
|
const {
|
||||||
|
BooleanField,
|
||||||
|
NumberField,
|
||||||
|
ArrayField,
|
||||||
|
StringField,
|
||||||
|
HTMLField
|
||||||
|
} = foundry.data.fields;
|
||||||
|
|
||||||
export class SpellDataModel extends BaseItem {
|
export class SpellDataModel extends BaseItem {
|
||||||
|
|
||||||
|
|
@ -14,7 +20,7 @@ export class SpellDataModel extends BaseItem {
|
||||||
hauszauber: new BooleanField(),
|
hauszauber: new BooleanField(),
|
||||||
technik: new StringField(),
|
technik: new StringField(),
|
||||||
zauberdauer: new StringField(),
|
zauberdauer: new StringField(),
|
||||||
wirkung: new StringField(),
|
wirkung: new HTMLField(),
|
||||||
kosten: new StringField(),
|
kosten: new StringField(),
|
||||||
zielobjekt: new StringField(),
|
zielobjekt: new StringField(),
|
||||||
reichweite: new StringField({required: true}),
|
reichweite: new StringField({required: true}),
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,9 @@
|
||||||
import {LiturgyData} from "../data/miracle/liturgydata.mjs";
|
|
||||||
import {Talent} from "../data/talent.mjs";
|
|
||||||
import {ATTRIBUTE, ATTRIBUTE_DESCRIPTIONS} from "../data/attribute.mjs";
|
import {ATTRIBUTE, ATTRIBUTE_DESCRIPTIONS} from "../data/attribute.mjs";
|
||||||
|
|
||||||
const {ApplicationV2, HandlebarsApplicationMixin} = foundry.applications.api
|
const {
|
||||||
|
ApplicationV2,
|
||||||
|
HandlebarsApplicationMixin
|
||||||
|
} = foundry.applications.api
|
||||||
|
|
||||||
export class AttributeDialog extends HandlebarsApplicationMixin(ApplicationV2) {
|
export class AttributeDialog extends HandlebarsApplicationMixin(ApplicationV2) {
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,9 @@
|
||||||
import {ActionManager} from "../sheets/actions/action-manager.mjs";
|
|
||||||
import {Talent} from "../data/talent.mjs";
|
import {Talent} from "../data/talent.mjs";
|
||||||
|
|
||||||
const {ApplicationV2, HandlebarsApplicationMixin} = foundry.applications.api
|
const {
|
||||||
|
ApplicationV2,
|
||||||
|
HandlebarsApplicationMixin
|
||||||
|
} = foundry.applications.api
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -179,7 +181,7 @@ export class BattleDialog extends HandlebarsApplicationMixin(ApplicationV2) {
|
||||||
|
|
||||||
async _prepareContext(options) {
|
async _prepareContext(options) {
|
||||||
const context = await super._prepareContext(options)
|
const context = await super._prepareContext(options)
|
||||||
context.actors = game.actors.filter(actor => actor.type === "character" || actor.type === "creature")
|
context.actors = game.actors.filter(actor => actor.type === "Character" || actor.type === "Creature")
|
||||||
|
|
||||||
context.offenseTalent = this._offenseTalent ?? ''
|
context.offenseTalent = this._offenseTalent ?? ''
|
||||||
context.offenseTalents = {}
|
context.offenseTalents = {}
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,9 @@
|
||||||
import {ActionManager} from "../sheets/actions/action-manager.mjs";
|
import {ActionManager} from "../sheets/actions/action-manager.mjs";
|
||||||
|
|
||||||
const {ApplicationV2, HandlebarsApplicationMixin} = foundry.applications.api
|
const {
|
||||||
|
ApplicationV2,
|
||||||
|
HandlebarsApplicationMixin
|
||||||
|
} = foundry.applications.api
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -55,32 +58,52 @@ export class CombatActionDialog extends HandlebarsApplicationMixin(ApplicationV2
|
||||||
this._weaponId = null
|
this._weaponId = null
|
||||||
this._defenseManeuverId = null
|
this._defenseManeuverId = null
|
||||||
this._actionManager = new ActionManager(this._actor)
|
this._actionManager = new ActionManager(this._actor)
|
||||||
|
CombatActionDialog._instance = this
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static _instance = null
|
||||||
|
|
||||||
|
|
||||||
static async #onSelectTarget(event, target) {
|
|
||||||
|
async #processOnSelectTarget(event, target) {
|
||||||
const {targetId} = target.dataset
|
const {targetId} = target.dataset
|
||||||
this._targetId = this._targetId === targetId ? null : targetId
|
this._targetId = this._targetId === targetId ? null : targetId
|
||||||
this.render({parts: ["form"]})
|
this.render({parts: ["form"]})
|
||||||
}
|
}
|
||||||
|
|
||||||
static async #onSelectManeuver(event, target) {
|
static async #onSelectTarget(event, target) {
|
||||||
|
event.preventDefault()
|
||||||
|
CombatActionDialog._instance.#processOnSelectTarget(event, target)
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
async #processOnSelectManeuver(event, target) {
|
||||||
const {maneuverId} = target.dataset
|
const {maneuverId} = target.dataset
|
||||||
this._defenseManeuverId = this._defenseManeuverId === maneuverId ? null : maneuverId
|
this._defenseManeuverId = this._defenseManeuverId === maneuverId ? null : maneuverId
|
||||||
this.render({parts: ["form"]})
|
this.render({parts: ["form"]})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static async #onSelectWeaponAndSkill(event, target) {
|
static async #onSelectManeuver(event, target) {
|
||||||
|
event.preventDefault()
|
||||||
|
CombatActionDialog._instance.#processOnSelectManeuver(event, target)
|
||||||
|
}
|
||||||
|
|
||||||
|
async #processOnSelectWeaponAndSkill(event, target) {
|
||||||
const {weaponId, skillId} = target.dataset
|
const {weaponId, skillId} = target.dataset
|
||||||
this._weaponId = this._weaponId === weaponId ? null : weaponId
|
this._weaponId = this._weaponId === weaponId ? null : weaponId
|
||||||
this._skillId = this._skillId === skillId ? null : skillId
|
this._skillId = this._skillId === skillId ? null : skillId
|
||||||
this.render({parts: ["form"]})
|
this.render({parts: ["form"]})
|
||||||
}
|
}
|
||||||
|
|
||||||
static async #onSubmitForm(event, form, formData) {
|
|
||||||
|
static async #onSelectWeaponAndSkill(event, target) {
|
||||||
event.preventDefault()
|
event.preventDefault()
|
||||||
const maneuver = this.#evaluateManeuvers().find(p => p.id === this._defenseManeuverId)
|
CombatActionDialog._instance.#processOnSelectWeaponAndSkill(event, target)
|
||||||
|
}
|
||||||
|
|
||||||
|
async #processOnSubmitForm(event, form, formData) {
|
||||||
|
const maneuver = CombatActionDialog._instance.#evaluateManeuvers().find(p => p.id === this._defenseManeuverId)
|
||||||
const weapon = this._actor.itemTypes["Equipment"].find(p => p._id === this._weaponId)
|
const weapon = this._actor.itemTypes["Equipment"].find(p => p._id === this._weaponId)
|
||||||
const skill = this._actor.itemTypes["Skill"].find(p => p._id === this._skillId)
|
const skill = this._actor.itemTypes["Skill"].find(p => p._id === this._skillId)
|
||||||
const target = game.actors.get(game.scenes.current.tokens.find(p => p._id === this._targetId).actorId)
|
const target = game.actors.get(game.scenes.current.tokens.find(p => p._id === this._targetId).actorId)
|
||||||
|
|
@ -129,6 +152,12 @@ export class CombatActionDialog extends HandlebarsApplicationMixin(ApplicationV2
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static async #onSubmitForm(event, form, formData) {
|
||||||
|
event.preventDefault()
|
||||||
|
|
||||||
|
CombatActionDialog._instance.#processOnSubmitForm(event, form, formData)
|
||||||
|
}
|
||||||
|
|
||||||
_configureRenderOptions(options) {
|
_configureRenderOptions(options) {
|
||||||
super._configureRenderOptions(options)
|
super._configureRenderOptions(options)
|
||||||
if (options.window) {
|
if (options.window) {
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,9 @@
|
||||||
import {ActionManager} from "../sheets/actions/action-manager.mjs";
|
import {ActionManager} from "../sheets/actions/action-manager.mjs";
|
||||||
|
|
||||||
const {ApplicationV2, HandlebarsApplicationMixin} = foundry.applications.api
|
const {
|
||||||
|
ApplicationV2,
|
||||||
|
HandlebarsApplicationMixin
|
||||||
|
} = foundry.applications.api
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,10 @@
|
||||||
import {LiturgyData} from "../data/miracle/liturgydata.mjs";
|
import {LiturgyData} from "../data/miracle/liturgydata.mjs";
|
||||||
import {Talent} from "../data/talent.mjs";
|
import {Talent} from "../data/talent.mjs";
|
||||||
|
|
||||||
const {ApplicationV2, HandlebarsApplicationMixin} = foundry.applications.api
|
const {
|
||||||
|
ApplicationV2,
|
||||||
|
HandlebarsApplicationMixin
|
||||||
|
} = foundry.applications.api
|
||||||
|
|
||||||
export class LiturgyDialog extends HandlebarsApplicationMixin(ApplicationV2) {
|
export class LiturgyDialog extends HandlebarsApplicationMixin(ApplicationV2) {
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,7 @@
|
||||||
import {XmlImport} from "../xml-import/xml-import.mjs";
|
const {
|
||||||
|
ApplicationV2,
|
||||||
const {ApplicationV2, HandlebarsApplicationMixin} = foundry.applications.api
|
HandlebarsApplicationMixin
|
||||||
|
} = foundry.applications.api
|
||||||
|
|
||||||
export class RestingDialog extends HandlebarsApplicationMixin(ApplicationV2) {
|
export class RestingDialog extends HandlebarsApplicationMixin(ApplicationV2) {
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,10 @@ import {LiturgyData} from "../data/miracle/liturgydata.mjs";
|
||||||
import {Talent} from "../data/talent.mjs";
|
import {Talent} from "../data/talent.mjs";
|
||||||
import {ATTRIBUTE} from "../data/attribute.mjs";
|
import {ATTRIBUTE} from "../data/attribute.mjs";
|
||||||
|
|
||||||
const {ApplicationV2, HandlebarsApplicationMixin} = foundry.applications.api
|
const {
|
||||||
|
ApplicationV2,
|
||||||
|
HandlebarsApplicationMixin
|
||||||
|
} = foundry.applications.api
|
||||||
|
|
||||||
export class TalentDialog extends HandlebarsApplicationMixin(ApplicationV2) {
|
export class TalentDialog extends HandlebarsApplicationMixin(ApplicationV2) {
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,9 @@
|
||||||
import {XmlImport} from "../xml-import/xml-import.mjs";
|
import {XmlImport} from "../xml-import/xml-import.mjs";
|
||||||
|
|
||||||
const {ApplicationV2, HandlebarsApplicationMixin} = foundry.applications.api
|
const {
|
||||||
|
ApplicationV2,
|
||||||
|
HandlebarsApplicationMixin
|
||||||
|
} = foundry.applications.api
|
||||||
|
|
||||||
export class XmlImportDialog extends HandlebarsApplicationMixin(ApplicationV2) {
|
export class XmlImportDialog extends HandlebarsApplicationMixin(ApplicationV2) {
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -26,7 +26,7 @@ export class Character extends Actor {
|
||||||
*/
|
*/
|
||||||
prepareDerivedData() {
|
prepareDerivedData() {
|
||||||
|
|
||||||
if (this.type === "character") {
|
if (this.type === "Character") {
|
||||||
const actorData = this;
|
const actorData = this;
|
||||||
const systemData = actorData.system;
|
const systemData = actorData.system;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -5,12 +5,10 @@ function weight(money) {
|
||||||
const stone = Math.floor(baseValue / 1000)
|
const stone = Math.floor(baseValue / 1000)
|
||||||
const remainder = baseValue - (stone * 1000)
|
const remainder = baseValue - (stone * 1000)
|
||||||
const ounces = remainder / 25
|
const ounces = remainder / 25
|
||||||
let stoneRepresentation = ''
|
|
||||||
let ouncesRepresentation = ''
|
|
||||||
|
|
||||||
return {
|
return {
|
||||||
stone: stoneRepresentation,
|
stone,
|
||||||
ounces: ouncesRepresentation,
|
ounces,
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -41,9 +41,9 @@ function initDocumentClasses(config) {
|
||||||
|
|
||||||
function initDataModels(config) {
|
function initDataModels(config) {
|
||||||
config.Actor.dataModels = {
|
config.Actor.dataModels = {
|
||||||
character: PlayerCharacterDataModel,
|
Character: PlayerCharacterDataModel,
|
||||||
group: GroupDataModel,
|
Group: GroupDataModel,
|
||||||
creature: CreatureDataModel,
|
Creature: CreatureDataModel,
|
||||||
Merchant: MerchantDataModel,
|
Merchant: MerchantDataModel,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -16,15 +16,15 @@ import {MerchantSheet} from "../sheets/merchantSheet.mjs";
|
||||||
function setUpActorSheets(registry) {
|
function setUpActorSheets(registry) {
|
||||||
|
|
||||||
registry.registerSheet('dsa41.character', CharacterSheet, {
|
registry.registerSheet('dsa41.character', CharacterSheet, {
|
||||||
types: ["character"],
|
types: ["Character"],
|
||||||
makeDefault: true,
|
makeDefault: true,
|
||||||
})
|
})
|
||||||
registry.registerSheet('dsa41.creature', CreatureSheet, {
|
registry.registerSheet('dsa41.creature', CreatureSheet, {
|
||||||
types: ["creature"],
|
types: ["Creature"],
|
||||||
makeDefault: true,
|
makeDefault: true,
|
||||||
})
|
})
|
||||||
registry.registerSheet('dsa41.group', GroupSheet, {
|
registry.registerSheet('dsa41.group', GroupSheet, {
|
||||||
types: ["group"],
|
types: ["Group"],
|
||||||
makeDefault: true,
|
makeDefault: true,
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -11,14 +11,12 @@ import {CombatActionDialog} from "../dialog/combatAction.mjs";
|
||||||
import {ActionManager} from "./actions/action-manager.mjs";
|
import {ActionManager} from "./actions/action-manager.mjs";
|
||||||
import {DefenseActionDialog} from "../dialog/defenseAction.mjs";
|
import {DefenseActionDialog} from "../dialog/defenseAction.mjs";
|
||||||
import {RestingDialog} from "../dialog/restingDialog.mjs";
|
import {RestingDialog} from "../dialog/restingDialog.mjs";
|
||||||
import {Character} from "../documents/character.mjs";
|
|
||||||
import {LiturgyDialog} from "../dialog/liturgyDialog.mjs";
|
import {LiturgyDialog} from "../dialog/liturgyDialog.mjs";
|
||||||
import {TalentDialog} from "../dialog/talentDialog.mjs";
|
import {TalentDialog} from "../dialog/talentDialog.mjs";
|
||||||
import {AttributeDialog} from "../dialog/attributeDialog.mjs";
|
import {AttributeDialog} from "../dialog/attributeDialog.mjs";
|
||||||
|
|
||||||
const {HandlebarsApplicationMixin, DocumentSheetV2} = foundry.applications.api
|
const {HandlebarsApplicationMixin, DocumentSheetV2} = foundry.applications.api
|
||||||
const {ActorSheetV2} = foundry.applications.sheets
|
const {ActorSheetV2} = foundry.applications.sheets
|
||||||
const {ContextMenu} = foundry.applications.ux
|
|
||||||
|
|
||||||
|
|
||||||
class CharacterSheet extends HandlebarsApplicationMixin(ActorSheetV2) {
|
class CharacterSheet extends HandlebarsApplicationMixin(ActorSheetV2) {
|
||||||
|
|
|
||||||
|
|
@ -1,16 +1,5 @@
|
||||||
const {DocumentSheetV2, HandlebarsApplicationMixin} = foundry.applications.api
|
const {DocumentSheetV2, HandlebarsApplicationMixin} = foundry.applications.api
|
||||||
|
|
||||||
/**
|
|
||||||
* @typedef ApplicationTab
|
|
||||||
* @property {string} id
|
|
||||||
* @property {string} group
|
|
||||||
* @property {boolean} active
|
|
||||||
* @property {string} cssClass
|
|
||||||
* @property {string} [label]
|
|
||||||
* @property {string} [icon]
|
|
||||||
* @property {string} [tooltip]
|
|
||||||
*/
|
|
||||||
|
|
||||||
export class EquipmentSheet extends HandlebarsApplicationMixin(DocumentSheetV2) {
|
export class EquipmentSheet extends HandlebarsApplicationMixin(DocumentSheetV2) {
|
||||||
|
|
||||||
/** @inheritDoc */
|
/** @inheritDoc */
|
||||||
|
|
|
||||||
|
|
@ -106,7 +106,7 @@ export class GroupSheet extends HandlebarsApplicationMixin(ActorSheetV2) {
|
||||||
}
|
}
|
||||||
|
|
||||||
async #onUpdateCharacterSettings(data) {
|
async #onUpdateCharacterSettings(data) {
|
||||||
if (data.type === "character") {
|
if (data.type === "Character") {
|
||||||
|
|
||||||
// update group
|
// update group
|
||||||
let settings = {...this.document.system.settings}
|
let settings = {...this.document.system.settings}
|
||||||
|
|
@ -265,10 +265,10 @@ export class GroupSheet extends HandlebarsApplicationMixin(ActorSheetV2) {
|
||||||
// Update Group Members when either an Actor was moved into the linked Folder or removed from the linked Folder
|
// Update Group Members when either an Actor was moved into the linked Folder or removed from the linked Folder
|
||||||
Hooks.on('updateActor', (data) => {
|
Hooks.on('updateActor', (data) => {
|
||||||
if (data._id !== this.document._id) { // dont update yourself when you update yourself... baka!
|
if (data._id !== this.document._id) { // dont update yourself when you update yourself... baka!
|
||||||
if (data.type === "character" && data.folder?._id === this.document.system.groupId) {
|
if (data.type === "Character" && data.folder?._id === this.document.system.groupId) {
|
||||||
this.#onUpdateCharacterSettings(data)
|
this.#onUpdateCharacterSettings(data)
|
||||||
this.render()
|
this.render()
|
||||||
} else if (data.type === "character") {
|
} else if (data.type === "Character") {
|
||||||
this.render()
|
this.render()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -89,7 +89,7 @@ export class MerchantSheet extends HandlebarsApplicationMixin(ActorSheetV2) {
|
||||||
const item = this.document.items.get(itemId)
|
const item = this.document.items.get(itemId)
|
||||||
|
|
||||||
let selections = ''
|
let selections = ''
|
||||||
game.actors.filter(p => p.isOwner && p.type === "character").forEach(actor => {
|
game.actors.filter(p => p.isOwner && p.type === "Character").forEach(actor => {
|
||||||
selections += `<option value=${actor.id}>${actor.name}</option>`
|
selections += `<option value=${actor.id}>${actor.name}</option>`
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -182,9 +182,9 @@
|
||||||
],
|
],
|
||||||
"documentTypes": {
|
"documentTypes": {
|
||||||
"Actor": {
|
"Actor": {
|
||||||
"creature": {},
|
"Creature": {},
|
||||||
"group": {},
|
"Group": {},
|
||||||
"character": {
|
"Character": {
|
||||||
"numberFields": [
|
"numberFields": [
|
||||||
"groesse",
|
"groesse",
|
||||||
"alter",
|
"alter",
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue