-
Notifications
You must be signed in to change notification settings - Fork 39
/
Copy pathrainbow-six.d.ts
140 lines (122 loc) · 4.26 KB
/
rainbow-six.d.ts
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
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
declare namespace overwolf.gep.R6 {
enum R6PTeam {
Orange = "Orange",
Blue = "Blue",
Spectator = "Spectator"
}
enum R6Outcome {
Victory = "victory",
Defeat = "defeat"
}
enum R6PGameMode {
None = "NONE",
MultiplayerNewcomer = "MATCHMAKING_PVP_NEWCOMER",
MultiplayerQuickMatch = "MATCHMAKING_PVP",
MultiplayerSpecialEvent = "MATCHMAKING_PVP_EVENT",
MultiplayerArcadePlaylist = "MATCHMAKING_PVP_EVENT",
MultiplayerRanked = "MATCHMAKING_PVP_RANKED",
MultiplayerUnranked = "MATCHMAKING_PVP_UNRANKED",
MultiplayerCustomGameLocal = "CUSTOMGAME_PVP",
MultiplayerCustomGameOnline = "CUSTOMGAME_PVP_DEDICATED",
PlayerVsAISituations = "OPERATIONS",
PlayerVsAITrainingGroundsLonewolf = "MATCHMAKING_PVE_LONEWOLF",
PlayerVsAITrainingGroundsOnline = "MATCHMAKING_PVE_PARTY",
PlayerVsAITrainingGroundsSquadOnly = "MATCHMAKING_PVE_PARTY",
}
enum R6Phase {
Lobby = "lobby",
Teammates = "teammates",
Announce = "announce",
OperatorSelect = "operator_select",
Loading = "loading",
RoundResults = "round_results"
}
enum R6PMapId {
Bank = "BANK",
BarlettUniversity = "BARLETT UNIVERSITY",
Border = "BORDER",
Coastline = "COASTLINE",
ClubHouse = "CLUB HOUSE",
Consulate = "CONSULATE",
Favela = "FAVELA",
Fortress = "FORTRESS",
HerefordBase = "HEREFORD BASE",
House = "HOUSE",
KafeDostoyevsky = "KAFE DOSTOYEVSKY",
Kanal = "KANAL",
Oregon = "OREGON",
Outback = "OUTBACK",
PresidentialPlane = "PRESIDENTIAL PLANE",
Skyscraper = "SKYSCRAPER",
ThemePark = "THEME PARK",
Tower = "TOWER",
Villa = "VILLA",
Yacht = "YACHT",
}
enum R6PRoundOutcomeType {
TeamHasBeenEliminated = "team_has_been_eliminated",
BombDetonated = "bomb_detonated",
ObjectiveSecured = "objective_secured",
TimeHasExpired = "time_has_expired",
ExtractedTheHostages = "extracted_thehostages",
KilledHostages = "killed_hostages"
}
interface R6Player {
name?: string;
team?: string;
is_local?: boolean;
operator?: number;
kills?: number;
deaths?: number;
score?: number;
health?: number;
}
// --------------------------------------------------------------------------
/**
* All available game info updates. When a new info update is triggered, it's one of these keys.
*/
interface R6InfoUpdates extends overwolf.games.events.InfoUpdate2 {
phase?: R6Phase;
pseudo_match_id?: string;
game_mode?: R6PGameMode;
match_id?: string;
map_id?: R6PMapId;
round_outcome_type?: R6PRoundOutcomeType;
number?: number;
score?: {blue?:number; orange?: number;}; //match feature
players?: { roster_0?: R6Player; roster_1?: R6Player; roster_2?: R6Player; roster_3?: R6Player; };
team?: R6PTeam;
health?: number;
//score?: number; //roster feature
kills?: number;
deaths?: number;
operator?: string;
name?: string;
account_id?: string;
}
/**
* All available game events. When a new event is triggered, it's one of these keys.
*/
interface R6GameEvents extends overwolf.games.events.GameEventDictionary2 {
roundStart?: null;
roundEnd?: null;
roundOutcome?: R6Outcome;
matchOutcome?: R6Outcome;
kill?: null;
headshot?: null;
knockedout?: null;
death?: null;
killer?: string;
}
// --------------------------------------------------------------------------
/**
* Intended to be used with overwolf.games.events.onInfoUpdates2.addListener
*/
type R6GameEvent2info =
overwolf.games.events.InfoUpdates2Event<R6InfoUpdates>;
/**
* Intended to be used with overwolf.games.events.onNewEvent2.addListener
*/
type R6GameEvent2Event =
overwolf.games.events.GameEvent2<R6GameEvents>;
}