mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-01-16 13:41:07 +01:00
Fix/864 chat targeting (#911)
* Fix targeting * Fix chat target selection * Uncomment chatDisplay * Removed unessecary arg
This commit is contained in:
parent
432179d52f
commit
c579b5f63c
3 changed files with 3 additions and 3 deletions
|
|
@ -110,6 +110,7 @@ export default class DHActorRoll extends foundry.abstract.TypeDataModel {
|
||||||
if (this.hasTarget) {
|
if (this.hasTarget) {
|
||||||
this.hasHitTarget = this.targets.filter(t => t.hit === true).length > 0;
|
this.hasHitTarget = this.targets.filter(t => t.hit === true).length > 0;
|
||||||
this.currentTargets = this.getTargetList();
|
this.currentTargets = this.getTargetList();
|
||||||
|
// this.registerTargetHook();
|
||||||
|
|
||||||
if (this.targetMode === true && this.hasRoll) {
|
if (this.targetMode === true && this.hasRoll) {
|
||||||
this.targetShort = this.targets.reduce(
|
this.targetShort = this.targets.reduce(
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,5 @@
|
||||||
export default class DhpChatMessage extends foundry.documents.ChatMessage {
|
export default class DhpChatMessage extends foundry.documents.ChatMessage {
|
||||||
targetHook = null;
|
targetHook = null;
|
||||||
targetSelection = null;
|
|
||||||
|
|
||||||
async renderHTML() {
|
async renderHTML() {
|
||||||
const actor = game.actors.get(this.speaker.actor);
|
const actor = game.actors.get(this.speaker.actor);
|
||||||
|
|
@ -24,7 +23,7 @@ export default class DhpChatMessage extends foundry.documents.ChatMessage {
|
||||||
|
|
||||||
/** @inheritDoc */
|
/** @inheritDoc */
|
||||||
prepareData() {
|
prepareData() {
|
||||||
if (this.isAuthor && this.targetSelection === null) this.targetSelection = this.system.targets?.length > 0;
|
if (this.isAuthor && this.targetSelection === undefined) this.targetSelection = this.system.targets?.length > 0;
|
||||||
super.prepareData();
|
super.prepareData();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@
|
||||||
{{#if roll.isCritical}}
|
{{#if roll.isCritical}}
|
||||||
<span>{{localize "DAGGERHEART.GENERAL.criticalShort"}}</span>
|
<span>{{localize "DAGGERHEART.GENERAL.criticalShort"}}</span>
|
||||||
{{else}}
|
{{else}}
|
||||||
{{#if (and roll.result (not roll.type "reaction"))}}
|
{{#if (and roll.result (not (eq roll.type "reaction")))}}
|
||||||
<span>{{localize "DAGGERHEART.GENERAL.withThing" thing=roll.result.label}}</span>
|
<span>{{localize "DAGGERHEART.GENERAL.withThing" thing=roll.result.label}}</span>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue