Fixed coprse bug
This commit is contained in:
@@ -97,11 +97,19 @@ describe('TargetingSystem', () => {
|
||||
const enemyPos = { x: 3, y: 3 };
|
||||
(getClosestVisibleEnemy as any).mockReturnValue(enemyPos);
|
||||
|
||||
const mockAccessor = {
|
||||
getCombatant: vi.fn().mockReturnValue({
|
||||
pos: playerPos,
|
||||
inventory: { items: [{ id: 'item-1' }] }
|
||||
}),
|
||||
context: {}
|
||||
};
|
||||
|
||||
targetingSystem.startTargeting(
|
||||
'item-1',
|
||||
playerPos,
|
||||
mockWorld,
|
||||
{} as any, // accessor
|
||||
mockAccessor as any,
|
||||
1 as EntityId, // playerId
|
||||
new Uint8Array(100),
|
||||
10
|
||||
@@ -118,11 +126,19 @@ describe('TargetingSystem', () => {
|
||||
const mousePos = { x: 5, y: 5 };
|
||||
(getClosestVisibleEnemy as any).mockReturnValue(null);
|
||||
|
||||
const mockAccessor = {
|
||||
getCombatant: vi.fn().mockReturnValue({
|
||||
pos: playerPos,
|
||||
inventory: { items: [{ id: 'item-1' }] }
|
||||
}),
|
||||
context: {}
|
||||
};
|
||||
|
||||
targetingSystem.startTargeting(
|
||||
'item-1',
|
||||
playerPos,
|
||||
mockWorld,
|
||||
{} as any, // accessor
|
||||
mockAccessor as any,
|
||||
1 as EntityId, // playerId
|
||||
new Uint8Array(100),
|
||||
10,
|
||||
@@ -143,12 +159,20 @@ describe('TargetingSystem', () => {
|
||||
path: []
|
||||
});
|
||||
|
||||
const mockAccessor = {
|
||||
getCombatant: vi.fn().mockReturnValue({
|
||||
pos: playerPos,
|
||||
inventory: { items: [{ id: 'item-1' }] }
|
||||
}),
|
||||
context: {}
|
||||
};
|
||||
|
||||
// Start targeting
|
||||
targetingSystem.startTargeting(
|
||||
'item-1',
|
||||
playerPos,
|
||||
mockWorld,
|
||||
{} as any, // accessor
|
||||
mockAccessor as any,
|
||||
1 as EntityId,
|
||||
new Uint8Array(100),
|
||||
10,
|
||||
|
||||
Reference in New Issue
Block a user