From 5220ca5ec8bb58cc4ec960a29682ea6c30728fca Mon Sep 17 00:00:00 2001 From: The Last Scrub Date: Thu, 19 Nov 2020 21:06:19 -0800 Subject: [PATCH] added 'limited' character sheet --- module/actor/actor-sheet.js | 40 ++++++++++++++++++++ templates/actor/limited-sheet.html | 61 ++++++++++++++++++++++++++++++ 2 files changed, 101 insertions(+) create mode 100644 templates/actor/limited-sheet.html diff --git a/module/actor/actor-sheet.js b/module/actor/actor-sheet.js index 795deb5..df49aab 100644 --- a/module/actor/actor-sheet.js +++ b/module/actor/actor-sheet.js @@ -18,6 +18,18 @@ export class DeltaGreenActorSheet extends ActorSheet { /* -------------------------------------------- */ + /** @override */ + get template() { + if ( !game.user.isGM && this.actor.limited ) { + return "systems/deltagreen/templates/actor/limited-sheet.html"; + } + else{ + //return `systems/deltagreen/templates/actor/${this.actor.data.type}-sheet.html`; + return `systems/deltagreen/templates/actor/actor-sheet.html`; + } + + } + /** @override */ getData() { const data = super.getData(); @@ -84,9 +96,37 @@ export class DeltaGreenActorSheet extends ActorSheet { onclick: (ev) => sendPercentileTestToChat(this.actor, "Luck", 50) }].concat(buttons); + //buttons = [ + // { + // label: "Active Effect", + // class: "test-extra-icon", + // icon: "fas fa-bolt", + // onclick: (ev) => this.activeEffectTest(this) + // }].concat(buttons); + return buttons; } + activeEffectTest(sheet){ + console.log(sheet.actor.uuid); + let owner = sheet.actor; + + let effect = ActiveEffect.create({ + label: "Custom Effect", + tint: "#008000", + icon: "icons/svg/aura.svg", + origin: owner.uuid, + //duration: {"rounds": 1, "seconds": null, "startTime": null, "turns": null, "startRound": null, "startTurn": null}, + disabled: false, + changes: [{ + "key": "data.skills.firearms.proficiency", //"data.statistics.str.value", //"data.health.max", + "mode": 2, // 0 = custom, 1 = multiply, 2 = add, 3 = upgrade, 4 = downgrade, 5 = override + "value": -20, + "priority": "20" + }] + }, owner).create(); + } + /* -------------------------------------------- */ /** @override */ diff --git a/templates/actor/limited-sheet.html b/templates/actor/limited-sheet.html new file mode 100644 index 0000000..dd522e9 --- /dev/null +++ b/templates/actor/limited-sheet.html @@ -0,0 +1,61 @@ +
+ + {{!-- Sheet Header --}} +
+ +
+ + {{!-- Name, Profession, Portrait --}} +
+ +
+
+

+
+
+

+
+
+
+
+ + {{!-- Sheet Tab Navigation --}} + + + {{!-- Sheet Body --}} +
+ {{!-- Biography Tab --}} +
+
+ {{localize 'DG.CV.Sex'}} + + + {{localize 'DG.CV.AgeAndDoB'}} + +
+ +
+ + {{localize 'DG.CV.Employer'}} + + + {{localize 'DG.CV.Nationality'}} + + +
+ +
+ {{localize 'DG.CV.Education'}} + +
+
+ {{localize 'DG.CV.PhysicalDescriptionLabel'}} +
+ {{editor content=data.physicalDescription target="data.physicalDescription" button=true owner=owner editable=editable}} +
+ +
+
+