add DhCharacter patch to inject Ikonis augment features into character sheet UI lists
This commit is contained in:
parent
7c52be79c3
commit
077d284987
2 changed files with 62 additions and 11 deletions
|
|
@ -1,4 +1,4 @@
|
|||
import { patchDHWeapon, patchIkonisLogic, DEFAULT_AUGMENTS } from './ikonis-data.js';
|
||||
import { patchDHWeapon, patchIkonisLogic, patchDhCharacter, DEFAULT_AUGMENTS } from './ikonis-data.js';
|
||||
import { patchIkonisSheet } from './ikonis-sheet.js';
|
||||
import { IkonisAugmentConfig } from './ikonis-config.js';
|
||||
|
||||
|
|
@ -87,8 +87,11 @@ Hooks.once('ready', async () => {
|
|||
}
|
||||
|
||||
const actorsApi = game.system.api.models.actors || {};
|
||||
const DhCharacter = actorsApi.DhCharacter || actorsApi.DHCharacter || actorsApi.character;
|
||||
const DhCharacter = actorsApi.DhCharacter || actorsApi.character;
|
||||
if (DhCharacter) {
|
||||
// Apply visual injection patch
|
||||
patchDhCharacter(DhCharacter);
|
||||
|
||||
Object.defineProperty(DhCharacter.prototype, 'primaryWeapon', {
|
||||
get: function() { return this.parent.items.find(x => x.type === 'weapon' && x.system.equipped && !x.system.secondary); },
|
||||
configurable: true
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue