- Defined npc in template.json
- Created main.hbs in templates/sheets/npc
This commit is contained in:
@@ -15,6 +15,7 @@ const preloadTemplates = async (): Promise<Handlebars.TemplateDelegate<any>[]> =
|
||||
"sheets/character/spells.hbs",
|
||||
"sheets/character/combat.hbs",
|
||||
"sheets/character/effects.hbs",
|
||||
"sheets/npc/main.hbs",
|
||||
"sheets/partial/mod.hbs",
|
||||
"sheets/item/rolls.hbs",
|
||||
"chat/roll-m5.hbs",
|
||||
|
||||
@@ -7,7 +7,6 @@ import { M5Roll } from "../rolls/M5Roll";
|
||||
export default class M5CharacterSheet extends ActorSheet {
|
||||
static get defaultOptions() {
|
||||
return mergeObject(super.defaultOptions, {
|
||||
template: "systems/midgard5/templates/sheets/character/main.hbs",
|
||||
width: 1000,
|
||||
height: 800,
|
||||
classes: ["midgard5", "sheet", "character"],
|
||||
@@ -21,7 +20,15 @@ export default class M5CharacterSheet extends ActorSheet {
|
||||
});
|
||||
}
|
||||
|
||||
// get template() {
|
||||
get template() {
|
||||
//console.log("M5CharacterSheet", this.actor.data.type)
|
||||
if (this.actor.data.type === "npc") {
|
||||
return "systems/midgard5/templates/sheets/npc/main.hbs";
|
||||
}
|
||||
else {
|
||||
return "systems/midgard5/templates/sheets/character/main.hbs";
|
||||
}
|
||||
}
|
||||
// return "systems/midgard5/templates/character_sheet/main.hbs"
|
||||
// }Options extends ActorSheet.Options = ActorSheet.Options, Data extends object = ActorSheet.Data<Options>
|
||||
|
||||
|
||||
+11
-2
@@ -1,6 +1,9 @@
|
||||
{
|
||||
"Actor": {
|
||||
"types": ["character"],
|
||||
"types": [
|
||||
"character",
|
||||
"npc"
|
||||
],
|
||||
"templates": {
|
||||
"characterDescription": {
|
||||
"info": {
|
||||
@@ -19,6 +22,7 @@
|
||||
"occupation": "",
|
||||
"origin": "",
|
||||
"faith": "",
|
||||
"level": 1,
|
||||
"gold": 0,
|
||||
"silver": 0,
|
||||
"copper": 0
|
||||
@@ -53,7 +57,8 @@
|
||||
"zt": { "value": 50, "bonus": 0 },
|
||||
"au": { "value": 50, "bonus": 0 },
|
||||
"pa": { "value": 50, "bonus": 0 },
|
||||
"wk": { "value": 50, "bonus": 0 }
|
||||
"wk": { "value": 50, "bonus": 0 },
|
||||
"git": { "value": 50, "bonus": 0 }
|
||||
}
|
||||
},
|
||||
"skills": {
|
||||
@@ -156,6 +161,10 @@
|
||||
"character": {
|
||||
"templates": ["characterBars", "attributes", "characterDescription", "characterHeader", "skills", "gear"],
|
||||
"calc": {}
|
||||
},
|
||||
"npc": {
|
||||
"templates": ["characterBars", "attributes", "characterDescription", "skills", "gear"],
|
||||
"calc": {}
|
||||
}
|
||||
},
|
||||
"Item": {
|
||||
|
||||
Reference in New Issue
Block a user