Skip to content

Commit

Permalink
fix(common): lint
Browse files Browse the repository at this point in the history
  • Loading branch information
Zamiell committed Sep 17, 2024
1 parent 5993e2b commit b5dec61
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 1 deletion.
1 change: 1 addition & 0 deletions packages/isaacscript-common/src/functions/bosses.ts
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,7 @@ export function getBossID(): BossID | undefined {

const room = game.GetRoom();

// eslint-disable-next-line @typescript-eslint/no-deprecated
const bossID = room.GetBossID();
if (bossID === 0) {
return undefined;
Expand Down
1 change: 1 addition & 0 deletions packages/isaacscript-common/src/functions/entities.ts
Original file line number Diff line number Diff line change
Expand Up @@ -442,6 +442,7 @@ export function isActiveEnemy(entity: Entity): boolean {
}
}

// eslint-disable-next-line @typescript-eslint/no-deprecated
return entity.IsActiveEnemy(false);
}

Expand Down
4 changes: 3 additions & 1 deletion packages/isaacscript-common/src/functions/rng.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@ export type SerializedRNG = LuaMap<string, unknown> & {
/**
* This is the ShiftIdx that Blade recommended after having reviewing the game's internal functions.
* Any value between 0 and 80 should work equally well.
* https://www.jstatsoft.org/article/view/v008i14/xorshift.pdf
*
* @see https://www.jstatsoft.org/article/view/v008i14/xorshift.pdf
*/
const RECOMMENDED_SHIFT_IDX = 35;

Expand Down Expand Up @@ -171,5 +172,6 @@ export function setSeed(rng: RNG, seed: Seed): void {
}

// The game expects seeds in the range of 1 to 4294967295 (1^32 - 1).
// eslint-disable-next-line @typescript-eslint/no-deprecated
rng.SetSeed(seed, RECOMMENDED_SHIFT_IDX);
}

0 comments on commit b5dec61

Please sign in to comment.