add basic ItemSheet
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
.item-sheet header {
|
||||
display: flex;
|
||||
flex-flow: row wrap;
|
||||
justify-content: flex-start;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.item-sheet header img {
|
||||
flex: 0 0 64px;
|
||||
height: 64px;
|
||||
margin-right: 6px;
|
||||
}
|
||||
|
||||
.item-sheet header input,
|
||||
.item-sheet header div {
|
||||
flex: 1;
|
||||
height: 48px;
|
||||
line-height: 48px;
|
||||
margin: 8px;
|
||||
font-size: 2em;
|
||||
}
|
||||
+35
-6
@@ -1,14 +1,43 @@
|
||||
console.log("Hello World! This code runs immediately when the file is loaded.");
|
||||
|
||||
function init() {
|
||||
console.log("INIT");
|
||||
console.log(foundry.documents.BaseItem.metadata.types);
|
||||
foundry.documents.BaseItem.metadata.types.push("talent");
|
||||
|
||||
//DocumentSheetConfig.unregisterSheet(Item, "core", ItemSheet);
|
||||
DocumentSheetConfig.registerSheet(Item, "dsa41", DSA41_ItemSheet, {
|
||||
makeDefault: true,
|
||||
types: [
|
||||
"Generic Item",
|
||||
"Melee Weapon",
|
||||
"Ranged Weapon",
|
||||
"Armor",
|
||||
"Shield",
|
||||
]
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
class DSA41_ItemSheet extends ItemSheet {
|
||||
get template() {
|
||||
return "systems/dsa-4th-edition/ItemSheets/" + this.item.type + ".html"
|
||||
}
|
||||
|
||||
|
||||
getData() {
|
||||
const data = super.getData();
|
||||
console.log(data);
|
||||
return data;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
function ready() {
|
||||
console.log("READY");
|
||||
}
|
||||
|
||||
Hooks.on("init", init);
|
||||
Hooks.on("ready", ready);
|
||||
function setup() {
|
||||
console.log("SETUP");
|
||||
//Item.create({"name": "TestItem4", "type": "spell", "system": {"price": "15"}});
|
||||
}
|
||||
|
||||
Hooks.once("init", init);
|
||||
Hooks.once("ready", ready);
|
||||
Hooks.once("setup", setup);
|
||||
|
||||
Reference in New Issue
Block a user