consistency in return type

This commit is contained in:
Greenlamp 2024-05-07 01:54:51 +02:00
parent 70476078ba
commit 557c21fd25
2 changed files with 2 additions and 2 deletions

View File

@ -1725,8 +1725,8 @@ export default class BattleScene extends SceneBase {
getEnemyModifiersOverride(): Array<string> { getEnemyModifiersOverride(): Array<string> {
// if no override, do nothing // if no override, do nothing
if (!OPP_MODIFIER_OVERRIDE || OPP_MODIFIER_OVERRIDE.length === 0) return;
const ret = []; const ret = [];
if (!OPP_MODIFIER_OVERRIDE || OPP_MODIFIER_OVERRIDE.length === 0) return ret;
// we loop through all the modifier name given in the override file // we loop through all the modifier name given in the override file
for (const [index, modifierName] of OPP_MODIFIER_OVERRIDE.entries()) { for (const [index, modifierName] of OPP_MODIFIER_OVERRIDE.entries()) {
// if the modifier does not exist, we skip it // if the modifier does not exist, we skip it

View File

@ -64,8 +64,8 @@ export class GameMode implements GameModeConfig {
getModifierOverride(): Modifier[] { getModifierOverride(): Modifier[] {
// if no override, do nothing // if no override, do nothing
if (!STARTING_MODIFIER_OVERRIDE || STARTING_MODIFIER_OVERRIDE.length === 0) return;
const modifiers: Modifier[] = new Array(); const modifiers: Modifier[] = new Array();
if (!STARTING_MODIFIER_OVERRIDE || STARTING_MODIFIER_OVERRIDE.length === 0) return modifiers;
// we loop through all the modifier name given in the override file // we loop through all the modifier name given in the override file
for (const [index, modifierName] of STARTING_MODIFIER_OVERRIDE.entries()) { for (const [index, modifierName] of STARTING_MODIFIER_OVERRIDE.entries()) {
// if the modifier does not exist, we skip it // if the modifier does not exist, we skip it