Working on 0.8.x

-dot separator in settings
-mergeObject ns
-added a option to enable/disable custom techs
-removed "foundry-pc-types" as it was absolutely obsolete
-fixed some roll errors (_rolled -> _evaluated)
This commit is contained in:
Vlyan
2021-04-30 17:20:34 +02:00
parent df86ba81e7
commit 93cfe5bb86
35 changed files with 140 additions and 10256 deletions

View File

@@ -25,7 +25,7 @@ export class BaseSheetL5r5e extends ActorSheet {
sheetData.data.dtypes = ["String", "Number", "Boolean"];
sheetData.data.stances = CONFIG.l5r5e.stances;
sheetData.data.techniquesList = CONFIG.l5r5e.techniques;
sheetData.data.techniquesList = game.l5r5e.HelpersL5r5e.getTechniquesList();
// Sort Items by name
sheetData.items.sort((a, b) => {
@@ -49,9 +49,11 @@ export class BaseSheetL5r5e extends ActorSheet {
const out = {};
// Build the list order
[...CONFIG.l5r5e.techniques, ...CONFIG.l5r5e.techniques_school].forEach((tech) => {
out[tech] = [];
});
[...CONFIG.l5r5e.techniques, ...CONFIG.l5r5e.techniques_custom, ...CONFIG.l5r5e.techniques_school].forEach(
(tech) => {
out[tech] = [];
}
);
// Add tech the character knows
sheetData.items.forEach((item) => {

View File

@@ -6,7 +6,7 @@ import { TwentyQuestionsDialog } from "./twenty-questions-dialog.js";
*/
export class CharacterSheetL5r5e extends BaseSheetL5r5e {
static get defaultOptions() {
return mergeObject(super.defaultOptions, {
return foundry.utils.mergeObject(super.defaultOptions, {
classes: ["l5r5e", "sheet", "actor"],
template: CONFIG.l5r5e.paths.templates + "actors/character-sheet.html",
tabs: [

View File

@@ -10,7 +10,7 @@ export class NpcSheetL5r5e extends BaseSheetL5r5e {
static types = ["adversary", "minion"];
static get defaultOptions() {
return mergeObject(super.defaultOptions, {
return foundry.utils.mergeObject(super.defaultOptions, {
classes: ["l5r5e", "sheet", "npc"],
template: CONFIG.l5r5e.paths.templates + "actors/npc-sheet.html",
});

View File

@@ -32,7 +32,7 @@ export class TwentyQuestionsDialog extends FormApplication {
* @override
*/
static get defaultOptions() {
return mergeObject(super.defaultOptions, {
return foundry.utils.mergeObject(super.defaultOptions, {
id: "l5r5e-twenty-questions-dialog",
classes: ["l5r5e", "twenty-questions-dialog"],
template: CONFIG.l5r5e.paths.templates + "actors/twenty-questions-dialog.html",
@@ -142,7 +142,7 @@ export class TwentyQuestionsDialog extends FormApplication {
skillsListStep7,
skillsListStep17,
noHonorSkillsList: ["commerce", "skulduggery", "medicine", "seafaring", "survival", "labor"],
techniquesList: CONFIG.l5r5e.techniques,
techniquesList: game.l5r5e.HelpersL5r5e.getTechniquesList(),
data: this.object.data,
cache: this.cache,
summary: {

View File

@@ -177,7 +177,7 @@ export class TwentyQuestions {
* Update object with form data
*/
updateFromForm(formData) {
this.data = mergeObject(this.data, expandObject(formData));
this.data = foundry.utils.mergeObject(this.data, foundry.utils.expandObject(formData));
}
/**