Add setting to limit how many Aspects a character can have equipped
This commit is contained in:
parent
2fff1b84b5
commit
3e40d0f8c5
6 changed files with 77 additions and 11 deletions
|
|
@ -6,7 +6,7 @@ import AspectItem from "./Aspect.mjs";
|
|||
export class ItemHandler extends Item {
|
||||
/** @override */
|
||||
|
||||
itemTypes = {
|
||||
proxyTargets = {
|
||||
aspect: AspectItem,
|
||||
};
|
||||
|
||||
|
|
@ -16,7 +16,12 @@ export class ItemHandler extends Item {
|
|||
|
||||
/** @type {class|undefined} */
|
||||
get fn() {
|
||||
return this.itemTypes[this.type];
|
||||
return this.proxyTargets[this.type];
|
||||
};
|
||||
|
||||
async proxyFunction(funcName, ...args) {
|
||||
if (!this.fn?.[funcName]) return;
|
||||
return await this.fn?.[funcName].bind(this)(...args);
|
||||
};
|
||||
|
||||
async _preCreate(...args) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue