-
Notifications
You must be signed in to change notification settings - Fork 13
Expand file tree
/
Copy pathCorona.d.ts
More file actions
80 lines (66 loc) · 2 KB
/
Corona.d.ts
File metadata and controls
80 lines (66 loc) · 2 KB
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
declare var Corona: Corona;
declare var module: CoronaModule;
declare var ComboOptions: ComboOptions;
declare var _this: any;
interface Corona {
Configs: any
Commands: any
Panels: any
Particles: any
Subscribes: any
Scripts: Map<String, CoronaModule>
MyTick: number
debug: boolean
debugLoad: boolean
debugAnimations: boolean
CoronaServer: string
SteamID: string
OnTick: ((/*self: */Function) => void)[]
OnUpdate: ((/*self: */Function) => void)[]
ForceStaffUnits: number
ServerRequest(name?: string, path?: string, data?: any): Promise<string | Array<any> | any>
SteamAPIRequest(type: string, IName: string, methodName: string, parameters: any, methodVersion: string): Promise<string | Array<any> | any>
GetScript(scriptName: string): Promise<string>
GetXML(file: string): Promise<string>
GetStyle(file: string): Promise<string>
SaveConfig(scriptName: string, config: any): Promise<string>
GetConfig(scriptName: string): Promise<string | Array<any> | any>
ReloadCorona(): void
LoadCorona(): Promise<void>
AddScriptToList(script: CoronaModule): void
LoadScriptFromString(scriptCode: string): any
}
interface Array<T> {
remove(obj: T): boolean
orderBy(sortF: (arg: T) => number): Array<T>
}
interface $ {
Msg_old(...args: any[]): void
/**
* Log a message
*/
Msg(tag: string, ...msg: any[]): void
Schedule_old(delay: number, callback: (callbackID: number) => void): number
/**
* Schedule a function to be called later
*/
Schedule(delay: number, callback: (callbackID: number) => void): number
}
interface CScriptBindingPR_Game {
allCreeps: Entity[]
}
interface CoronaModule {
name?: string
isVisible?: boolean
onInit?: () => void
onPreload?: () => void
onToggle?: (checkbox: Panel) => void
onDestroy?: () => void
exports?: any
}
interface ComboOptions {
combo_delay?: number
dynamicDelay?: (abil: Ability, caster: Entity, ent: Entity) => number
castCondition?: (abil: Ability, caster: Entity, ent: Entity) => boolean
custom_cast?: (caster: Entity, ent: Entity) => /*delay: */number
}