Commit b2d7538 1 parent bcfb528 commit b2d7538 Copy full SHA for b2d7538
File tree 2 files changed +65
-5
lines changed
2 files changed +65
-5
lines changed Original file line number Diff line number Diff line change
1
+ /**
2
+ * Simutronics has multiple games and instances per game.
3
+ * Only interested in DragonRealms, though.
4
+ */
5
+ export enum GameCode {
6
+ PRIME = 'DR' ,
7
+ PLATINUM = 'DRX' ,
8
+ FALLEN = 'DRF' ,
9
+ TEST = 'DRT' ,
10
+ DEVELOPMENT = 'DRD' ,
11
+ }
12
+
13
+ export interface GameCodeMeta {
14
+ /**
15
+ * The game code.
16
+ * Example: 'DR' or 'DRX'.
17
+ */
18
+ code : GameCode ;
19
+ /**
20
+ * The code name.
21
+ * Example: 'Prime' or 'Platinum'.
22
+ */
23
+ name : string ;
24
+ /**
25
+ * The game name.
26
+ * Example: 'DragonRealms'.
27
+ */
28
+ game : string ;
29
+ }
30
+
31
+ export const GameCodeMetaMap : Record < GameCode , GameCodeMeta > = {
32
+ DR : {
33
+ code : GameCode . PRIME ,
34
+ name : 'Prime' ,
35
+ game : 'DragonRealms' ,
36
+ } ,
37
+ DRX : {
38
+ code : GameCode . PLATINUM ,
39
+ name : 'Platinum' ,
40
+ game : 'DragonRealms' ,
41
+ } ,
42
+ DRF : {
43
+ code : GameCode . FALLEN ,
44
+ name : 'Fallen' ,
45
+ game : 'DragonRealms' ,
46
+ } ,
47
+ DRT : {
48
+ code : GameCode . TEST ,
49
+ name : 'Test' ,
50
+ game : 'DragonRealms' ,
51
+ } ,
52
+ DRD : {
53
+ code : GameCode . DEVELOPMENT ,
54
+ name : 'Development' ,
55
+ game : 'DragonRealms' ,
56
+ } ,
57
+ } ;
58
+
1
59
/**
2
60
* Events emitted by the game parser of data received from the game socket.
3
61
*/
Original file line number Diff line number Diff line change
1
+ import { GameCode } from '../../common/game/types.js' ;
2
+
1
3
export enum SGEGameProtocol {
2
4
STORMFRONT = 'STORM' ,
3
5
}
@@ -7,11 +9,11 @@ export enum SGEGameProtocol {
7
9
* Only interested in DragonRealms, though.
8
10
*/
9
11
export enum SGEGameCode {
10
- DRAGONREALMS_PRIME = 'DR' ,
11
- DRAGONREALMS_DEVELOPMENT = 'DRD' ,
12
- DRAGONREALMS_THE_FALLEN = 'DRF' ,
13
- DRAGONREALMS_PRIME_TEST = 'DRT' ,
14
- DRAGONREALMS_PLATINUM = 'DRX' ,
12
+ DRAGONREALMS_PRIME = GameCode . PRIME ,
13
+ DRAGONREALMS_FALLEN = GameCode . FALLEN ,
14
+ DRAGONREALMS_PLATINUM = GameCode . PLATINUM ,
15
+ DRAGONREALMS_TEST = GameCode . TEST ,
16
+ DRAGONREALMS_DEVELOPMENT = GameCode . DEVELOPMENT ,
15
17
}
16
18
17
19
export interface SGEGame {
You can’t perform that action at this time.
0 commit comments