Compare commits
2 commits
main
...
feature/ac
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a8a10c0ad3 | ||
|
|
4d5c428cbc |
8 changed files with 112 additions and 0 deletions
|
|
@ -120,6 +120,14 @@
|
|||
}
|
||||
},
|
||||
"Apps": {
|
||||
"titles": {
|
||||
"EffectManager": "Manage Effects",
|
||||
"DicePool": {
|
||||
"flavorless": "Dice Pool",
|
||||
"flavored": "Dice Pool: {flavor}"
|
||||
}
|
||||
},
|
||||
"manage-active-effects": "Open Effect Manager",
|
||||
"move-run": "@RipCrypt.common.move • @RipCrypt.common.run",
|
||||
"traits-range": "@RipCrypt.common.traits • @RipCrypt.common.range",
|
||||
"grit-skills": "@RipCrypt.common.abilities.grit Skills",
|
||||
|
|
|
|||
|
|
@ -23,8 +23,16 @@ export class HeroSummaryCardV1 extends GenericAppMixin(HandlebarsApplicationMixi
|
|||
},
|
||||
window: {
|
||||
resizable: false,
|
||||
controls: [
|
||||
{
|
||||
action: `openEffectManager`,
|
||||
label: `RipCrypt.Apps.manage-active-effects`,
|
||||
ownership: `OWNER`,
|
||||
},
|
||||
],
|
||||
},
|
||||
actions: {
|
||||
openEffectManager: this.#openEffectManager,
|
||||
},
|
||||
form: {
|
||||
submitOnChange: true,
|
||||
|
|
@ -219,5 +227,13 @@ export class HeroSummaryCardV1 extends GenericAppMixin(HandlebarsApplicationMixi
|
|||
// #endregion
|
||||
|
||||
// #region Actions
|
||||
/** @this {HeroCraftCardV1} */
|
||||
static async #openEffectManager() {
|
||||
await this.actor.createEmbeddedDocuments(
|
||||
`ActiveEffect`,
|
||||
[{name: `AE Tester`}],
|
||||
{ renderSheet: true },
|
||||
);
|
||||
};
|
||||
// #endregion
|
||||
};
|
||||
|
|
|
|||
54
module/Apps/EffectManager/EffectManager.mjs
Normal file
54
module/Apps/EffectManager/EffectManager.mjs
Normal file
|
|
@ -0,0 +1,54 @@
|
|||
import { filePath } from "../../consts.mjs";
|
||||
import { GenericAppMixin } from "../GenericApp.mjs";
|
||||
|
||||
const { HandlebarsApplicationMixin, ApplicationV2 } = foundry.applications.api;
|
||||
|
||||
export class EffectManager extends GenericAppMixin(HandlebarsApplicationMixin(ApplicationV2)) {
|
||||
// #region Options
|
||||
static DEFAULT_OPTIONS = {
|
||||
classes: [
|
||||
`ripcrypt--EffectManager`,
|
||||
],
|
||||
window: {
|
||||
title: `Effect Manager`,
|
||||
frame: true,
|
||||
positioned: true,
|
||||
resizable: false,
|
||||
minimizable: true,
|
||||
},
|
||||
position: {
|
||||
width: `auto`,
|
||||
height: `auto`,
|
||||
},
|
||||
actions: {
|
||||
},
|
||||
};
|
||||
|
||||
static PARTS = {
|
||||
numberOfDice: {
|
||||
template: filePath(`templates/Apps/DicePool/numberOfDice.hbs`),
|
||||
},
|
||||
};
|
||||
// #endregion
|
||||
|
||||
// #region Instance Data
|
||||
_effects = new Map();
|
||||
_showSource;
|
||||
|
||||
constructor({ document, showSource = true, ...opts } = {}) {
|
||||
super(opts);
|
||||
|
||||
this._showSource = showSource;
|
||||
|
||||
for (const effect of document.allApplicableEffects()) {
|
||||
this._effects.add(effect._id, effect);
|
||||
};
|
||||
};
|
||||
// #endregion
|
||||
|
||||
// #region Lifecycle
|
||||
// #endregion
|
||||
|
||||
// #region Actions
|
||||
// #endregion
|
||||
};
|
||||
0
module/Apps/EffectManager/EffectSheet.mjs
Normal file
0
module/Apps/EffectManager/EffectSheet.mjs
Normal file
0
module/data/ActiveEffect/base.mjs
Normal file
0
module/data/ActiveEffect/base.mjs
Normal file
16
templates/Apps/ActiveEffectConfiguration/changes.hbs
Normal file
16
templates/Apps/ActiveEffectConfiguration/changes.hbs
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
<rc-border
|
||||
var:border-color="var(--accent-2)"
|
||||
>
|
||||
<div slot="title">Changes</div>
|
||||
<div slot="content" class="changes-list">
|
||||
<div class="header">
|
||||
<span>Attribute Key</span>
|
||||
<span>Change Mode</span>
|
||||
<span>Value</span>
|
||||
<span>Priority</span>
|
||||
<div><!-- Intentionally Empty --></div>
|
||||
</div>
|
||||
<ul>
|
||||
</ul>
|
||||
</div>
|
||||
</rc-border>
|
||||
5
templates/Apps/ActiveEffectConfiguration/general.hbs
Normal file
5
templates/Apps/ActiveEffectConfiguration/general.hbs
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
<div>
|
||||
<input type="text" name="name" value="{{name}}">
|
||||
<div>Status Conditions</div>
|
||||
<div>Suspended</div>
|
||||
</div>
|
||||
13
templates/Apps/ActiveEffectConfiguration/rankLimiter.hbs
Normal file
13
templates/Apps/ActiveEffectConfiguration/rankLimiter.hbs
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
<rc-border>
|
||||
<div slot="title">{{title}}</div>
|
||||
<div slot="content">
|
||||
<div>
|
||||
<label for="">Rank</label>
|
||||
<input type="text">
|
||||
</div>
|
||||
<div>
|
||||
<label for="">Step</label>
|
||||
<input type="text">
|
||||
</div>
|
||||
</div>
|
||||
</rc-border>
|
||||
Loading…
Add table
Add a link
Reference in a new issue