Remove use of any in PlayerInputHandler
This commit is contained in:
@@ -2,7 +2,7 @@ import type { GameScene } from "../GameScene";
|
||||
import { TILE_SIZE } from "../../core/constants";
|
||||
import { inBounds } from "../../engine/world/world-logic";
|
||||
import { findPathAStar } from "../../engine/world/pathfinding";
|
||||
import type { Action } from "../../core/types";
|
||||
import type { Action, RangedWeaponItem } from "../../core/types";
|
||||
|
||||
export class PlayerInputHandler {
|
||||
private scene: GameScene;
|
||||
@@ -48,7 +48,7 @@ export class PlayerInputHandler {
|
||||
|
||||
// Check active target or main hand
|
||||
const activeId = this.scene.targetingSystem.itemId;
|
||||
let weaponToReload: any = null; // using any to avoid re-importing all item types if simpler, but ideally import types
|
||||
let weaponToReload: RangedWeaponItem | null = null;
|
||||
|
||||
if (activeId) {
|
||||
const item = player.inventory.items.find(it => it.id === activeId);
|
||||
|
||||
Reference in New Issue
Block a user