Renaming spree
This commit is contained in:
parent
e56c65629f
commit
1b5474b491
@ -1,6 +1,6 @@
|
||||
import { HenchDataModel } from "./module/data-models.mjs";
|
||||
|
||||
import { HenchDebugSheet } from "./module/sheets/hench-debug.mjs";
|
||||
import { HenchActorSheet } from "./module/sheets/hench-actor-sheet.mjs";
|
||||
|
||||
Handlebars.registerHelper('int2checkbox', (size, threshold, options) => {
|
||||
return new Array(size).fill(0).map(
|
||||
@ -14,7 +14,7 @@ Hooks.once("init", () => {
|
||||
};
|
||||
|
||||
Actors.unregisterSheet('core', ActorSheet);
|
||||
Actors.registerSheet('henchDebug', HenchDebugSheet, {
|
||||
Actors.registerSheet('hench', HenchActorSheet, {
|
||||
makeDefault: true,
|
||||
label: 'Hench Debug Sheet',
|
||||
});
|
||||
|
@ -1,4 +1,4 @@
|
||||
export function getValueAtPath(obj, fieldPath) {
|
||||
function getValueAtPath(obj, fieldPath) {
|
||||
const pathSequence = fieldPath.split('.');
|
||||
|
||||
let pointer = obj;
|
||||
@ -10,7 +10,7 @@ export function getValueAtPath(obj, fieldPath) {
|
||||
return pointer;
|
||||
}
|
||||
|
||||
export function copyAndMutateAtPath(obj, fieldPath, val) {
|
||||
function copyAndMutateAtPath(obj, fieldPath, val) {
|
||||
const copy = deepCopy(obj);
|
||||
|
||||
const changed = mutateAtPath(copy, fieldPath, val);
|
||||
@ -36,11 +36,11 @@ function mutateAtPath(obj, fieldPath, val) {
|
||||
return obj;
|
||||
}
|
||||
|
||||
export function deepCopy(obj) {
|
||||
function deepCopy(obj) {
|
||||
return structuredClone(obj);
|
||||
}
|
||||
|
||||
export function getDataPathFromString(dataPathString) {
|
||||
function getDataPathFromString(dataPathString) {
|
||||
const arraySplit = dataPathString.indexOf('[');
|
||||
|
||||
const isArray = arraySplit > 0;
|
@ -1,10 +1,11 @@
|
||||
import { playbookKeys, validatePlaybookKey, getPlaybookMutation } from "../playbooks.mjs";
|
||||
import { getValueAtPath, copyAndMutateAtPath, deepCopy, updateField } from "../helpers/object-helper.mjs";
|
||||
import { updateField } from "../helpers/object-helper.mjs";
|
||||
|
||||
export class HenchDebugSheet extends ActorSheet {
|
||||
export class HenchActorSheet extends ActorSheet {
|
||||
/** @override */
|
||||
get template() {
|
||||
return `systems/hench/templates/hench-debug.hbs`;
|
||||
console.log(`Mapping sheet: ${this.actor.type} => systems/hench/templates/actors/${this.actor.type}.hbs`)
|
||||
return `systems/hench/templates/actors/${this.actor.type}.hbs`;
|
||||
}
|
||||
|
||||
/** @override */
|
6
todo.md
6
todo.md
@ -1,9 +1,11 @@
|
||||
- [] Define Move Model
|
||||
- [] Define Hench Model
|
||||
- [x] Define Move Model
|
||||
- [x] Define Hench Model
|
||||
- [] Define Boss Model
|
||||
- [x] Define Prompt Model (DEFUNCT)
|
||||
- [] Define Storyline Model
|
||||
- [] ? Define Table Model
|
||||
- [] Implement baseline hench sheet
|
||||
- [] Implement baseline boss sheet
|
||||
- [] Design Hench sheet
|
||||
- [] Design Boss sheet
|
||||
- [] Implement Hench sheet
|
||||
|
Loading…
x
Reference in New Issue
Block a user