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": { "scripts": {
"build": "tsc && vite build" "build": "tsc && vite build"
}, },
"type": "module",
"devDependencies": { "devDependencies": {
"rollup-plugin-copy": "^3.5.0", "rollup-plugin-copy": "^3.5.0",
"typescript": "^5.8.3", "typescript": "^5.8.3",

View File

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

View File

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