fixing stuff

This commit is contained in:
iamBadgers
2025-08-03 21:19:54 -07:00
parent 31b90f3338
commit 902cc4f2e8
3 changed files with 11 additions and 7 deletions

View File

@@ -7,6 +7,7 @@
"scripts": {
"build": "tsc && vite build"
},
"type": "module",
"devDependencies": {
"rollup-plugin-copy": "^3.5.0",
"typescript": "^5.8.3",

View File

@@ -76,11 +76,13 @@ Hooks.on("getActorSheetHeaderButtons", (app: any, buttons: any) => {
// Add to the character context menu.
Hooks.on("getActorDirectoryEntryContext", async (html: any, options: any) => {
console.log(html)
const getActorData = (target: any) => {
console.log(target)
return game.actors.get(target.data("documentId"));
return (game as Game).actors!.get(target.data("documentId"));
};
console.log(getActorData)
@@ -91,10 +93,11 @@ Hooks.on("getActorDirectoryEntryContext", async (html: any, options: any) => {
{
name: "Archive",
icon: '<i class="fas fa-save"></i>',
callback: (target) => {
callback: (target: any) => {
console.log(target)
new CharacterArchiver().render(true);
},
},
);
});

View File

@@ -1,22 +1,22 @@
import {MODULE_ID, URI_SETTING_NAME, API_KEY_NAME} from "./common.js"
export function initializeSettings() {
game.settings.register(MODULE_ID, URI_SETTING_NAME, {
(game as Game).settings!.register(MODULE_ID, URI_SETTING_NAME, {
name: "Archive Server URI",
hint: "Address of the character archive server.",
scope: "world",
config: true,
restricted: true,
// restricted: true,
default: "https://chararchive.cyberpunkrush.com",
type: String,
});
game.settings.register(MODULE_ID, API_KEY_NAME, {
(game as Game).settings!.register(MODULE_ID, API_KEY_NAME, {
name: "API Key",
hint: "API key to use when communicating with the archive server.",
scope: "world",
config: true,
restricted: true,
// restricted: true,
default: "",
type: String,
});