@tlua/gmod 1.0.3 → 1.0.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (216) hide show
  1. package/index.d.tlua +1 -0
  2. package/package.json +1 -1
  3. package/types/achievements.d.tlua +15 -45
  4. package/types/ai.d.tlua +5 -15
  5. package/types/angle.d.tlua +18 -54
  6. package/types/baseclass.d.tlua +2 -4
  7. package/types/bf_read.d.tlua +11 -32
  8. package/types/bit.d.tlua +11 -33
  9. package/types/cam.d.tlua +16 -48
  10. package/types/ceffectdata.d.tlua +32 -95
  11. package/types/chat.d.tlua +5 -15
  12. package/types/cleanup.d.tlua +7 -21
  13. package/types/cluaemitter.d.tlua +12 -35
  14. package/types/clualocomotion.d.tlua +40 -119
  15. package/types/cluaparticle.d.tlua +44 -131
  16. package/types/cmovedata.d.tlua +47 -140
  17. package/types/cnavarea.d.tlua +77 -230
  18. package/types/cnavladder.d.tlua +22 -65
  19. package/types/cnewparticleeffect.d.tlua +26 -77
  20. package/types/color.d.tlua +28 -84
  21. package/types/concommand.d.tlua +4 -12
  22. package/types/constraint.d.tlua +28 -84
  23. package/types/construct.d.tlua +1 -3
  24. package/types/contentheader.d.tlua +3 -6
  25. package/types/contenticon.d.tlua +9 -24
  26. package/types/contentsidebar.d.tlua +4 -9
  27. package/types/contextbase.d.tlua +4 -9
  28. package/types/controlpanel.d.tlua +18 -40
  29. package/types/controlpresets.d.tlua +13 -36
  30. package/types/convar.d.tlua +16 -47
  31. package/types/cookie.d.tlua +3 -9
  32. package/types/coroutine.d.tlua +7 -21
  33. package/types/crecipientfilter.d.tlua +16 -47
  34. package/types/csoundpatch.d.tlua +14 -41
  35. package/types/ctakedamageinfo.d.tlua +33 -98
  36. package/types/ctrlnumpad.d.tlua +6 -17
  37. package/types/cusercmd.d.tlua +27 -80
  38. package/types/cvars.d.tlua +6 -18
  39. package/types/dadjustablemodelpanel.d.tlua +7 -18
  40. package/types/dalphabar.d.tlua +3 -6
  41. package/types/dbinder.d.tlua +4 -9
  42. package/types/dbubblecontainer.d.tlua +2 -3
  43. package/types/dbutton.d.tlua +8 -21
  44. package/types/dcheckbox.d.tlua +5 -12
  45. package/types/dcheckboxlabel.d.tlua +9 -27
  46. package/types/dcollapsiblecategory.d.tlua +23 -66
  47. package/types/dcolorbutton.d.tlua +7 -18
  48. package/types/dcolorcombo.d.tlua +5 -12
  49. package/types/dcolorcube.d.tlua +13 -36
  50. package/types/dcolormixer.d.tlua +27 -78
  51. package/types/dcolorpalette.d.tlua +23 -66
  52. package/types/dcolumnsheet.d.tlua +5 -12
  53. package/types/dcombobox.d.tlua +17 -48
  54. package/types/ddragbase.d.tlua +13 -36
  55. package/types/ddrawer.d.tlua +8 -21
  56. package/types/debug.d.tlua +44 -76
  57. package/types/debugoverlay.d.tlua +11 -33
  58. package/types/dentityproperties.d.tlua +5 -12
  59. package/types/derma.d.tlua +10 -30
  60. package/types/dexpandbutton.d.tlua +3 -6
  61. package/types/dfilebrowser.d.tlua +20 -60
  62. package/types/dform.d.tlua +18 -51
  63. package/types/dframe.d.tlua +24 -72
  64. package/types/dgrid.d.tlua +11 -30
  65. package/types/dhorizontaldivider.d.tlua +20 -57
  66. package/types/dhorizontalscroller.d.tlua +11 -30
  67. package/types/dhscrollbar.d.tlua +11 -30
  68. package/types/dhtml.d.tlua +8 -21
  69. package/types/dhtmlcontrols.d.tlua +5 -15
  70. package/types/diconbrowser.d.tlua +11 -30
  71. package/types/diconlayout.d.tlua +18 -51
  72. package/types/dimage.d.tlua +20 -55
  73. package/types/dimagebutton.d.tlua +9 -27
  74. package/types/dlabel.d.tlua +33 -96
  75. package/types/dlabeleditable.d.tlua +5 -12
  76. package/types/dlabelurl.d.tlua +10 -27
  77. package/types/dlistbox.d.tlua +8 -21
  78. package/types/dlistboxitem.d.tlua +4 -9
  79. package/types/dlistview.d.tlua +34 -99
  80. package/types/dlistview_column.d.tlua +14 -39
  81. package/types/dlistview_line.d.tlua +13 -36
  82. package/types/dmenu.d.tlua +28 -75
  83. package/types/dmenubar.d.tlua +6 -11
  84. package/types/dmenuoption.d.tlua +13 -36
  85. package/types/dmenuoptioncvar.d.tlua +6 -15
  86. package/types/dmodelpanel.d.tlua +22 -63
  87. package/types/dmodelselect.d.tlua +2 -3
  88. package/types/dmodelselectmulti.d.tlua +2 -3
  89. package/types/dnotify.d.tlua +10 -27
  90. package/types/dnumberscratch.d.tlua +26 -75
  91. package/types/dnumberwang.d.tlua +16 -45
  92. package/types/dnumslider.d.tlua +17 -51
  93. package/types/dpanel.d.tlua +14 -39
  94. package/types/dpanellist.d.tlua +11 -33
  95. package/types/dpaneloverlay.d.tlua +7 -18
  96. package/types/dpanpanel.d.tlua +6 -15
  97. package/types/dprogress.d.tlua +3 -6
  98. package/types/dproperties.d.tlua +4 -9
  99. package/types/dproperty_combo.d.tlua +3 -6
  100. package/types/dproperty_generic.d.tlua +5 -12
  101. package/types/dpropertysheet.d.tlua +26 -56
  102. package/types/dragndrop.d.tlua +10 -30
  103. package/types/draw.d.tlua +11 -31
  104. package/types/drgbpicker.d.tlua +4 -9
  105. package/types/drive.d.tlua +18 -41
  106. package/types/dscrollpanel.d.tlua +10 -30
  107. package/types/dshape.d.tlua +7 -18
  108. package/types/dsizetocontents.d.tlua +5 -12
  109. package/types/dslider.d.tlua +28 -81
  110. package/types/dsprite.d.tlua +9 -24
  111. package/types/dtab.d.tlua +8 -21
  112. package/types/dtextentry.d.tlua +43 -126
  113. package/types/dtilelayout.d.tlua +21 -60
  114. package/types/dtooltip.d.tlua +6 -15
  115. package/types/dtree.d.tlua +16 -45
  116. package/types/dtree_node.d.tlua +68 -201
  117. package/types/duplicator.d.tlua +30 -88
  118. package/types/dverticaldivider.d.tlua +23 -66
  119. package/types/dvscrollbar.d.tlua +11 -30
  120. package/types/effect.d.tlua +4 -9
  121. package/types/effects.d.tlua +6 -18
  122. package/types/engine.d.tlua +21 -63
  123. package/types/entity.d.tlua +676 -1962
  124. package/types/ents.d.tlua +23 -61
  125. package/types/file.d.tlua +39 -117
  126. package/types/frame_blend.d.tlua +7 -21
  127. package/types/game.d.tlua +39 -117
  128. package/types/gameevent.d.tlua +4 -8
  129. package/types/gamemode.d.tlua +3 -7
  130. package/types/gm.d.tlua +267 -800
  131. package/types/gmsave.d.tlua +4 -12
  132. package/types/gui.d.tlua +21 -63
  133. package/types/gwen.d.tlua +3 -9
  134. package/types/halo.d.tlua +2 -6
  135. package/types/hook.d.tlua +8 -17
  136. package/types/hook_events.d.tlua +2412 -0
  137. package/types/http.d.tlua +1 -3
  138. package/types/iconeditor.d.tlua +11 -30
  139. package/types/igmodaudiochannel.d.tlua +41 -122
  140. package/types/imagecheckbox.d.tlua +4 -9
  141. package/types/imaterial.d.tlua +26 -77
  142. package/types/imesh.d.tlua +5 -14
  143. package/types/input.d.tlua +24 -68
  144. package/types/irestore.d.tlua +9 -26
  145. package/types/isave.d.tlua +9 -26
  146. package/types/itexture.d.tlua +10 -29
  147. package/types/ivideowriter.d.tlua +5 -14
  148. package/types/jit.d.tlua +21 -53
  149. package/types/killicon.d.tlua +7 -21
  150. package/types/language.d.tlua +1 -3
  151. package/types/list.d.tlua +8 -24
  152. package/types/markup.d.tlua +2 -6
  153. package/types/markupobject.d.tlua +5 -14
  154. package/types/math.d.tlua +277 -447
  155. package/types/matproxy.d.tlua +3 -9
  156. package/types/matselect.d.tlua +11 -30
  157. package/types/menubar.d.tlua +2 -6
  158. package/types/mesh.d.tlua +19 -57
  159. package/types/motionsensor.d.tlua +10 -30
  160. package/types/navmesh.d.tlua +26 -78
  161. package/types/net.d.tlua +52 -154
  162. package/types/nextbot.d.tlua +46 -116
  163. package/types/notification.d.tlua +2 -6
  164. package/types/npc.d.tlua +182 -543
  165. package/types/numpad.d.tlua +7 -21
  166. package/types/os.d.tlua +4 -10
  167. package/types/panel.d.tlua +333 -991
  168. package/types/pathfollower.d.tlua +31 -92
  169. package/types/permissions.d.tlua +6 -18
  170. package/types/physcollide.d.tlua +3 -8
  171. package/types/physenv.d.tlua +11 -33
  172. package/types/physobj.d.tlua +78 -233
  173. package/types/player.d.tlua +302 -880
  174. package/types/player_manager.d.tlua +13 -39
  175. package/types/presets.d.tlua +6 -18
  176. package/types/projectedtexture.d.tlua +48 -143
  177. package/types/properties.d.tlua +5 -15
  178. package/types/propselect.d.tlua +5 -12
  179. package/types/render.d.tlua +142 -426
  180. package/types/resource.d.tlua +2 -6
  181. package/types/sandbox.d.tlua +54 -159
  182. package/types/saverestore.d.tlua +12 -36
  183. package/types/schedule.d.tlua +6 -17
  184. package/types/scripted_ents.d.tlua +11 -29
  185. package/types/search.d.tlua +1 -3
  186. package/types/serverlist.d.tlua +7 -21
  187. package/types/sound.d.tlua +10 -30
  188. package/types/spawnicon.d.tlua +8 -21
  189. package/types/spawnmenu.d.tlua +24 -70
  190. package/types/spawnmenucontentpanel.d.tlua +5 -12
  191. package/types/sql.d.tlua +9 -27
  192. package/types/stack.d.tlua +5 -14
  193. package/types/steamworks.d.tlua +18 -54
  194. package/types/string.d.tlua +49 -141
  195. package/types/surface.d.tlua +34 -102
  196. package/types/surfaceinfo.d.tlua +5 -14
  197. package/types/system.d.tlua +10 -30
  198. package/types/table.d.tlua +47 -137
  199. package/types/task.d.tlua +9 -26
  200. package/types/team.d.tlua +19 -57
  201. package/types/timer.d.tlua +14 -42
  202. package/types/tool.d.tlua +46 -131
  203. package/types/ugcpublishwindow.d.tlua +9 -24
  204. package/types/umsg.d.tlua +12 -36
  205. package/types/undo.d.tlua +10 -30
  206. package/types/usermessage.d.tlua +2 -6
  207. package/types/utf8.d.tlua +7 -21
  208. package/types/util.d.tlua +94 -274
  209. package/types/vector.d.tlua +36 -108
  210. package/types/vehicle.d.tlua +52 -149
  211. package/types/vgui.d.tlua +18 -46
  212. package/types/vmatrix.d.tlua +35 -105
  213. package/types/weapon.d.tlua +85 -248
  214. package/types/weapons.d.tlua +6 -16
  215. package/types/widgets.d.tlua +1 -3
  216. package/types/workshopfilebase.d.tlua +5 -14
@@ -18,27 +18,18 @@ interface TableLib {
18
18
  * @source https://wiki.facepunch.com/gmod/table.Add
19
19
  */
20
20
  Add(target: table, source: table): table;
21
- }
22
-
23
- interface TableLib {
24
21
  /**
25
22
  * Changes all keys to sequential integers. This creates a new table object and does not affect the original.
26
23
  * @realm shared and menu
27
24
  * @source https://wiki.facepunch.com/gmod/table.ClearKeys
28
25
  */
29
26
  ClearKeys(table: table, saveKeys?: boolean): table;
30
- }
31
-
32
- interface TableLib {
33
27
  /**
34
28
  * Collapses a table with keyvalue structure
35
29
  * @realm shared and menu
36
30
  * @source https://wiki.facepunch.com/gmod/table.CollapseKeyValue
37
31
  */
38
32
  CollapseKeyValue(input: table): table;
39
- }
40
-
41
- interface TableLib {
42
33
  /**
43
34
  * Creates and returns a deep copy of a table.
44
35
  *
@@ -49,19 +40,12 @@ interface TableLib {
49
40
  * @source https://wiki.facepunch.com/gmod/table.Copy
50
41
  */
51
42
  Copy<T extends table>(originalTable: T): T;
52
- }
53
-
54
-
55
- interface TableLib {
56
43
  /**
57
44
  * Empties the target table, and merges all values from the source table into it.
58
45
  * @realm shared and menu
59
46
  * @source https://wiki.facepunch.com/gmod/table.CopyFromTo
60
47
  */
61
48
  CopyFromTo(source: table, target: table): void;
62
- }
63
-
64
- interface TableLib {
65
49
  /**
66
50
  * Counts the amount of keys in a table. This should only be used when a table is not numerically and sequentially indexed. For those tables, consider the length (**#**) operator.
67
51
  *
@@ -71,27 +55,18 @@ interface TableLib {
71
55
  * @source https://wiki.facepunch.com/gmod/table.Count
72
56
  */
73
57
  Count(tbl: table): number;
74
- }
75
-
76
- interface TableLib {
77
58
  /**
78
59
  * Converts a table that has been sanitised with [table.Sanitise](https://wiki.facepunch.com/gmod/table.Sanitise) back to its original form
79
60
  * @realm shared and menu
80
61
  * @source https://wiki.facepunch.com/gmod/table.DeSanitise
81
62
  */
82
63
  DeSanitise(tbl: table): table;
83
- }
84
-
85
- interface TableLib {
86
64
  /**
87
65
  * Removes all values from a table. If your table is not a metatable, it is almost always better to use `tab = {}` to preserve performance.
88
66
  * @realm shared and menu
89
67
  * @source https://wiki.facepunch.com/gmod/table.Empty
90
68
  */
91
69
  Empty(tbl: table): void;
92
- }
93
-
94
- interface TableLib {
95
70
  /**
96
71
  * Returns the value positioned after the supplied value in a table. If it isn't found then the first element in the table is returned
97
72
  *
@@ -100,9 +75,6 @@ interface TableLib {
100
75
  * @deprecated Instead, iterate the table using ipairs or increment from the previous index using Global.next. Non-numerically indexed tables are not ordered.
101
76
  */
102
77
  FindNext(tbl: table, value: any): any;
103
- }
104
-
105
- interface TableLib {
106
78
  /**
107
79
  * Returns the value positioned before the supplied value in a table. If it isn't found then the last element in the table is returned
108
80
  *
@@ -111,9 +83,6 @@ interface TableLib {
111
83
  * @deprecated Instead, iterate your table with ipairs, storing the previous value and checking for the target. Non-numerically indexed tables are not ordered.
112
84
  */
113
85
  FindPrev(tbl: table, value: any): any;
114
- }
115
-
116
- interface TableLib {
117
86
  /**
118
87
  * Flips key-value pairs of each element within a table, so that each value becomes the key, and each key becomes the value.
119
88
  *
@@ -131,18 +100,12 @@ interface TableLib {
131
100
  * @source https://wiki.facepunch.com/gmod/table.Flip
132
101
  */
133
102
  Flip(input: table): table;
134
- }
135
-
136
- interface TableLib {
137
103
  /**
138
104
  * Inserts a value in to the given table even if the table is non-existent
139
105
  * @realm shared and menu
140
106
  * @source https://wiki.facepunch.com/gmod/table.ForceInsert
141
107
  */
142
108
  ForceInsert(tab?: table, value?: any): table;
143
- }
144
-
145
- interface TableLib {
146
109
  /**
147
110
  * Returns the first key found in the given table
148
111
  *
@@ -151,9 +114,6 @@ interface TableLib {
151
114
  * @deprecated Instead, expect the first key to be 1. Non-numerically indexed tables are not ordered and do not have a first key.
152
115
  */
153
116
  GetFirstKey(tab: table): any;
154
- }
155
-
156
- interface TableLib {
157
117
  /**
158
118
  * Returns the first value found in the given table
159
119
  *
@@ -162,18 +122,12 @@ interface TableLib {
162
122
  * @deprecated Instead, index the table with a key of 1. Non-numerically indexed tables are not ordered and do not have a first key.
163
123
  */
164
124
  GetFirstValue(tab: table): any;
165
- }
166
-
167
- interface TableLib {
168
125
  /**
169
126
  * Returns all keys of a table.
170
127
  * @realm shared and menu
171
128
  * @source https://wiki.facepunch.com/gmod/table.GetKeys
172
129
  */
173
130
  GetKeys(tabl: table): table;
174
- }
175
-
176
- interface TableLib {
177
131
  /**
178
132
  * Returns the last key found in the given table
179
133
  *
@@ -182,9 +136,6 @@ interface TableLib {
182
136
  * @deprecated Instead, use the result of the length (#) operator, ensuring it is not zero. Non-numerically indexed tables are not ordered and do not have a last key.
183
137
  */
184
138
  GetLastKey(tab: table): any;
185
- }
186
-
187
- interface TableLib {
188
139
  /**
189
140
  * Returns the last value found in the given table
190
141
  *
@@ -193,18 +144,12 @@ interface TableLib {
193
144
  * @deprecated Instead, index the table with the result of the length (#) operator, ensuring it is not zero. Non-numerically indexed tables are not ordered and do not have a last key.
194
145
  */
195
146
  GetLastValue(tab: table): any;
196
- }
197
-
198
- interface TableLib {
199
147
  /**
200
148
  * Returns a key of the supplied table with the highest number value.
201
149
  * @realm shared and menu
202
150
  * @source https://wiki.facepunch.com/gmod/table.GetWinningKey
203
151
  */
204
152
  GetWinningKey(inputTable: table): any;
205
- }
206
-
207
- interface TableLib {
208
153
  /**
209
154
  * Checks if a table has a value.
210
155
  * **WARNING**: This function is **very inefficient for large tables** (O(n)) and should probably not be called in things that run each frame. Instead, consider a table structure such as example 2 below. Also see: [Tables: Bad Habits](https://wiki.facepunch.com/gmod/Tables:_Bad_Habits)
@@ -216,9 +161,6 @@ interface TableLib {
216
161
  * @source https://wiki.facepunch.com/gmod/table.HasValue
217
162
  */
218
163
  HasValue(tbl: table, value: any): boolean;
219
- }
220
-
221
- interface TableLib {
222
164
  /**
223
165
  * Copies any missing data from `base` to `target`, and sets the `target`'s `BaseClass` member to the `base` table's pointer.
224
166
  *
@@ -233,9 +175,6 @@ interface TableLib {
233
175
  * @source https://wiki.facepunch.com/gmod/table.Inherit
234
176
  */
235
177
  Inherit(target: table, base: table): table;
236
- }
237
-
238
- interface TableLib {
239
178
  /**
240
179
  * Returns whether or not the given table is empty.
241
180
  *
@@ -247,45 +186,30 @@ interface TableLib {
247
186
  * @source https://wiki.facepunch.com/gmod/table.IsEmpty
248
187
  */
249
188
  IsEmpty(tab: table): boolean;
250
- }
251
-
252
- interface TableLib {
253
189
  /**
254
190
  * Returns whether or not the table's keys are sequential
255
191
  * @realm shared and menu
256
192
  * @source https://wiki.facepunch.com/gmod/table.IsSequential
257
193
  */
258
194
  IsSequential(tab: table): boolean;
259
- }
260
-
261
- interface TableLib {
262
195
  /**
263
196
  * Returns the first key found to be containing the supplied value
264
197
  * @realm shared and menu
265
198
  * @source https://wiki.facepunch.com/gmod/table.KeyFromValue
266
199
  */
267
200
  KeyFromValue(tab: table, value: any): any;
268
- }
269
-
270
- interface TableLib {
271
201
  /**
272
202
  * Returns a table of keys containing the supplied value
273
203
  * @realm shared and menu
274
204
  * @source https://wiki.facepunch.com/gmod/table.KeysFromValue
275
205
  */
276
206
  KeysFromValue(tab: table, value: any): table;
277
- }
278
-
279
- interface TableLib {
280
207
  /**
281
208
  * Returns a copy of the input table with all string keys converted to be lowercase recursively
282
209
  * @realm shared and menu
283
210
  * @source https://wiki.facepunch.com/gmod/table.LowerKeyNames
284
211
  */
285
212
  LowerKeyNames(tbl: table): table;
286
- }
287
-
288
- interface TableLib {
289
213
  /**
290
214
  * Returns an array of values of given with given key from each table of given table.
291
215
  *
@@ -294,9 +218,6 @@ interface TableLib {
294
218
  * @source https://wiki.facepunch.com/gmod/table.MemberValuesFromKey
295
219
  */
296
220
  MemberValuesFromKey(inputTable: table, keyName: any): table;
297
- }
298
-
299
- interface TableLib {
300
221
  /**
301
222
  * **NOTE**: This function can cause a stack overflow under certain circumstances.
302
223
  *
@@ -312,9 +233,6 @@ interface TableLib {
312
233
  * @source https://wiki.facepunch.com/gmod/table.Merge
313
234
  */
314
235
  Merge(destination: table, source: table, forceOverride?: boolean): table;
315
- }
316
-
317
- interface TableLib {
318
236
  /**
319
237
  * Packs a set of items into a table and returns the new table. It is meant as an alternative implementation of `table.pack` from newer versions of Lua.
320
238
  *
@@ -322,9 +240,6 @@ interface TableLib {
322
240
  * @source https://wiki.facepunch.com/gmod/table.Pack
323
241
  */
324
242
  Pack(...: any): (table, number);
325
- }
326
-
327
- interface TableLib {
328
243
  /**
329
244
  * Returns a random value from the supplied table.
330
245
  *
@@ -339,9 +254,6 @@ interface TableLib {
339
254
  * @source https://wiki.facepunch.com/gmod/table.Random
340
255
  */
341
256
  Random(haystack: table): (any, any);
342
- }
343
-
344
- interface TableLib {
345
257
  /**
346
258
  * Removes the first instance of a given value from the specified table with [table.remove](https://wiki.facepunch.com/gmod/table.remove), then returns the key that the value was found at.
347
259
  *
@@ -351,18 +263,12 @@ interface TableLib {
351
263
  * @source https://wiki.facepunch.com/gmod/table.RemoveByValue
352
264
  */
353
265
  RemoveByValue(tbl: table, val: any): any;
354
- }
355
-
356
- interface TableLib {
357
266
  /**
358
267
  * Returns a reversed copy of a sequential table. Any non-sequential and non-numeric keyvalue pairs will not be copied.
359
268
  * @realm shared and menu
360
269
  * @source https://wiki.facepunch.com/gmod/table.Reverse
361
270
  */
362
271
  Reverse(tbl: table): table;
363
- }
364
-
365
- interface TableLib {
366
272
  /**
367
273
  * Converts [Vector](https://wiki.facepunch.com/gmod/Vector)s, [Angle](https://wiki.facepunch.com/gmod/Angle)s and [boolean](https://wiki.facepunch.com/gmod/boolean)s to be able to be converted to and from key-values via [util.TableToKeyValues](https://wiki.facepunch.com/gmod/util.TableToKeyValues).
368
274
  *
@@ -371,9 +277,6 @@ interface TableLib {
371
277
  * @source https://wiki.facepunch.com/gmod/table.Sanitise
372
278
  */
373
279
  Sanitise(tab: table): table;
374
- }
375
-
376
- interface TableLib {
377
280
  /**
378
281
  * Performs an inline [Fisher-Yates shuffle](https://en.wikipedia.org/wiki/Fisher%E2%80%93Yates_shuffle) on the table in `O(n)` time
379
282
  *
@@ -381,9 +284,6 @@ interface TableLib {
381
284
  * @source https://wiki.facepunch.com/gmod/table.Shuffle
382
285
  */
383
286
  Shuffle(target: table): void;
384
- }
385
-
386
- interface TableLib {
387
287
  /**
388
288
  * Returns a list of keys sorted based on values of those keys.
389
289
  *
@@ -393,18 +293,12 @@ interface TableLib {
393
293
  * @source https://wiki.facepunch.com/gmod/table.SortByKey
394
294
  */
395
295
  SortByKey(tab: table, descending?: boolean): table;
396
- }
397
-
398
- interface TableLib {
399
296
  /**
400
297
  * Sorts a table by a named member.
401
298
  * @realm shared and menu
402
299
  * @source https://wiki.facepunch.com/gmod/table.SortByMember
403
300
  */
404
301
  SortByMember(tab: table, memberKey: any, ascending?: boolean): void;
405
- }
406
-
407
- interface TableLib {
408
302
  /**
409
303
  * Sorts a table in reverse order from [table.sort](https://wiki.facepunch.com/gmod/table.sort).
410
304
  * **NOTE**: This function modifies the table you give to it. Like table.sort, it does not return anything.
@@ -414,27 +308,18 @@ interface TableLib {
414
308
  * @source https://wiki.facepunch.com/gmod/table.SortDesc
415
309
  */
416
310
  SortDesc(tbl: table): void;
417
- }
418
-
419
- interface TableLib {
420
311
  /**
421
312
  * Converts a table into a string
422
313
  * @realm shared and menu
423
314
  * @source https://wiki.facepunch.com/gmod/table.ToString
424
315
  */
425
316
  ToString(tbl: table, displayName?: string, niceFormatting?: boolean): string;
426
- }
427
-
428
- interface TableLib {
429
317
  /**
430
318
  * Concatenates the contents of a table to a string.
431
319
  * @realm shared and menu
432
320
  * @source https://wiki.facepunch.com/gmod/table.concat
433
321
  */
434
322
  concat(tbl: table, concatenator?: string, startPos?: number, endPos?: number): string;
435
- }
436
-
437
- interface TableLib {
438
323
  /**
439
324
  * Iterates for each key-value pair in the table, calling the function with the key and value of the pair. If the function returns anything, the loop is broken.
440
325
  *
@@ -445,9 +330,6 @@ interface TableLib {
445
330
  * @deprecated This was deprecated in Lua 5.1 and removed in 5.2. You should use Global.pairs instead.
446
331
  */
447
332
  ForEach(tbl: table, callback: (key: any, val: any) => void): void;
448
- }
449
-
450
- interface TableLib {
451
333
  /**
452
334
  * Iterates for each numeric index in the table in order.
453
335
  *
@@ -458,9 +340,6 @@ interface TableLib {
458
340
  * @deprecated This was deprecated in Lua 5.1 and removed in 5.2. You should use Global.ipairs() instead.
459
341
  */
460
342
  foreachi(table: table, func: function): void;
461
- }
462
-
463
- interface TableLib {
464
343
  /**
465
344
  * Returns the length of the table.
466
345
  * @realm shared and menu
@@ -468,9 +347,6 @@ interface TableLib {
468
347
  * @deprecated This function was deprecated in Lua 5.1 and is removed in 5.2. Use the length (#) operator instead.
469
348
  */
470
349
  getn(tbl: table): number;
471
- }
472
-
473
- interface TableLib {
474
350
  /**
475
351
  * Inserts a value at the end of the table.
476
352
  * @realm shared
@@ -486,19 +362,12 @@ interface TableLib {
486
362
  * @realm menu
487
363
  */
488
364
  insert(tbl: table, position: number, value: any): number;
489
- }
490
-
491
-
492
- interface TableLib {
493
365
  /**
494
366
  * Returns the highest numerical key.
495
367
  * @realm shared and menu
496
368
  * @source https://wiki.facepunch.com/gmod/table.maxn
497
369
  */
498
370
  maxn(tbl: table): number;
499
- }
500
-
501
- interface TableLib {
502
371
  /**
503
372
  * Moves elements from one part of a table to another part a given table. This is similar to assigning elements from the source table to the destination table in multiple assignments.
504
373
  *
@@ -506,9 +375,6 @@ interface TableLib {
506
375
  * @source https://wiki.facepunch.com/gmod/table.move
507
376
  */
508
377
  move(sourceTbl: table, from: number, to: number, dest: number, destTbl?: table): table;
509
- }
510
-
511
- interface TableLib {
512
378
  /**
513
379
  * Removes a value from a table and shifts any other values down to fill the gap.
514
380
  * **NOTE**: Does nothing if index is less than 1 or greater than `#tbl`
@@ -517,9 +383,6 @@ interface TableLib {
517
383
  * @source https://wiki.facepunch.com/gmod/table.remove
518
384
  */
519
385
  remove(tbl: table, index?: number): any;
520
- }
521
-
522
- interface TableLib {
523
386
  /**
524
387
  * Sorts a sequential table either ascending or by the given sort function.
525
388
  * **NOTE**: This function modifies the table you give to it and internally uses the [quick sort algorithm](http://www.lua.org/source/5.2/ltablib.c.html#sort).
@@ -531,3 +394,50 @@ interface TableLib {
531
394
  sort(tbl: table, sorter?: (a: any, b: any) => boolean): void;
532
395
  }
533
396
 
397
+
398
+
399
+
400
+
401
+
402
+
403
+
404
+
405
+
406
+
407
+
408
+
409
+
410
+
411
+
412
+
413
+
414
+
415
+
416
+
417
+
418
+
419
+
420
+
421
+
422
+
423
+
424
+
425
+
426
+
427
+
428
+
429
+
430
+
431
+
432
+
433
+
434
+
435
+
436
+
437
+
438
+
439
+
440
+
441
+
442
+
443
+
package/types/task.d.tlua CHANGED
@@ -4,8 +4,6 @@
4
4
  * A single AI task. Returned by [ai_task.New](https://wiki.facepunch.com/gmod/ai_task.New).
5
5
  * @source https://wiki.facepunch.com/gmod/Task
6
6
  */
7
- interface Task {}
8
-
9
7
  interface Task {
10
8
  /**
11
9
  * **INTERNAL**: This is used internally - although you're able to use it you probably shouldn't.
@@ -14,54 +12,36 @@ interface Task {
14
12
  * @source https://wiki.facepunch.com/gmod/Task:Init
15
13
  */
16
14
  Init(self: Task): void;
17
- }
18
-
19
- interface Task {
20
15
  /**
21
16
  * Initialises the AI task as an engine task.
22
17
  * @realm server
23
18
  * @source https://wiki.facepunch.com/gmod/Task:InitEngine
24
19
  */
25
20
  InitEngine(self: Task, taskname: string, taskdata: number): void;
26
- }
27
-
28
- interface Task {
29
21
  /**
30
22
  * Initialises the AI task as NPC method-based.
31
23
  * @realm server
32
24
  * @source https://wiki.facepunch.com/gmod/Task:InitFunctionName
33
25
  */
34
26
  InitFunctionName(self: Task, startname: string, runname: string, taskdata: number): void;
35
- }
36
-
37
- interface Task {
38
27
  /**
39
28
  * Determines if the task is an engine task (`TYPE_ENGINE`, 1).
40
29
  * @realm server
41
30
  * @source https://wiki.facepunch.com/gmod/Task:IsEngineType
42
31
  */
43
32
  IsEngineType(self: Task): void;
44
- }
45
-
46
- interface Task {
47
33
  /**
48
34
  * Determines if the task is an NPC method-based task (`TYPE_FNAME`, 2).
49
35
  * @realm server
50
36
  * @source https://wiki.facepunch.com/gmod/Task:IsFNameType
51
37
  */
52
38
  IsFNameType(self: Task): void;
53
- }
54
-
55
- interface Task {
56
39
  /**
57
40
  * Runs the AI task.
58
41
  * @realm server
59
42
  * @source https://wiki.facepunch.com/gmod/Task:Run
60
43
  */
61
44
  Run(self: Task, target: NPC): void;
62
- }
63
-
64
- interface Task {
65
45
  /**
66
46
  * **INTERNAL**: This is used internally - although you're able to use it you probably shouldn't.
67
47
  * Runs the AI task as an NPC method. This requires the task to be of type `TYPE_FNAME`.
@@ -69,18 +49,12 @@ interface Task {
69
49
  * @source https://wiki.facepunch.com/gmod/Task:Run_FName
70
50
  */
71
51
  Run_FName(self: Task, target: NPC): void;
72
- }
73
-
74
- interface Task {
75
52
  /**
76
53
  * Starts the AI task.
77
54
  * @realm server
78
55
  * @source https://wiki.facepunch.com/gmod/Task:Start
79
56
  */
80
57
  Start(self: Task, target: NPC): void;
81
- }
82
-
83
- interface Task {
84
58
  /**
85
59
  * **INTERNAL**: This is used internally - although you're able to use it you probably shouldn't.
86
60
  * Starts the AI task as an NPC method.
@@ -90,3 +64,12 @@ interface Task {
90
64
  Start_FName(self: Task, target: NPC): void;
91
65
  }
92
66
 
67
+
68
+
69
+
70
+
71
+
72
+
73
+
74
+
75
+