Begin working on the non-MVP character sheet
This commit is contained in:
parent
d74416c620
commit
6d2d02b077
10 changed files with 110 additions and 5 deletions
|
|
@ -78,7 +78,10 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"sheet-names": {
|
"sheet-names": {
|
||||||
"PlayerSheet": "PC/PUG Sheet",
|
"PlayerSheet": {
|
||||||
|
"MVP": "MVP PC Sheet",
|
||||||
|
"v2": "PC Sheet"
|
||||||
|
},
|
||||||
"SyncSheet": {
|
"SyncSheet": {
|
||||||
"basic": "Theme: Basic"
|
"basic": "Theme: Basic"
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -19,7 +19,7 @@ import { PetSheet } from "./sheets/Items/PetSheet.mjs";
|
||||||
|
|
||||||
// Actor Sheets
|
// Actor Sheets
|
||||||
import { BasicSyncSheet } from "./sheets/SyncVariations/BasicSyncSheet.mjs";
|
import { BasicSyncSheet } from "./sheets/SyncVariations/BasicSyncSheet.mjs";
|
||||||
import { PlayerSheet } from "./sheets/MVPPCSheet.mjs";
|
import { PlayerSheetv2 } from "./sheets/Actors/PC/Improved.mjs";
|
||||||
import { MVPPCSheet } from "./sheets/MVPPCSheet.mjs";
|
import { MVPPCSheet } from "./sheets/MVPPCSheet.mjs";
|
||||||
import { MobSheet } from "./sheets/MobSheet.mjs";
|
import { MobSheet } from "./sheets/MobSheet.mjs";
|
||||||
|
|
||||||
|
|
@ -55,7 +55,12 @@ Hooks.once(`init`, async () => {
|
||||||
Actors.registerSheet("dotdungeon", MVPPCSheet, {
|
Actors.registerSheet("dotdungeon", MVPPCSheet, {
|
||||||
makeDefault: true,
|
makeDefault: true,
|
||||||
types: ["player"],
|
types: ["player"],
|
||||||
label: "dotdungeon.sheet-names.PlayerSheet"
|
label: "dotdungeon.sheet-names.PlayerSheet.MVP"
|
||||||
|
});
|
||||||
|
Actors.registerSheet("dotdungeon", PlayerSheetv2, {
|
||||||
|
makeDefault: false,
|
||||||
|
types: ["player"],
|
||||||
|
label: "dotdungeon.sheet-names.PlayerSheet.v2"
|
||||||
});
|
});
|
||||||
Actors.registerSheet("dotdungeon", MobSheet, {
|
Actors.registerSheet("dotdungeon", MobSheet, {
|
||||||
makeDefault: true,
|
makeDefault: true,
|
||||||
|
|
|
||||||
47
module/sheets/Actors/PC/Improved.mjs
Normal file
47
module/sheets/Actors/PC/Improved.mjs
Normal file
|
|
@ -0,0 +1,47 @@
|
||||||
|
import { GenericActorSheet } from "../../GenericActorSheet.mjs";
|
||||||
|
|
||||||
|
export class PlayerSheetv2 extends GenericActorSheet {
|
||||||
|
static get defaultOptions() {
|
||||||
|
let opts = mergeObject(
|
||||||
|
super.defaultOptions,
|
||||||
|
{
|
||||||
|
template: `systems/dotdungeon/templates/actors/char-sheet/v2/sheet.hbs`,
|
||||||
|
tabs: [
|
||||||
|
{
|
||||||
|
// group: `page`,
|
||||||
|
navSelector: `.potato`,
|
||||||
|
contentSelector: `.tab-content`,
|
||||||
|
initial: `tab1`,
|
||||||
|
},
|
||||||
|
],
|
||||||
|
}
|
||||||
|
);
|
||||||
|
opts.classes.push(`dotdungeon`);
|
||||||
|
return opts;
|
||||||
|
};
|
||||||
|
|
||||||
|
activateListeners(html) {
|
||||||
|
super.activateListeners(html);
|
||||||
|
|
||||||
|
if (this.document.isEmbedded) return;
|
||||||
|
if (!this.isEditable) return;
|
||||||
|
console.debug(`.dungeon | Adding event listeners for Actor: ${this.id}`);
|
||||||
|
};
|
||||||
|
|
||||||
|
async getData() {
|
||||||
|
const ctx = await super.getData();
|
||||||
|
/** @type {ActorHandler} */
|
||||||
|
const actor = this.actor;
|
||||||
|
|
||||||
|
ctx.system = actor.system;
|
||||||
|
ctx.flags = actor.flags;
|
||||||
|
ctx.items = this.actor.itemTypes;
|
||||||
|
|
||||||
|
ctx.computed = {
|
||||||
|
canChangeGroup: ctx.settings.playersCanChangeGroup || ctx.isGM,
|
||||||
|
canAddAspect: !await actor.proxyFunction.bind(actor)(`atAspectLimit`),
|
||||||
|
};
|
||||||
|
|
||||||
|
return ctx;
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
@ -1,6 +1,7 @@
|
||||||
import { ActorHandler } from "../documents/Actor/Handler.mjs";
|
import { ActorHandler } from "../documents/Actor/Handler.mjs";
|
||||||
import { GenericActorSheet } from "./GenericActorSheet.mjs";
|
import { GenericActorSheet } from "./GenericActorSheet.mjs";
|
||||||
import { DiceList } from "../dialogs/DiceList.mjs";
|
import { DiceList } from "../dialogs/DiceList.mjs";
|
||||||
|
import { PopoutTextEditor } from "../dialogs/PopoutTextEditor.mjs";
|
||||||
|
|
||||||
export class MobSheet extends GenericActorSheet {
|
export class MobSheet extends GenericActorSheet {
|
||||||
static get defaultOptions() {
|
static get defaultOptions() {
|
||||||
|
|
@ -28,6 +29,14 @@ export class MobSheet extends GenericActorSheet {
|
||||||
let d = new DiceList(this.actor);
|
let d = new DiceList(this.actor);
|
||||||
d.render(true);
|
d.render(true);
|
||||||
});
|
});
|
||||||
|
html.find(`[data-text-editor]`)
|
||||||
|
.on(`click`, () => {
|
||||||
|
let editor = new PopoutTextEditor(
|
||||||
|
this.actor,
|
||||||
|
`system.description`
|
||||||
|
);
|
||||||
|
editor.render(true);
|
||||||
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
async getData() {
|
async getData() {
|
||||||
|
|
|
||||||
|
|
@ -15,6 +15,7 @@
|
||||||
@use "./sheets/partials/panel.scss";
|
@use "./sheets/partials/panel.scss";
|
||||||
|
|
||||||
@use "./sheets/actor/mvp.scss";
|
@use "./sheets/actor/mvp.scss";
|
||||||
|
@use "./sheets/actor/char-sheet/v2.scss";
|
||||||
@use "./sheets/actor/mob/mob.scss";
|
@use "./sheets/actor/mob/mob.scss";
|
||||||
@use "./sheets/actor/sync/basic.scss";
|
@use "./sheets/actor/sync/basic.scss";
|
||||||
@use "./sheets/items/custom.scss";
|
@use "./sheets/items/custom.scss";
|
||||||
|
|
|
||||||
7
styles/sheets/actor/char-sheet/themes/dark.scss
Normal file
7
styles/sheets/actor/char-sheet/themes/dark.scss
Normal file
|
|
@ -0,0 +1,7 @@
|
||||||
|
$bg-base: #202b38;
|
||||||
|
|
||||||
|
.actor--pc {
|
||||||
|
--sheet-bg: #{$bg-base};
|
||||||
|
--nav-bg: var(--panel-bg);
|
||||||
|
--panel-bg: rgba(255, 255, 255, 0.05);
|
||||||
|
}
|
||||||
11
styles/sheets/actor/char-sheet/v2.scss
Normal file
11
styles/sheets/actor/char-sheet/v2.scss
Normal file
|
|
@ -0,0 +1,11 @@
|
||||||
|
@use "./themes/dark.scss";
|
||||||
|
|
||||||
|
.dotdungeon .actor--pc {
|
||||||
|
background: var(--sheet-bg);
|
||||||
|
display: grid;
|
||||||
|
grid-template-rows: 1fr minmax(min-content, 50px);
|
||||||
|
|
||||||
|
nav {
|
||||||
|
background: var(--panel-bg);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
@use "../../vars.scss" as *;
|
@use "../../vars.scss" as *;
|
||||||
@use "../../mixins/breakpoints" as *;
|
@use "../../mixins/breakpoints" as *;
|
||||||
|
|
||||||
.dotdungeon .actor--pc {
|
.dotdungeon .actor--pc-mvp {
|
||||||
display: grid;
|
display: grid;
|
||||||
grid-template-areas:
|
grid-template-areas:
|
||||||
"profile stats stats"
|
"profile stats stats"
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
<form autocomplete="off" class="actor--pc">
|
<form autocomplete="off" class="actor--pc-mvp">
|
||||||
{{> dotdungeon.pc.profile }}
|
{{> dotdungeon.pc.profile }}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
22
templates/actors/char-sheet/v2/sheet.hbs
Normal file
22
templates/actors/char-sheet/v2/sheet.hbs
Normal file
|
|
@ -0,0 +1,22 @@
|
||||||
|
<form autocomplete="off" class="actor--pc">
|
||||||
|
{{!-- All panels here --}}
|
||||||
|
<section class="tab-content">
|
||||||
|
<div class="tab" data-group="page" data-tab="tab1">
|
||||||
|
<h1>Tab 1</h1>
|
||||||
|
</div>
|
||||||
|
<div class="tab" data-group="page" data-tab="tab2">
|
||||||
|
<h1>Tab 2</h1>
|
||||||
|
</div>
|
||||||
|
<div class="tab" data-group="page" data-tab="tab3">
|
||||||
|
<h1>Tab 3</h1>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
|
||||||
|
{{!-- Tab list here --}}
|
||||||
|
<div class="potato" data-group="page">
|
||||||
|
<a data-tab="tab1">Tab 1</a>
|
||||||
|
<a data-tab="tab2">Tab 2</a>
|
||||||
|
<a data-tab="tab3">Tab 3</a>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
Loading…
Add table
Add a link
Reference in a new issue