-
Notifications
You must be signed in to change notification settings - Fork 32
/
binarytype.go
51 lines (46 loc) · 928 Bytes
/
binarytype.go
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
package roblox
// BinaryType is a representation of available
// Roblox applications aka. Binaries
type BinaryType int
const (
Player BinaryType = iota
Studio
)
func (bt BinaryType) String() string {
switch bt {
case Player:
return "Player"
case Studio:
return "Studio"
default:
return "unknown"
}
}
// BinaryName returns Roblox's internal API name for the
// named BinaryType
//
// Does not support platforms other than Windows.
func (bt BinaryType) BinaryName() string {
switch bt {
case Player:
return "WindowsPlayer"
case Studio:
return "WindowsStudio64"
default:
return "unknown"
}
}
// Executable returns the executable file name for the
// named BinaryType
//
// Does not support platforms other than Windows.
func (bt BinaryType) Executable() string {
switch bt {
case Player:
return "RobloxPlayerBeta.exe"
case Studio:
return "RobloxStudioBeta.exe"
default:
return "unknown"
}
}