@tlua/gmod 1.0.5 → 1.0.6

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 (272) hide show
  1. package/package.json +1 -1
  2. package/types/achievementicon.d.tlua +0 -1
  3. package/types/achievements.d.tlua +15 -16
  4. package/types/ai.d.tlua +5 -6
  5. package/types/ai_schedule.d.tlua +0 -1
  6. package/types/ai_task.d.tlua +0 -1
  7. package/types/angle.d.tlua +18 -19
  8. package/types/avatarimage.d.tlua +0 -1
  9. package/types/awesomium.d.tlua +0 -1
  10. package/types/baseclass.d.tlua +1 -3
  11. package/types/bf_read.d.tlua +10 -12
  12. package/types/bit.d.tlua +11 -12
  13. package/types/button.d.tlua +0 -1
  14. package/types/cam.d.tlua +16 -17
  15. package/types/ceffectdata.d.tlua +31 -33
  16. package/types/chat.d.tlua +5 -6
  17. package/types/checkbutton.d.tlua +0 -1
  18. package/types/cleanup.d.tlua +7 -8
  19. package/types/cluaemitter.d.tlua +11 -13
  20. package/types/clualocomotion.d.tlua +39 -41
  21. package/types/cluaparticle.d.tlua +43 -45
  22. package/types/cmovedata.d.tlua +46 -48
  23. package/types/cnavarea.d.tlua +76 -78
  24. package/types/cnavladder.d.tlua +21 -23
  25. package/types/cnewparticleeffect.d.tlua +25 -27
  26. package/types/color.d.tlua +28 -29
  27. package/types/concommand.d.tlua +4 -5
  28. package/types/constraint.d.tlua +28 -29
  29. package/types/construct.d.tlua +1 -2
  30. package/types/contentheader.d.tlua +1 -3
  31. package/types/contenticon.d.tlua +7 -9
  32. package/types/contentsidebar.d.tlua +2 -4
  33. package/types/contentsidebartoolbox.d.tlua +0 -1
  34. package/types/contextbase.d.tlua +2 -4
  35. package/types/controlpanel.d.tlua +11 -14
  36. package/types/controlpresets.d.tlua +11 -13
  37. package/types/convar.d.tlua +15 -17
  38. package/types/cookie.d.tlua +3 -4
  39. package/types/coroutine.d.tlua +7 -8
  40. package/types/crecipientfilter.d.tlua +15 -17
  41. package/types/csent.d.tlua +0 -1
  42. package/types/csoundpatch.d.tlua +13 -15
  43. package/types/ctakedamageinfo.d.tlua +32 -34
  44. package/types/ctrllistbox.d.tlua +0 -1
  45. package/types/ctrlnumpad.d.tlua +5 -7
  46. package/types/cusercmd.d.tlua +26 -28
  47. package/types/custom_entity_fields.d.tlua +0 -1
  48. package/types/cvars.d.tlua +6 -7
  49. package/types/dadjustablemodelpanel.d.tlua +5 -7
  50. package/types/dalphabar.d.tlua +1 -3
  51. package/types/dbinder.d.tlua +2 -4
  52. package/types/dbubblecontainer.d.tlua +0 -2
  53. package/types/dbutton.d.tlua +6 -8
  54. package/types/dcategoryheader.d.tlua +0 -1
  55. package/types/dcategorylist.d.tlua +0 -1
  56. package/types/dcheckbox.d.tlua +3 -5
  57. package/types/dcheckboxlabel.d.tlua +9 -10
  58. package/types/dcollapsiblecategory.d.tlua +21 -23
  59. package/types/dcolorbutton.d.tlua +5 -7
  60. package/types/dcolorcombo.d.tlua +3 -5
  61. package/types/dcolorcube.d.tlua +11 -13
  62. package/types/dcolormixer.d.tlua +25 -27
  63. package/types/dcolorpalette.d.tlua +21 -23
  64. package/types/dcolumnsheet.d.tlua +3 -5
  65. package/types/dcombobox.d.tlua +15 -17
  66. package/types/ddragbase.d.tlua +11 -13
  67. package/types/ddrawer.d.tlua +6 -8
  68. package/types/debug.d.tlua +16 -19
  69. package/types/debugoverlay.d.tlua +11 -12
  70. package/types/dentityproperties.d.tlua +3 -5
  71. package/types/derma.d.tlua +10 -11
  72. package/types/dexpandbutton.d.tlua +1 -3
  73. package/types/dfilebrowser.d.tlua +20 -21
  74. package/types/dform.d.tlua +16 -18
  75. package/types/dframe.d.tlua +24 -25
  76. package/types/dgrid.d.tlua +9 -11
  77. package/types/dhorizontaldivider.d.tlua +18 -20
  78. package/types/dhorizontalscroller.d.tlua +9 -11
  79. package/types/dhscrollbar.d.tlua +9 -11
  80. package/types/dhtml.d.tlua +6 -8
  81. package/types/dhtmlcontrols.d.tlua +5 -6
  82. package/types/diconbrowser.d.tlua +9 -11
  83. package/types/diconlayout.d.tlua +16 -18
  84. package/types/dimage.d.tlua +17 -20
  85. package/types/dimagebutton.d.tlua +9 -10
  86. package/types/dkillicon.d.tlua +0 -1
  87. package/types/dlabel.d.tlua +31 -33
  88. package/types/dlabeleditable.d.tlua +3 -5
  89. package/types/dlabelurl.d.tlua +8 -10
  90. package/types/dlistbox.d.tlua +6 -8
  91. package/types/dlistboxitem.d.tlua +2 -4
  92. package/types/dlistlayout.d.tlua +0 -1
  93. package/types/dlistview.d.tlua +32 -34
  94. package/types/dlistview_column.d.tlua +12 -14
  95. package/types/dlistview_columnplain.d.tlua +0 -1
  96. package/types/dlistview_draggerbar.d.tlua +0 -1
  97. package/types/dlistview_line.d.tlua +11 -13
  98. package/types/dlistviewheaderlabel.d.tlua +0 -1
  99. package/types/dlistviewlabel.d.tlua +0 -1
  100. package/types/dlistviewline.d.tlua +0 -1
  101. package/types/dmenu.d.tlua +23 -28
  102. package/types/dmenubar.d.tlua +2 -7
  103. package/types/dmenuoption.d.tlua +11 -13
  104. package/types/dmenuoptioncvar.d.tlua +4 -6
  105. package/types/dmodelpanel.d.tlua +20 -22
  106. package/types/dmodelselect.d.tlua +0 -2
  107. package/types/dmodelselectmulti.d.tlua +0 -2
  108. package/types/dnotify.d.tlua +8 -10
  109. package/types/dnumberscratch.d.tlua +24 -26
  110. package/types/dnumberwang.d.tlua +14 -16
  111. package/types/dnumpad.d.tlua +0 -1
  112. package/types/dnumslider.d.tlua +17 -18
  113. package/types/dpanel.d.tlua +12 -14
  114. package/types/dpanellist.d.tlua +11 -12
  115. package/types/dpaneloverlay.d.tlua +5 -7
  116. package/types/dpanelselect.d.tlua +0 -1
  117. package/types/dpanpanel.d.tlua +4 -6
  118. package/types/dprogress.d.tlua +1 -3
  119. package/types/dproperties.d.tlua +2 -4
  120. package/types/dproperty_boolean.d.tlua +0 -1
  121. package/types/dproperty_combo.d.tlua +1 -3
  122. package/types/dproperty_entity.d.tlua +0 -1
  123. package/types/dproperty_float.d.tlua +0 -1
  124. package/types/dproperty_generic.d.tlua +3 -5
  125. package/types/dproperty_int.d.tlua +0 -1
  126. package/types/dproperty_vectorcolor.d.tlua +0 -1
  127. package/types/dpropertysheet.d.tlua +15 -17
  128. package/types/dragndrop.d.tlua +10 -11
  129. package/types/draw.d.tlua +10 -12
  130. package/types/drgbpicker.d.tlua +2 -4
  131. package/types/drive.d.tlua +11 -13
  132. package/types/dscrollbargrip.d.tlua +0 -1
  133. package/types/dscrollpanel.d.tlua +10 -11
  134. package/types/dshape.d.tlua +5 -7
  135. package/types/dsizetocontents.d.tlua +3 -5
  136. package/types/dslider.d.tlua +26 -28
  137. package/types/dsprite.d.tlua +7 -9
  138. package/types/dtab.d.tlua +6 -8
  139. package/types/dtextentry.d.tlua +41 -43
  140. package/types/dtilelayout.d.tlua +19 -21
  141. package/types/dtooltip.d.tlua +4 -6
  142. package/types/dtree.d.tlua +14 -16
  143. package/types/dtree_node.d.tlua +66 -68
  144. package/types/dtree_node_button.d.tlua +0 -1
  145. package/types/duplicator.d.tlua +29 -31
  146. package/types/dverticaldivider.d.tlua +21 -23
  147. package/types/dvscrollbar.d.tlua +9 -11
  148. package/types/editablepanel.d.tlua +0 -1
  149. package/types/effect.d.tlua +2 -4
  150. package/types/effects.d.tlua +6 -7
  151. package/types/engine.d.tlua +21 -22
  152. package/types/entity.d.tlua +643 -674
  153. package/types/ents.d.tlua +19 -25
  154. package/types/enums.d.tlua +0 -1
  155. package/types/file.d.tlua +39 -40
  156. package/types/file_class.d.tlua +0 -1
  157. package/types/fingerposer.d.tlua +0 -1
  158. package/types/fingervar.d.tlua +0 -1
  159. package/types/frame.d.tlua +0 -1
  160. package/types/frame_blend.d.tlua +7 -8
  161. package/types/game.d.tlua +39 -40
  162. package/types/gameevent.d.tlua +0 -1
  163. package/types/gamemode.d.tlua +2 -4
  164. package/types/global.d.tlua +0 -18
  165. package/types/gm.d.tlua +266 -268
  166. package/types/gmod.d.tlua +0 -1
  167. package/types/gmsave.d.tlua +4 -5
  168. package/types/gui.d.tlua +21 -22
  169. package/types/gwen.d.tlua +3 -4
  170. package/types/halo.d.tlua +2 -3
  171. package/types/hammer.d.tlua +0 -1
  172. package/types/hook.d.tlua +4 -5
  173. package/types/html.d.tlua +0 -1
  174. package/types/http.d.tlua +1 -2
  175. package/types/iconeditor.d.tlua +9 -11
  176. package/types/igmodaudiochannel.d.tlua +40 -42
  177. package/types/imagecheckbox.d.tlua +2 -4
  178. package/types/imaterial.d.tlua +25 -27
  179. package/types/imesh.d.tlua +4 -6
  180. package/types/input.d.tlua +22 -25
  181. package/types/invalidateinternalentitycache.d.tlua +0 -1
  182. package/types/irestore.d.tlua +8 -10
  183. package/types/isave.d.tlua +8 -10
  184. package/types/itexture.d.tlua +9 -11
  185. package/types/ivideowriter.d.tlua +4 -6
  186. package/types/jit.d.tlua +16 -17
  187. package/types/killicon.d.tlua +7 -8
  188. package/types/label.d.tlua +0 -1
  189. package/types/language.d.tlua +1 -2
  190. package/types/list.d.tlua +8 -9
  191. package/types/makeballoon.d.tlua +0 -1
  192. package/types/markup.d.tlua +2 -3
  193. package/types/markupobject.d.tlua +4 -6
  194. package/types/material.d.tlua +0 -1
  195. package/types/math.d.tlua +83 -84
  196. package/types/matproxy.d.tlua +3 -4
  197. package/types/matselect.d.tlua +9 -11
  198. package/types/menu.d.tlua +0 -1
  199. package/types/menubar.d.tlua +2 -3
  200. package/types/mesh.d.tlua +19 -20
  201. package/types/modelimage.d.tlua +0 -1
  202. package/types/motionsensor.d.tlua +10 -11
  203. package/types/navmesh.d.tlua +26 -27
  204. package/types/net.d.tlua +51 -53
  205. package/types/nextbot.d.tlua +34 -37
  206. package/types/notification.d.tlua +2 -3
  207. package/types/npc.d.tlua +180 -182
  208. package/types/numpad.d.tlua +7 -8
  209. package/types/os.d.tlua +3 -5
  210. package/types/package.d.tlua +0 -1
  211. package/types/panel.d.tlua +329 -331
  212. package/types/panellist.d.tlua +0 -1
  213. package/types/pathfollower.d.tlua +30 -32
  214. package/types/permissions.d.tlua +6 -7
  215. package/types/physcollide.d.tlua +2 -4
  216. package/types/physenv.d.tlua +11 -12
  217. package/types/physobj.d.tlua +77 -79
  218. package/types/pixelvis_handle_t.d.tlua +0 -1
  219. package/types/player.d.tlua +288 -293
  220. package/types/player_manager.d.tlua +13 -14
  221. package/types/preseteditor.d.tlua +0 -1
  222. package/types/presets.d.tlua +6 -7
  223. package/types/projectedtexture.d.tlua +47 -49
  224. package/types/properties.d.tlua +5 -6
  225. package/types/propselect.d.tlua +3 -5
  226. package/types/radiobutton.d.tlua +0 -1
  227. package/types/render.d.tlua +142 -143
  228. package/types/resource.d.tlua +2 -3
  229. package/types/richtext.d.tlua +0 -1
  230. package/types/sandbox.d.tlua +52 -54
  231. package/types/saverestore.d.tlua +12 -13
  232. package/types/schedule.d.tlua +5 -7
  233. package/types/scripted_ents.d.tlua +9 -12
  234. package/types/search.d.tlua +1 -2
  235. package/types/serverlist.d.tlua +7 -8
  236. package/types/slidebar.d.tlua +0 -1
  237. package/types/slider.d.tlua +0 -1
  238. package/types/sound.d.tlua +10 -11
  239. package/types/spawnicon.d.tlua +6 -8
  240. package/types/spawnmenu.d.tlua +23 -25
  241. package/types/spawnmenucontentpanel.d.tlua +3 -5
  242. package/types/sql.d.tlua +9 -10
  243. package/types/stack.d.tlua +4 -6
  244. package/types/steamworks.d.tlua +18 -19
  245. package/types/string.d.tlua +46 -50
  246. package/types/structures.d.tlua +0 -7
  247. package/types/surface.d.tlua +34 -35
  248. package/types/surfaceinfo.d.tlua +4 -6
  249. package/types/system.d.tlua +10 -11
  250. package/types/table.d.tlua +45 -48
  251. package/types/task.d.tlua +8 -10
  252. package/types/team.d.tlua +19 -20
  253. package/types/textentry.d.tlua +0 -1
  254. package/types/tgaimage.d.tlua +0 -1
  255. package/types/timer.d.tlua +14 -15
  256. package/types/tool.d.tlua +42 -46
  257. package/types/ugcpublishwindow.d.tlua +7 -9
  258. package/types/umsg.d.tlua +12 -13
  259. package/types/undo.d.tlua +10 -11
  260. package/types/urllabel.d.tlua +0 -1
  261. package/types/usermessage.d.tlua +2 -3
  262. package/types/utf8.d.tlua +7 -8
  263. package/types/util.d.tlua +90 -95
  264. package/types/vector.d.tlua +36 -37
  265. package/types/vehicle.d.tlua +48 -51
  266. package/types/vgui.d.tlua +14 -19
  267. package/types/video.d.tlua +0 -1
  268. package/types/vmatrix.d.tlua +35 -36
  269. package/types/weapon.d.tlua +81 -84
  270. package/types/weapons.d.tlua +5 -7
  271. package/types/widgets.d.tlua +1 -2
  272. package/types/workshopfilebase.d.tlua +4 -6
@@ -13,12 +13,14 @@ interface InputLib {
13
13
  * @source https://wiki.facepunch.com/gmod/input.CheckKeyTrapping
14
14
  */
15
15
  CheckKeyTrapping(): number;
16
+
16
17
  /**
17
18
  * Returns the digital value of an analog stick on the current (set up via convars) controller.
18
19
  * @realm client and menu
19
20
  * @source https://wiki.facepunch.com/gmod/input.GetAnalogValue
20
21
  */
21
22
  GetAnalogValue(axis: ANALOG): number;
23
+
22
24
  /**
23
25
  * Returns the cursor's position on the screen.
24
26
  * On macOS, the cursor isn't locked on the middle of the screen which causes a significant offset of the positions returned by this function.
@@ -27,12 +29,14 @@ interface InputLib {
27
29
  * @source https://wiki.facepunch.com/gmod/input.GetCursorPos
28
30
  */
29
31
  GetCursorPos(): (number, number);
32
+
30
33
  /**
31
34
  * Gets the button code from a button name. This is opposite of [input.GetKeyName](https://wiki.facepunch.com/gmod/input.GetKeyName).
32
35
  * @realm client and menu
33
36
  * @source https://wiki.facepunch.com/gmod/input.GetKeyCode
34
37
  */
35
38
  GetKeyCode(button: string): BUTTON_CODE;
39
+
36
40
  /**
37
41
  * Gets the button name from a numeric button code. The name needs to be
38
42
  * translated with language.GetPhrase before being displayed.
@@ -44,6 +48,7 @@ interface InputLib {
44
48
  * @source https://wiki.facepunch.com/gmod/input.GetKeyName
45
49
  */
46
50
  GetKeyName(button: BUTTON_CODE | number): string;
51
+
47
52
  /**
48
53
  * Gets whether the specified button code is down.
49
54
  *
@@ -54,72 +59,84 @@ interface InputLib {
54
59
  * @source https://wiki.facepunch.com/gmod/input.IsButtonDown
55
60
  */
56
61
  IsButtonDown(button: BUTTON_CODE | number): boolean;
62
+
57
63
  /**
58
64
  * Returns whether a control key is being pressed.
59
65
  * @realm client and menu
60
66
  * @source https://wiki.facepunch.com/gmod/input.IsControlDown
61
67
  */
62
68
  IsControlDown(): boolean;
69
+
63
70
  /**
64
71
  * Gets whether a key is down.
65
72
  * @realm client and menu
66
73
  * @source https://wiki.facepunch.com/gmod/input.IsKeyDown
67
74
  */
68
75
  IsKeyDown(key: number): boolean;
76
+
69
77
  /**
70
78
  * Returns whether key trapping is activate and the next key press will be captured.
71
79
  * @realm client and menu
72
80
  * @source https://wiki.facepunch.com/gmod/input.IsKeyTrapping
73
81
  */
74
82
  IsKeyTrapping(): boolean;
83
+
75
84
  /**
76
85
  * Gets whether a mouse button is down.
77
86
  * @realm client and menu
78
87
  * @source https://wiki.facepunch.com/gmod/input.IsMouseDown
79
88
  */
80
89
  IsMouseDown(mouseKey: number): boolean;
90
+
81
91
  /**
82
92
  * Gets whether a shift key is being pressed
83
93
  * @realm client and menu
84
94
  * @source https://wiki.facepunch.com/gmod/input.IsShiftDown
85
95
  */
86
96
  IsShiftDown(): boolean;
97
+
87
98
  /**
88
99
  * Returns the client's bound key for the specified console command. If the player has multiple keys bound to a single command, then the key with the lowest [Enums/BUTTON_CODE](https://wiki.facepunch.com/gmod/Enums/BUTTON_CODE) will be returned.
89
100
  * @realm client and menu
90
101
  * @source https://wiki.facepunch.com/gmod/input.LookupBinding
91
102
  */
92
103
  LookupBinding(binding: string, exact?: boolean): string;
104
+
93
105
  /**
94
106
  * Returns the bind string that the given key is bound to.
95
107
  * @realm client and menu
96
108
  * @source https://wiki.facepunch.com/gmod/input.LookupKeyBinding
97
109
  */
98
110
  LookupKeyBinding(key: BUTTON_CODE): string;
111
+
99
112
  /**
100
113
  * Switches to the provided weapon on the next CUserCmd generation/CreateMove call. Direct binding to [CInput::MakeWeaponSelection](https://github.com/ValveSoftware/source-sdk-2013/blob/39f6dde8fbc238727c020d13b05ecadd31bda4c0/src/game/client/in_main.cpp#L989-L992).
101
114
  * @realm client
102
115
  * @source https://wiki.facepunch.com/gmod/input.SelectWeapon
103
116
  */
104
117
  SelectWeapon(weapon: Weapon): void;
118
+
105
119
  /**
106
120
  * Sets the cursor's position on the screen, relative to the topleft corner of the window
107
121
  * @realm client and menu
108
122
  * @source https://wiki.facepunch.com/gmod/input.SetCursorPos
109
123
  */
110
124
  SetCursorPos(mouseX: number, mouseY: number): void;
125
+
111
126
  /**
112
127
  * Begins waiting for a key to be pressed so we can save it for [input.CheckKeyTrapping](https://wiki.facepunch.com/gmod/input.CheckKeyTrapping). Used by the [DBinder](https://wiki.facepunch.com/gmod/DBinder).
113
128
  * @realm client and menu
114
129
  * @source https://wiki.facepunch.com/gmod/input.StartKeyTrapping
115
130
  */
116
131
  StartKeyTrapping(): void;
132
+
117
133
  /**
118
134
  * Translates a console command alias, basically reverse of the `alias` console command.
119
135
  * @realm client and menu
120
136
  * @source https://wiki.facepunch.com/gmod/input.TranslateAlias
121
137
  */
122
138
  TranslateAlias(command: string): string;
139
+
123
140
  /**
124
141
  * Returns whether a key was initially pressed in the same frame this function was called.
125
142
  *
@@ -129,6 +146,7 @@ interface InputLib {
129
146
  * @source https://wiki.facepunch.com/gmod/input.WasKeyPressed
130
147
  */
131
148
  WasKeyPressed(key: number): boolean;
149
+
132
150
  /**
133
151
  * Returns whether a key was released in the same frame this function was called.
134
152
  *
@@ -138,6 +156,7 @@ interface InputLib {
138
156
  * @source https://wiki.facepunch.com/gmod/input.WasKeyReleased
139
157
  */
140
158
  WasKeyReleased(key: number): boolean;
159
+
141
160
  /**
142
161
  * Returns whether the key is being held down or not.
143
162
  *
@@ -147,6 +166,7 @@ interface InputLib {
147
166
  * @source https://wiki.facepunch.com/gmod/input.WasKeyTyped
148
167
  */
149
168
  WasKeyTyped(key: number): boolean;
169
+
150
170
  /**
151
171
  * Returns whether a mouse key was double pressed in the same frame this function was called.
152
172
  *
@@ -159,6 +179,7 @@ interface InputLib {
159
179
  * @source https://wiki.facepunch.com/gmod/input.WasMouseDoublePressed
160
180
  */
161
181
  WasMouseDoublePressed(button: number): boolean;
182
+
162
183
  /**
163
184
  * Returns whether a mouse key was initially pressed in the same frame this function was called.
164
185
  *
@@ -171,6 +192,7 @@ interface InputLib {
171
192
  * @source https://wiki.facepunch.com/gmod/input.WasMousePressed
172
193
  */
173
194
  WasMousePressed(key: number): boolean;
195
+
174
196
  /**
175
197
  * Returns whether a mouse key was released in the same frame this function was called.
176
198
  *
@@ -181,28 +203,3 @@ interface InputLib {
181
203
  */
182
204
  WasMouseReleased(key: number): boolean;
183
205
  }
184
-
185
-
186
-
187
-
188
-
189
-
190
-
191
-
192
-
193
-
194
-
195
-
196
-
197
-
198
-
199
-
200
-
201
-
202
-
203
-
204
-
205
-
206
-
207
-
208
-
@@ -10,4 +10,3 @@
10
10
  * @source https://wiki.facepunch.com/gmod/InvalidateInternalEntityCache
11
11
  */
12
12
  declare function InvalidateInternalEntityCache(isPly: boolean): void;
13
-
@@ -16,48 +16,56 @@ interface IRestore {
16
16
  * @source https://wiki.facepunch.com/gmod/IRestore:EndBlock
17
17
  */
18
18
  EndBlock(self: IRestore): void;
19
+
19
20
  /**
20
21
  * Reads next bytes from the restore object as an [Angle](https://wiki.facepunch.com/gmod/Angle).
21
22
  * @realm shared
22
23
  * @source https://wiki.facepunch.com/gmod/IRestore:ReadAngle
23
24
  */
24
25
  ReadAngle(self: IRestore): Angle;
26
+
25
27
  /**
26
28
  * Reads next bytes from the restore object as a [boolean](https://wiki.facepunch.com/gmod/boolean).
27
29
  * @realm shared
28
30
  * @source https://wiki.facepunch.com/gmod/IRestore:ReadBool
29
31
  */
30
32
  ReadBool(self: IRestore): boolean;
33
+
31
34
  /**
32
35
  * Reads next bytes from the restore object as an [Entity](https://wiki.facepunch.com/gmod/Entity).
33
36
  * @realm shared
34
37
  * @source https://wiki.facepunch.com/gmod/IRestore:ReadEntity
35
38
  */
36
39
  ReadEntity(self: IRestore): Entity;
40
+
37
41
  /**
38
42
  * Reads next bytes from the restore object as a floating point [number](https://wiki.facepunch.com/gmod/number).
39
43
  * @realm shared
40
44
  * @source https://wiki.facepunch.com/gmod/IRestore:ReadFloat
41
45
  */
42
46
  ReadFloat(self: IRestore): number;
47
+
43
48
  /**
44
49
  * Reads next bytes from the restore object as an integer [number](https://wiki.facepunch.com/gmod/number).
45
50
  * @realm shared
46
51
  * @source https://wiki.facepunch.com/gmod/IRestore:ReadInt
47
52
  */
48
53
  ReadInt(self: IRestore): number;
54
+
49
55
  /**
50
56
  * Reads next bytes from the restore object as a [string](https://wiki.facepunch.com/gmod/string).
51
57
  * @realm shared
52
58
  * @source https://wiki.facepunch.com/gmod/IRestore:ReadString
53
59
  */
54
60
  ReadString(self: IRestore): string;
61
+
55
62
  /**
56
63
  * Reads next bytes from the restore object as a [Vector](https://wiki.facepunch.com/gmod/Vector).
57
64
  * @realm shared
58
65
  * @source https://wiki.facepunch.com/gmod/IRestore:ReadVector
59
66
  */
60
67
  ReadVector(self: IRestore): Vector;
68
+
61
69
  /**
62
70
  * Loads next block of data to be read inside current block. Blocks **must** be ended with [IRestore:EndBlock](https://wiki.facepunch.com/gmod/IRestore:EndBlock).
63
71
  * @realm shared
@@ -65,13 +73,3 @@ interface IRestore {
65
73
  */
66
74
  StartBlock(self: IRestore): string;
67
75
  }
68
-
69
-
70
-
71
-
72
-
73
-
74
-
75
-
76
-
77
-
@@ -16,48 +16,56 @@ interface ISave {
16
16
  * @source https://wiki.facepunch.com/gmod/ISave:EndBlock
17
17
  */
18
18
  EndBlock(self: ISave): void;
19
+
19
20
  /**
20
21
  * Starts a new block of data that you can write to inside current block. Blocks **must** be ended with [ISave:EndBlock](https://wiki.facepunch.com/gmod/ISave:EndBlock).
21
22
  * @realm shared
22
23
  * @source https://wiki.facepunch.com/gmod/ISave:StartBlock
23
24
  */
24
25
  StartBlock(self: ISave, name: string): void;
26
+
25
27
  /**
26
28
  * Writes an [Angle](https://wiki.facepunch.com/gmod/Angle) to the save object.
27
29
  * @realm shared
28
30
  * @source https://wiki.facepunch.com/gmod/ISave:WriteAngle
29
31
  */
30
32
  WriteAngle(self: ISave, ang: Angle): void;
33
+
31
34
  /**
32
35
  * Writes a [boolean](https://wiki.facepunch.com/gmod/boolean) to the save object.
33
36
  * @realm shared
34
37
  * @source https://wiki.facepunch.com/gmod/ISave:WriteBool
35
38
  */
36
39
  WriteBool(self: ISave, bool: boolean): void;
40
+
37
41
  /**
38
42
  * Writes an [Entity](https://wiki.facepunch.com/gmod/Entity) to the save object.
39
43
  * @realm shared
40
44
  * @source https://wiki.facepunch.com/gmod/ISave:WriteEntity
41
45
  */
42
46
  WriteEntity(self: ISave, ent: Entity): void;
47
+
43
48
  /**
44
49
  * Writes a floating point [number](https://wiki.facepunch.com/gmod/number) to the save object.
45
50
  * @realm shared
46
51
  * @source https://wiki.facepunch.com/gmod/ISave:WriteFloat
47
52
  */
48
53
  WriteFloat(self: ISave, float: number): void;
54
+
49
55
  /**
50
56
  * Writes an integer [number](https://wiki.facepunch.com/gmod/number) to the save object.
51
57
  * @realm shared
52
58
  * @source https://wiki.facepunch.com/gmod/ISave:WriteInt
53
59
  */
54
60
  WriteInt(self: ISave, int: number): void;
61
+
55
62
  /**
56
63
  * Writes a **null terminated** [string](https://wiki.facepunch.com/gmod/string) to the save object.
57
64
  * @realm shared
58
65
  * @source https://wiki.facepunch.com/gmod/ISave:WriteString
59
66
  */
60
67
  WriteString(self: ISave, str: string): void;
68
+
61
69
  /**
62
70
  * Writes a [Vector](https://wiki.facepunch.com/gmod/Vector) to the save object.
63
71
  * @realm shared
@@ -65,13 +73,3 @@ interface ISave {
65
73
  */
66
74
  WriteVector(self: ISave, vec: Vector): void;
67
75
  }
68
-
69
-
70
-
71
-
72
-
73
-
74
-
75
-
76
-
77
-
@@ -16,6 +16,7 @@ interface ITexture {
16
16
  * @source https://wiki.facepunch.com/gmod/ITexture:Download
17
17
  */
18
18
  Download(self: ITexture): void;
19
+
19
20
  /**
20
21
  * Returns the color of the specified pixel, only works for textures created from PNG files.
21
22
  *
@@ -23,36 +24,42 @@ interface ITexture {
23
24
  * @source https://wiki.facepunch.com/gmod/ITexture:GetColor
24
25
  */
25
26
  GetColor(self: ITexture, x: number, y: number): Color;
27
+
26
28
  /**
27
29
  * Returns the true unmodified height of the texture.
28
30
  * @realm shared and menu
29
31
  * @source https://wiki.facepunch.com/gmod/ITexture:GetMappingHeight
30
32
  */
31
33
  GetMappingHeight(self: ITexture): number;
34
+
32
35
  /**
33
36
  * Returns the true unmodified width of the texture.
34
37
  * @realm shared and menu
35
38
  * @source https://wiki.facepunch.com/gmod/ITexture:GetMappingWidth
36
39
  */
37
40
  GetMappingWidth(self: ITexture): number;
41
+
38
42
  /**
39
43
  * Returns the name of the texture, in most cases the path.
40
44
  * @realm shared and menu
41
45
  * @source https://wiki.facepunch.com/gmod/ITexture:GetName
42
46
  */
43
47
  GetName(self: ITexture): string;
48
+
44
49
  /**
45
50
  * Returns the number of animation frames in this texture.
46
51
  * @realm shared and menu
47
52
  * @source https://wiki.facepunch.com/gmod/ITexture:GetNumAnimationFrames
48
53
  */
49
54
  GetNumAnimationFrames(self: ITexture): number;
55
+
50
56
  /**
51
57
  * Returns the modified height of the texture, this value may be affected by mipmapping and other factors.
52
58
  * @realm shared and menu
53
59
  * @source https://wiki.facepunch.com/gmod/ITexture:Height
54
60
  */
55
61
  Height(self: ITexture): number;
62
+
56
63
  /**
57
64
  * Returns whenever the texture is valid. (i.e. was loaded successfully or not)
58
65
  *
@@ -63,12 +70,14 @@ interface ITexture {
63
70
  * @source https://wiki.facepunch.com/gmod/ITexture:IsError
64
71
  */
65
72
  IsError(self: ITexture): boolean;
73
+
66
74
  /**
67
75
  * Returns whenever the texture is the error texture (pink and black checkerboard pattern).
68
76
  * @realm shared and menu
69
77
  * @source https://wiki.facepunch.com/gmod/ITexture:IsErrorTexture
70
78
  */
71
79
  IsErrorTexture(self: ITexture): boolean;
80
+
72
81
  /**
73
82
  * Returns the modified width of the texture, this value may be affected by mipmapping and other factors.
74
83
  * @realm shared and menu
@@ -76,14 +85,3 @@ interface ITexture {
76
85
  */
77
86
  Width(self: ITexture): number;
78
87
  }
79
-
80
-
81
-
82
-
83
-
84
-
85
-
86
-
87
-
88
-
89
-
@@ -11,24 +11,28 @@ interface IVideoWriter {
11
11
  * @source https://wiki.facepunch.com/gmod/IVideoWriter:AddFrame
12
12
  */
13
13
  AddFrame(self: IVideoWriter, frameTime: number, downsample: boolean): void;
14
+
14
15
  /**
15
16
  * Ends the video recording and dumps it to disk.
16
17
  * @realm client and menu
17
18
  * @source https://wiki.facepunch.com/gmod/IVideoWriter:Finish
18
19
  */
19
20
  Finish(self: IVideoWriter): void;
21
+
20
22
  /**
21
23
  * Returns the height of the video stream.
22
24
  * @realm client and menu
23
25
  * @source https://wiki.facepunch.com/gmod/IVideoWriter:Height
24
26
  */
25
27
  Height(self: IVideoWriter): number;
28
+
26
29
  /**
27
30
  * Sets whether to record sound or not.
28
31
  * @realm client and menu
29
32
  * @source https://wiki.facepunch.com/gmod/IVideoWriter:SetRecordSound
30
33
  */
31
34
  SetRecordSound(self: IVideoWriter, record: boolean): void;
35
+
32
36
  /**
33
37
  * Returns the width of the video stream.
34
38
  * @realm client and menu
@@ -36,9 +40,3 @@ interface IVideoWriter {
36
40
  */
37
41
  Width(self: IVideoWriter): number;
38
42
  }
39
-
40
-
41
-
42
-
43
-
44
-
package/types/jit.d.tlua CHANGED
@@ -25,38 +25,40 @@ interface JitLib {
25
25
  * @deprecated This function was disabled due to security concerns.
26
26
  */
27
27
  attach(callback: function, event: string): void;
28
+
28
29
  /**
29
30
  * Flushes the whole cache of compiled code.
30
31
  * @realm shared and menu
31
32
  * @source https://wiki.facepunch.com/gmod/jit.flush
32
33
  */
33
34
  flush(): void;
35
+
34
36
  /**
35
37
  * Disables LuaJIT Lua compilation.
36
38
  * @realm shared and menu
37
39
  * @source https://wiki.facepunch.com/gmod/jit.off
38
40
  */
39
41
  off(): void;
42
+
40
43
  /**
41
44
  * Enables LuaJIT Lua compilation.
42
45
  * @realm shared and menu
43
46
  * @source https://wiki.facepunch.com/gmod/jit.on
44
47
  */
45
48
  on(): void;
49
+
46
50
  opt: JitoptLib;
51
+
47
52
  /**
48
53
  * Returns the status of the JIT compiler and the current optimizations enabled.
49
54
  * @realm shared and menu
50
55
  * @source https://wiki.facepunch.com/gmod/jit.status
51
56
  */
52
57
  status(): (boolean, any);
58
+
53
59
  util: JitutilLib;
54
60
  }
55
61
 
56
-
57
-
58
-
59
-
60
62
  interface JitoptLib {
61
63
  /**
62
64
  * JIT compiler optimization control. The opt sub-module provides the backend for the -O command line LuaJIT option.
@@ -78,8 +80,6 @@ interface JitoptLib {
78
80
  start(...: any): void;
79
81
  }
80
82
 
81
-
82
-
83
83
  interface JitutilLib {
84
84
  /**
85
85
  * Returns bytecode of a function at a position.
@@ -90,6 +90,7 @@ interface JitutilLib {
90
90
  * @source https://wiki.facepunch.com/gmod/jit.util.funcbc
91
91
  */
92
92
  funcbc(func: function, pos: number): (number, number);
93
+
93
94
  /**
94
95
  * Retrieves LuaJIT information about a given function, similarly to [debug.getinfo](https://wiki.facepunch.com/gmod/debug.getinfo). Possible table fields:
95
96
  * * linedefined: as for [debug.getinfo](https://wiki.facepunch.com/gmod/debug.getinfo)
@@ -112,6 +113,7 @@ interface JitutilLib {
112
113
  * @source https://wiki.facepunch.com/gmod/jit.util.funcinfo
113
114
  */
114
115
  funcinfo(func: function, pos?: number): table;
116
+
115
117
  /**
116
118
  * Gets a constant at a certain index in a function.
117
119
  *
@@ -128,6 +130,7 @@ interface JitutilLib {
128
130
  * @deprecated This function was disabled due to security concerns.
129
131
  */
130
132
  funck(func: function, index: number): any;
133
+
131
134
  /**
132
135
  * Does the exact same thing as [debug.getupvalue](https://wiki.facepunch.com/gmod/debug.getupvalue) except it only returns the name, not the name and the object. The upvalue indexes also start at 0 rather than 1, so doing `jit.util.funcuvname(func, 0)` will get you the same name as `debug.getupvalue(func, 1)`
133
136
  * **WARNING**: This function isn't officially documented on LuaJIT wiki, use it at your own risk.
@@ -138,6 +141,7 @@ interface JitutilLib {
138
141
  * @deprecated This function was disabled due to security concerns.
139
142
  */
140
143
  funcuvname(func: function, index: number): string;
144
+
141
145
  /**
142
146
  * Previously got the address of a function from a set list of functions, but now always returns `0` as it is deprecated.
143
147
  *
@@ -146,6 +150,7 @@ interface JitutilLib {
146
150
  * @deprecated This function was disabled due to security concerns.
147
151
  */
148
152
  ircalladdr(index: number): number;
153
+
149
154
  /**
150
155
  * Grabs the address of a function based on it's trace exit number. Grabbed via [jit.attach](https://wiki.facepunch.com/gmod/jit.attach) (with the texit event).
151
156
  *
@@ -154,6 +159,7 @@ interface JitutilLib {
154
159
  * @deprecated This function was disabled due to security concerns. It will always return 0.
155
160
  */
156
161
  traceexitstub(exitno: number): number;
162
+
157
163
  /**
158
164
  * Return table fields:
159
165
  * * link (number): the linked trace (0 for link types: none, return, interpreter)
@@ -167,24 +173,28 @@ interface JitutilLib {
167
173
  * @deprecated This function was disabled due to security concerns.
168
174
  */
169
175
  traceinfo(trace: number): table;
176
+
170
177
  /**
171
178
  * @realm shared and menu
172
179
  * @source https://wiki.facepunch.com/gmod/jit.util.traceir
173
180
  * @deprecated This function was disabled due to security concerns.
174
181
  */
175
182
  traceir(tr: number, index: number): (number, number, number, number, number);
183
+
176
184
  /**
177
185
  * @realm shared and menu
178
186
  * @source https://wiki.facepunch.com/gmod/jit.util.tracek
179
187
  * @deprecated This function was disabled due to security concerns.
180
188
  */
181
189
  tracek(tr: number, index: number): (any, number, number);
190
+
182
191
  /**
183
192
  * @realm shared and menu
184
193
  * @source https://wiki.facepunch.com/gmod/jit.util.tracemc
185
194
  * @deprecated This function was disabled due to security concerns. It will always return 3 `0`s.
186
195
  */
187
196
  tracemc(tr: number): (string, number, number);
197
+
188
198
  /**
189
199
  * Return table fields:
190
200
  * * 0 (ref) (number): first IR ref for the snapshot
@@ -198,14 +208,3 @@ interface JitutilLib {
198
208
  */
199
209
  tracesnap(tr: number, sn: number): table;
200
210
  }
201
-
202
-
203
-
204
-
205
-
206
-
207
-
208
-
209
-
210
-
211
-
@@ -13,24 +13,28 @@ interface KilliconLib {
13
13
  * @source https://wiki.facepunch.com/gmod/killicon.Add
14
14
  */
15
15
  Add(_class: string, texture: string, color: Color): void;
16
+
16
17
  /**
17
18
  * Creates kill icon from existing one.
18
19
  * @realm client
19
20
  * @source https://wiki.facepunch.com/gmod/killicon.AddAlias
20
21
  */
21
22
  AddAlias(new_class: string, existing_class: string): void;
23
+
22
24
  /**
23
25
  * Adds kill icon for given weapon/entity class using special font.
24
26
  * @realm client
25
27
  * @source https://wiki.facepunch.com/gmod/killicon.AddFont
26
28
  */
27
29
  AddFont(_class: string, font: string, symbol: string, color: Color, heightScale?: number): void;
30
+
28
31
  /**
29
32
  * Creates new kill icon using a sub-rectangle of a texture.
30
33
  * @realm client
31
34
  * @source https://wiki.facepunch.com/gmod/killicon.AddTexCoord
32
35
  */
33
36
  AddTexCoord(_class: string, texture: string, color: Color, x: number, y: number, w: number, h: number): void;
37
+
34
38
  /**
35
39
  * Draws a kill icon.
36
40
  *
@@ -41,18 +45,21 @@ interface KilliconLib {
41
45
  * @deprecated This function applies unpredictable vertical offsets, you should use killicon.Render instead, which does not suffer from this issue.
42
46
  */
43
47
  Draw(x: number, y: number, name: string, alpha?: number): void;
48
+
44
49
  /**
45
50
  * Checks if kill icon exists for given class.
46
51
  * @realm client
47
52
  * @source https://wiki.facepunch.com/gmod/killicon.Exists
48
53
  */
49
54
  Exists(_class: string): boolean;
55
+
50
56
  /**
51
57
  * Returns the size of a kill icon.
52
58
  * @realm client
53
59
  * @source https://wiki.facepunch.com/gmod/killicon.GetSize
54
60
  */
55
61
  GetSize(name: string, dontEqualizeHeight?: boolean): (number, number);
62
+
56
63
  /**
57
64
  * Renders a kill icon.
58
65
  * @realm client
@@ -60,11 +67,3 @@ interface KilliconLib {
60
67
  */
61
68
  Render(x: number, y: number, name: string, alpha?: number, dontEqualizeHeight?: number): void;
62
69
  }
63
-
64
-
65
-
66
-
67
-
68
-
69
-
70
-
@@ -17,4 +17,3 @@ interface Label extends Panel {
17
17
  */
18
18
  SetTextColor(self: Label, color: Color): void;
19
19
  }
20
-
@@ -13,6 +13,7 @@ interface LanguageLib {
13
13
  * @source https://wiki.facepunch.com/gmod/language.Add
14
14
  */
15
15
  Add(placeholder: string, fulltext: string): void;
16
+
16
17
  /**
17
18
  * Retrieves the translated version of inputted string. Useful for concentrating multiple translated strings.
18
19
  * @realm client and menu
@@ -20,5 +21,3 @@ interface LanguageLib {
20
21
  */
21
22
  GetPhrase(phrase: string): string;
22
23
  }
23
-
24
-