23 lines
625 B
JavaScript
23 lines
625 B
JavaScript
/*
|
|
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`,
|
|
},
|
|
{
|
|
label: `Make Global Reference`,
|
|
onClick: () => {
|
|
globalThis._doc = app.actor;
|
|
},
|
|
},
|
|
);
|
|
});
|