-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Extended mocks. Continue testing/moving object related utils by categ…
…ories.
- Loading branch information
Showing
16 changed files
with
182 additions
and
83 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
export * from "@/engine/core/utils/object/object_general"; | ||
export * from "@/engine/core/utils/object/object_location"; | ||
export * from "@/engine/core/utils/object/object_state"; | ||
export * from "@/engine/core/utils/object/object_find"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
import { registry } from "@/engine/core/database"; | ||
import { EStalkerState } from "@/engine/core/objects/state"; | ||
import { ClientObject } from "@/engine/lib/types"; | ||
|
||
/** | ||
* todo; | ||
*/ | ||
export function isObjectAsleep(object: ClientObject): boolean { | ||
return registry.objects.get(object.id()).stateManager!.animstate.states.currentState === EStalkerState.SLEEP; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,19 @@ | ||
import { jest } from "@jest/globals"; | ||
|
||
import { TNumberId } from "@/engine/lib/types"; | ||
import { MockCVertex } from "@/fixtures/xray/mocks/CVertex.mock"; | ||
|
||
/** | ||
* todo; | ||
*/ | ||
export class MockCGameGraph { | ||
public vertex = jest.fn(() => new MockCVertex()); | ||
public static registry: Record<TNumberId, MockCVertex> = {}; | ||
|
||
public vertex = jest.fn((vertexId: TNumberId = 1) => { | ||
if (!MockCGameGraph.registry[vertexId]) { | ||
MockCGameGraph.registry[vertexId] = new MockCVertex(vertexId); | ||
} | ||
|
||
return MockCGameGraph.registry[vertexId]; | ||
}); | ||
} |
Oops, something went wrong.