Trait Items #72

Open
Oliver wants to merge 41 commits from feature/trait-items into main
7 changed files with 37 additions and 4 deletions
Showing only changes of commit 803c1673e2 - Show all commits

View file

@ -0,0 +1,15 @@
/*
This hook exists to be able to change all of the actor-sheets to allow
them to have dev-mode controls in their header that are useful for
testing purposes. (This is particularly useful for testing embedded
items that are only allowed to exist on specific actor types)
*/
Hooks.on(`getHeaderControlsActorSheetV2`, (_app, controls) => {
if (!game.settings.get(`ripcrypt`, `devMode`)) { return }
controls.push({
icon: `fa-solid fa-terminal`,
label: `Embed New Item (DEV)`,
action: `createItem`,
});
});

View file

@ -1,4 +1,4 @@
import { Logger } from "../utils/Logger.mjs";
import { Logger } from "../../module/utils/Logger.mjs";
const loaders = {
svg(data) {

3
dev/main.mjs Normal file
View file

@ -0,0 +1,3 @@
// Hooks
import "./hooks/hotReload.mjs";
import "./hooks/getHeaderControlsActorSheetV2.mjs";

View file

@ -12,6 +12,7 @@
},
"include": [
"module/**/*",
"dev/**/*",
"foundry/client/client.mjs",
"foundry/client/global.d.mts",
"foundry/common/primitives/global.d.mts"

View file

@ -1,7 +1,6 @@
// Hooks
import "./hooks/init.mjs";
import "./hooks/ready.mjs";
import "./hooks/hotReload.mjs";
// Global API
import "./api.mjs";

View file

@ -0,0 +1,14 @@
/*
The intent of this script is to do all of the modifications of the
manifest file that we need to do in order to release the system. This
can include removing dev-only fields/attributes that end users will
never, and should never, care about nor need.
*/
// TODO: load the manifest
// TODO: remove all files that start with dev/ from the esmodules list
// TODO: remove flags.hotReload
// TODO: write the new manifest to disk

View file

@ -12,7 +12,8 @@
{ "name": "Oliver" }
],
"esmodules": [
"module/main.mjs"
"module/main.mjs",
"dev/main.mjs"
],
"styles": [
{
@ -36,7 +37,7 @@
"flags": {
"hotReload": {
"extensions": ["css", "hbs", "json", "mjs", "svg"],
"paths": ["assets", "templates", "langs", "module"]
"paths": ["assets", "templates", "langs", "module", "dev"]
}
},
"documentTypes": {