-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: implemented additional workers for server creation, added more …
…mocks, added factions and reputations, added viewport context, code refactors
- Loading branch information
Jure Rotar
committed
Nov 16, 2023
1 parent
519f8e8
commit 1a49602
Showing
76 changed files
with
1,581 additions
and
13,017 deletions.
There are no files selected for viewing
54 changes: 0 additions & 54 deletions
54
__mocks__/game/map/predefined-villages-coordinates-100x100-mock.ts
This file was deleted.
Oops, something went wrong.
54 changes: 0 additions & 54 deletions
54
__mocks__/game/map/predefined-villages-coordinates-200x200-mock.ts
This file was deleted.
Oops, something went wrong.
54 changes: 0 additions & 54 deletions
54
__mocks__/game/map/predefined-villages-coordinates-400x400-mock.ts
This file was deleted.
Oops, something went wrong.
112 changes: 112 additions & 0 deletions
112
__mocks__/game/map/predefined-villages-coordinates-mock.ts
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,112 @@ | ||
export const predefinedVillagesCoordinates100x100Mock = { | ||
artifactVillagesCoordinates: [ | ||
{ | ||
x: -17, | ||
y: 40 | ||
}, | ||
{ | ||
x: 17, | ||
y: 40 | ||
}, | ||
{ | ||
x: -17, | ||
y: -40 | ||
}, | ||
{ | ||
x: 17, | ||
y: -40 | ||
}, | ||
{ | ||
x: 40, | ||
y: 17 | ||
}, | ||
{ | ||
x: 40, | ||
y: -17 | ||
}, | ||
{ | ||
x: -40, | ||
y: 17 | ||
}, | ||
{ | ||
x: -40, | ||
y: -17 | ||
} | ||
], | ||
}; | ||
|
||
export const predefinedVillagesCoordinates200x200Mock = { | ||
artifactVillagesCoordinates: [ | ||
{ | ||
x: -33, | ||
y: 80 | ||
}, | ||
{ | ||
x: 33, | ||
y: 80 | ||
}, | ||
{ | ||
x: -33, | ||
y: -80 | ||
}, | ||
{ | ||
x: 33, | ||
y: -80 | ||
}, | ||
{ | ||
x: 80, | ||
y: 33 | ||
}, | ||
{ | ||
x: 80, | ||
y: -33 | ||
}, | ||
{ | ||
x: -80, | ||
y: 33 | ||
}, | ||
{ | ||
x: -80, | ||
y: -33 | ||
} | ||
], | ||
}; | ||
|
||
export const predefinedVillagesCoordinates400x400Mock = { | ||
artifactVillagesCoordinates: [ | ||
{ | ||
x: -66, | ||
y: 160 | ||
}, | ||
{ | ||
x: 66, | ||
y: 160 | ||
}, | ||
{ | ||
x: -66, | ||
y: -160 | ||
}, | ||
{ | ||
x: 66, | ||
y: -160 | ||
}, | ||
{ | ||
x: 160, | ||
y: 66 | ||
}, | ||
{ | ||
x: 160, | ||
y: -66 | ||
}, | ||
{ | ||
x: -160, | ||
y: 66 | ||
}, | ||
{ | ||
x: -160, | ||
y: -66 | ||
} | ||
], | ||
}; | ||
|
||
|
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,4 @@ | ||
import { BuildingField } from 'interfaces/models/game/village'; | ||
import { villagePresets } from 'assets/village-presets'; | ||
|
||
export const newVillageBuildingFieldsMock: BuildingField[] = villagePresets.find(({ preset }) => preset === 'new-village')!.buildingFields; |
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,41 @@ | ||
import { Player } from 'interfaces/models/game/player'; | ||
|
||
export const playerMock: Player = { | ||
"id": "42c53448-ab04-4ae3-8ce5-dccad55162a7", | ||
"serverId": "80d4669b-4222-41cd-a0c0-7c95dcaf2f59", | ||
"faction": "player" | ||
}; | ||
|
||
export const npcPlayerMock: Player = { | ||
"id": "524228a8-8610-43cf-807b-af241f18ba13", | ||
"serverId": "80d4669b-4222-41cd-a0c0-7c95dcaf2f59", | ||
"faction": "npc3" | ||
}; | ||
|
||
export const playersMock: Player[] = [ | ||
{ | ||
"id": "42c53448-ab04-4ae3-8ce5-dccad55162a7", | ||
"serverId": "80d4669b-4222-41cd-a0c0-7c95dcaf2f59", | ||
"faction": "player" | ||
}, | ||
{ | ||
"id": "524228a8-8610-43cf-807b-af241f18ba13", | ||
"serverId": "80d4669b-4222-41cd-a0c0-7c95dcaf2f59", | ||
"faction": "npc3" | ||
}, | ||
{ | ||
"id": "b2949612-7e4f-4695-8cb4-0f0b636a2d3e", | ||
"serverId": "80d4669b-4222-41cd-a0c0-7c95dcaf2f59", | ||
"faction": "npc2" | ||
}, | ||
{ | ||
"id": "c6be0a22-d6d2-4b79-a837-e844a4a865f3", | ||
"serverId": "80d4669b-4222-41cd-a0c0-7c95dcaf2f59", | ||
"faction": "npc4" | ||
}, | ||
{ | ||
"id": "dfacafb5-e241-4d4d-b673-ff56f6bcf03b", | ||
"serverId": "80d4669b-4222-41cd-a0c0-7c95dcaf2f59", | ||
"faction": "npc1" | ||
} | ||
] |
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,5 @@ | ||
Object.defineProperty(globalThis, 'crypto', { | ||
value: { | ||
randomUUID: () => 'uuid' | ||
} | ||
}); |
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
Oops, something went wrong.