Make private methods protected

This commit is contained in:
Johannes Loher 2021-03-04 10:00:46 +01:00
parent 71eedaf080
commit f7c18dc702

View file

@ -58,7 +58,7 @@ export class DS4Item extends Item<DS4ItemData> {
}
}
private async rollWeapon(this: this & { readonly isOwned: true }): Promise<void> {
protected async rollWeapon(this: this & { readonly isOwned: true }): Promise<void> {
if (!(this.data.type === "weapon")) {
throw new Error(
game.i18n.format("DS4.ErrorWrongItemType", {
@ -91,7 +91,7 @@ export class DS4Item extends Item<DS4ItemData> {
});
}
private async rollSpell(): Promise<void> {
protected async rollSpell(): Promise<void> {
if (!(this.data.type === "spell")) {
throw new Error(
game.i18n.format("DS4.ErrorWrongItemType", {
@ -133,7 +133,7 @@ export class DS4Item extends Item<DS4ItemData> {
});
}
private async getCombatValueKeyForAttackType(attackType: AttackType): Promise<"meleeAttack" | "rangedAttack"> {
protected async getCombatValueKeyForAttackType(attackType: AttackType): Promise<"meleeAttack" | "rangedAttack"> {
if (attackType === "meleeRanged") {
const { melee, ranged } = { ...DS4.i18n.attackTypes };
const identifier = "attack-type-selection";