forked from dmdorman/hero6e-foundryvtt
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request dmdorman#1626 from aeauseth/main
ActiveEffect changes. Better fades. Worse AP calculations. Improved AE UI.
- Loading branch information
Showing
12 changed files
with
337 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
import { HEROSYS } from "../herosystem6e.mjs"; | ||
|
||
export class HeroSystemActiveEffectConfig extends ActiveEffectConfig { | ||
static get defaultOptions() { | ||
const defaultOptions = super.defaultOptions; | ||
return foundry.utils.mergeObject(defaultOptions, { | ||
//classes: ["herosystem6e", "sheet", "item"], | ||
// width: 520, | ||
// height: 660, | ||
// scrollY: [".sheet-body"], | ||
classes: ["sheet", "herosystem-active-effect-config", "active-effect-sheet"], | ||
template: `systems/${HEROSYS.module}/templates/actor/active-effect-config.hbs`, | ||
}); | ||
} | ||
|
||
async getData() { | ||
const context = await super.getData(); | ||
for (let i = 0; i < context.data.changes.length; i++) { | ||
context.data.changes[i] = { ...context.data.changes[i], ...context.data.flags.changes?.[i] }; | ||
} | ||
const originItem = fromUuidSync(context.data.origin); | ||
const token = fromUuidSync(context.data.origin.match(/(.*).Actor/)?.[1]); | ||
context.originText = originItem | ||
? `${token?.name || originItem.actor?.name}: ${originItem.name}` | ||
: context.data.origin; | ||
return context; | ||
} | ||
|
||
// async _updateObject(event, formData) { | ||
// await super._updateObject(event, formData); | ||
|
||
// // if (formData.changes) { | ||
// // await this.object.update({ changes: formData.changes }); | ||
// // } | ||
// } | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
// div.herosystem-active-effect-config { | ||
// background: red; | ||
// } | ||
|
||
// div.herosystem-active-effect-config > .window-content { | ||
// background: red; | ||
// } | ||
|
||
div.herosystem-active-effect-config div.description { | ||
background-color: rgba(0 0 0 / 10%); | ||
border: 1px dashed rgb(0 0 0 / 50%); | ||
padding: 5px; | ||
max-width: 100%; | ||
user-select: text; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.