fixing stuff
This commit is contained in:
@@ -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);
|
||||
},
|
||||
},
|
||||
);
|
||||
|
||||
});
|
||||
@@ -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,
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user