-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtypes.js
73 lines (61 loc) · 1.15 KB
/
types.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
// @flow
import type { Socket } from 'net';
export type tVersion = {
major: number,
minor: number,
revision: number,
patch: number
};
export type tSocket = Socket & {
version: tVersion,
seed: number,
username: string
};
export type tClientKeys = {
key1: number,
key2: number
};
export type tCompression = {
huffmanTable: Array<number>,
compress: (src: Buffer | Array<number>) => Buffer,
decompress: (src: Buffer | Array<number>) => Buffer
};
export type tConnection = {
username: string,
version: tVersion
};
export type tServer = {
id: number,
name: string,
active: boolean,
ip: string,
port: number | string,
max_players: number,
timezone: number
};
export type tPosition = {
x: number,
y: number,
z: number,
map: number
};
export type tStartingLocation = {
name: string,
area: string,
position: tPosition,
cliloc: number
};
export type tConfig = {
port: number,
servers: Array<tServer>,
startingLocations: Array<tStartingLocation>,
charLimit: number
};
export type tCharacter = {
charName: string
};
export type tUser = {
username: string,
password: string,
characters: Array<tCharacter>
};