@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,6 +13,7 @@ interface SteamworksLib {
13
13
  * @source https://wiki.facepunch.com/gmod/steamworks.ApplyAddons
14
14
  */
15
15
  ApplyAddons(): void;
16
+
16
17
  /**
17
18
  * **NOTE**: You really should be using [steamworks.DownloadUGC](https://wiki.facepunch.com/gmod/steamworks.DownloadUGC) when downloading Steam Workshop items. This is a legacy function for preview images.
18
19
  *
@@ -27,12 +28,14 @@ interface SteamworksLib {
27
28
  * @source https://wiki.facepunch.com/gmod/steamworks.Download
28
29
  */
29
30
  Download(workshopPreviewID: string, uncompress: boolean, resultCallback: (path: string) => void): void;
31
+
30
32
  /**
31
33
  * Downloads the Fire Extinguisher addon from Steam Workshop prints path to its .gma file to be used with [game.MountGMA](https://wiki.facepunch.com/gmod/game.MountGMA).
32
34
  * @realm client and menu
33
35
  * @source https://wiki.facepunch.com/gmod/steamworks.DownloadUGC
34
36
  */
35
37
  DownloadUGC(workshopID: string, resultCallback: (path: string, file: file_class) => void): void;
38
+
36
39
  /**
37
40
  * Retrieves info about supplied Steam Workshop addon.
38
41
  *
@@ -40,12 +43,14 @@ interface SteamworksLib {
40
43
  * @source https://wiki.facepunch.com/gmod/steamworks.FileInfo
41
44
  */
42
45
  FileInfo(workshopItemID: string, resultCallback: (data: table) => void, extraInfo?: boolean): void;
46
+
43
47
  /**
44
48
  * Retrieves a customized list of Steam Workshop addons.
45
49
  * @realm shared and menu
46
50
  * @source https://wiki.facepunch.com/gmod/steamworks.GetList
47
51
  */
48
52
  GetList(type: string, tags: table, offset: number, numRetrieve: number, days: number, userID?: string, resultCallback?: (data: table) => void, searchText?: string): void;
53
+
49
54
  /**
50
55
  * Retrieves players name by their 64bit SteamID.
51
56
  *
@@ -56,18 +61,21 @@ interface SteamworksLib {
56
61
  * @deprecated You should use the callback of steamworks.RequestPlayerInfo instead.
57
62
  */
58
63
  GetPlayerName(steamID64: string): string;
64
+
59
65
  /**
60
66
  * Returns whenever the client is subscribed to the specified Steam Workshop item.
61
67
  * @realm client and menu
62
68
  * @source https://wiki.facepunch.com/gmod/steamworks.IsSubscribed
63
69
  */
64
70
  IsSubscribed(workshopItemID: string): boolean;
71
+
65
72
  /**
66
73
  * Opens the workshop website in the steam overlay browser.
67
74
  * @realm client and menu
68
75
  * @source https://wiki.facepunch.com/gmod/steamworks.OpenWorkshop
69
76
  */
70
77
  OpenWorkshop(): void;
78
+
71
79
  /**
72
80
  * **INTERNAL**: This is used internally - although you're able to use it you probably shouldn't.
73
81
  *
@@ -77,18 +85,21 @@ interface SteamworksLib {
77
85
  * @source https://wiki.facepunch.com/gmod/steamworks.Publish
78
86
  */
79
87
  Publish(filename: string, image: string, name: string, desc: string, tags: table, callback: (fileID: number, error: string) => void, fileid?: number, changelist?: string): void;
88
+
80
89
  /**
81
90
  * Requests information of the player with SteamID64 for later use with [steamworks.GetPlayerName](https://wiki.facepunch.com/gmod/steamworks.GetPlayerName).
82
91
  * @realm client and menu
83
92
  * @source https://wiki.facepunch.com/gmod/steamworks.RequestPlayerInfo
84
93
  */
85
94
  RequestPlayerInfo(steamID64: string, callback: (name: string) => void): void;
95
+
86
96
  /**
87
97
  * Sets the workshop item as "completed" by the player. There will be a visual indicator on the Steam Workshop for completed items.
88
98
  * @realm menu
89
99
  * @source https://wiki.facepunch.com/gmod/steamworks.SetFileCompleted
90
100
  */
91
101
  SetFileCompleted(workshopid: string): string;
102
+
92
103
  /**
93
104
  * Sets whether you have played this addon or not. This will be shown to the user in the Steam Workshop itself:
94
105
  *
@@ -97,18 +108,21 @@ interface SteamworksLib {
97
108
  * @source https://wiki.facepunch.com/gmod/steamworks.SetFilePlayed
98
109
  */
99
110
  SetFilePlayed(workshopid: string): string;
111
+
100
112
  /**
101
113
  * Sets if an addon should be enabled or disabled. Call [steamworks.ApplyAddons](https://wiki.facepunch.com/gmod/steamworks.ApplyAddons) afterwards to update.
102
114
  * @realm menu
103
115
  * @source https://wiki.facepunch.com/gmod/steamworks.SetShouldMountAddon
104
116
  */
105
117
  SetShouldMountAddon(workshopItemID: string, shouldMount: boolean): void;
118
+
106
119
  /**
107
120
  * Returns whenever the specified Steam Workshop addon will be mounted or not.
108
121
  * @realm client and menu
109
122
  * @source https://wiki.facepunch.com/gmod/steamworks.ShouldMountAddon
110
123
  */
111
124
  ShouldMountAddon(workshopItemID: string): boolean;
125
+
112
126
  /**
113
127
  * **INTERNAL**: This is used internally - although you're able to use it you probably shouldn't.
114
128
  *
@@ -119,6 +133,7 @@ interface SteamworksLib {
119
133
  * @source https://wiki.facepunch.com/gmod/steamworks.Subscribe
120
134
  */
121
135
  Subscribe(workshopItemID: string): void;
136
+
122
137
  /**
123
138
  * **INTERNAL**: This is used internally - although you're able to use it you probably shouldn't.
124
139
  * Unsubscribes to the specified workshop addon. Call [steamworks.ApplyAddons](https://wiki.facepunch.com/gmod/steamworks.ApplyAddons) afterwards to update.
@@ -129,12 +144,14 @@ interface SteamworksLib {
129
144
  * @source https://wiki.facepunch.com/gmod/steamworks.Unsubscribe
130
145
  */
131
146
  Unsubscribe(workshopItemID: string): void;
147
+
132
148
  /**
133
149
  * Opens the workshop website for specified Steam Workshop item in the Steam overlay browser.
134
150
  * @realm client and menu
135
151
  * @source https://wiki.facepunch.com/gmod/steamworks.ViewFile
136
152
  */
137
153
  ViewFile(workshopItemID: string): void;
154
+
138
155
  /**
139
156
  * **INTERNAL**: This is used internally - although you're able to use it you probably shouldn't.
140
157
  * Makes the user vote for the specified addon
@@ -142,6 +159,7 @@ interface SteamworksLib {
142
159
  * @source https://wiki.facepunch.com/gmod/steamworks.Vote
143
160
  */
144
161
  Vote(workshopItemID: string, upOrDown: boolean): void;
162
+
145
163
  /**
146
164
  * Retrieves vote info of supplied addon.
147
165
  *
@@ -151,22 +169,3 @@ interface SteamworksLib {
151
169
  */
152
170
  VoteInfo(workshopItemID: string, resultCallback: (data: table) => void): void;
153
171
  }
154
-
155
-
156
-
157
-
158
-
159
-
160
-
161
-
162
-
163
-
164
-
165
-
166
-
167
-
168
-
169
-
170
-
171
-
172
-
@@ -49,18 +49,21 @@ interface StringLib {
49
49
  * @source https://wiki.facepunch.com/gmod/string.CardinalToOrdinal
50
50
  */
51
51
  CardinalToOrdinal(input: number): string;
52
+
52
53
  /**
53
54
  * Inserts commas for every third digit of a given number.
54
55
  * @realm shared and menu
55
56
  * @source https://wiki.facepunch.com/gmod/string.Comma
56
57
  */
57
58
  Comma(value: number, separator?: string): string;
59
+
58
60
  /**
59
61
  * Returns whether or not the second passed string matches the end of the first.
60
62
  * @realm shared and menu
61
63
  * @source https://wiki.facepunch.com/gmod/string.EndsWith
62
64
  */
63
65
  EndsWith(str: string, _end: string): boolean;
66
+
64
67
  /**
65
68
  * Splits a string up wherever it finds the given separator. string.Split is an
66
69
  * alias of this, except that it doesn't support patterns.
@@ -72,18 +75,21 @@ interface StringLib {
72
75
  * @source https://wiki.facepunch.com/gmod/string.Explode
73
76
  */
74
77
  Explode<Sep extends string, Str extends string>(separator: ConstTpl<Sep>, str: ConstTpl<Str>, withpattern?: boolean): Split<Sep, Str>;
78
+
75
79
  /**
76
80
  * Returns the time as a formatted string or as a table if no format is given.
77
81
  * @realm shared and menu
78
82
  * @source https://wiki.facepunch.com/gmod/string.FormattedTime
79
83
  */
80
84
  FormattedTime(float: number, format?: string): string | FormattedTime;
85
+
81
86
  /**
82
87
  * Creates a string from a Color variable.
83
88
  * @realm shared and menu
84
89
  * @source https://wiki.facepunch.com/gmod/string.FromColor
85
90
  */
86
91
  FromColor(color: Color): string;
92
+
87
93
  /**
88
94
  * Returns char value from the specified index in the supplied string.
89
95
  * @realm shared and menu
@@ -91,6 +97,7 @@ interface StringLib {
91
97
  * @deprecated Use either string.sub(str, index, index) or str[index].
92
98
  */
93
99
  GetChar(str: string, index: number): string;
100
+
94
101
  /**
95
102
  * Returns extension of the file.
96
103
  *
@@ -104,6 +111,7 @@ interface StringLib {
104
111
  * @source https://wiki.facepunch.com/gmod/string.GetExtensionFromFilename
105
112
  */
106
113
  GetExtensionFromFilename(path: string): string;
114
+
107
115
  /**
108
116
  * Returns file name and extension.
109
117
  *
@@ -114,6 +122,7 @@ interface StringLib {
114
122
  * @source https://wiki.facepunch.com/gmod/string.GetFileFromFilename
115
123
  */
116
124
  GetFileFromFilename(path: string): string;
125
+
117
126
  /**
118
127
  * Returns the path part of a full file path.
119
128
  *
@@ -125,6 +134,7 @@ interface StringLib {
125
134
  * @source https://wiki.facepunch.com/gmod/string.GetPathFromFilename
126
135
  */
127
136
  GetPathFromFilename(path: string): string;
137
+
128
138
  /**
129
139
  * Joins the values of a table together to form a string.
130
140
  *
@@ -135,24 +145,28 @@ interface StringLib {
135
145
  * @deprecated You really should just use table.concat.
136
146
  */
137
147
  Implode(separator?: string, pieces?: table): string;
148
+
138
149
  /**
139
150
  * Interpolates a given string with the given table. This is useful for formatting localized strings.
140
151
  * @realm shared and menu
141
152
  * @source https://wiki.facepunch.com/gmod/string.Interpolate
142
153
  */
143
154
  Interpolate(str: string, lookuptable: table): string;
155
+
144
156
  /**
145
157
  * Escapes special characters for JavaScript in a string, making the string safe for inclusion in to JavaScript strings.
146
158
  * @realm shared and menu
147
159
  * @source https://wiki.facepunch.com/gmod/string.JavascriptSafe
148
160
  */
149
161
  JavascriptSafe(str: string): string;
162
+
150
163
  /**
151
164
  * Returns everything left of supplied place of that string.
152
165
  * @realm shared and menu
153
166
  * @source https://wiki.facepunch.com/gmod/string.Left
154
167
  */
155
168
  Left(str: string, num: number): string;
169
+
156
170
  /**
157
171
  * Converts a `"string_likeThis"` to a more human-friendly `"String like This"`.
158
172
  *
@@ -162,42 +176,49 @@ interface StringLib {
162
176
  * @source https://wiki.facepunch.com/gmod/string.NiceName
163
177
  */
164
178
  NiceName(text: string): string;
179
+
165
180
  /**
166
181
  * Converts a digital filesize to human-readable text.
167
182
  * @realm shared and menu
168
183
  * @source https://wiki.facepunch.com/gmod/string.NiceSize
169
184
  */
170
185
  NiceSize(bytes: number): string;
186
+
171
187
  /**
172
188
  * Formats the supplied number (in seconds) to the highest possible time unit.
173
189
  * @realm shared and menu
174
190
  * @source https://wiki.facepunch.com/gmod/string.NiceTime
175
191
  */
176
192
  NiceTime(num: number): string;
193
+
177
194
  /**
178
195
  * Escapes all special characters within a string, making the string safe for inclusion in a Lua pattern.
179
196
  * @realm shared and menu
180
197
  * @source https://wiki.facepunch.com/gmod/string.PatternSafe
181
198
  */
182
199
  PatternSafe(str: string): string;
200
+
183
201
  /**
184
202
  * Replaces all occurrences of the supplied second string.
185
203
  * @realm shared and menu
186
204
  * @source https://wiki.facepunch.com/gmod/string.Replace
187
205
  */
188
206
  Replace(str: string, find: string, replace: string): string;
207
+
189
208
  /**
190
209
  * Returns the last n-th characters of the string.
191
210
  * @realm shared and menu
192
211
  * @source https://wiki.facepunch.com/gmod/string.Right
193
212
  */
194
213
  Right(str: string, num: number): string;
214
+
195
215
  /**
196
216
  * Sets the character at the specific index of the string.
197
217
  * @realm shared and menu
198
218
  * @source https://wiki.facepunch.com/gmod/string.SetChar
199
219
  */
200
220
  SetChar(InputString: string, Index: number, ReplacementChar: string): string;
221
+
201
222
  /**
202
223
  * Splits the string into a table of strings, separated by the second argument.
203
224
  * An alias of string.Explode, but with flipped arguments.
@@ -209,6 +230,7 @@ interface StringLib {
209
230
  * @source https://wiki.facepunch.com/gmod/string.Split
210
231
  */
211
232
  Split<Sep extends string, Str extends string>(Inputstring: ConstTpl<Str>, Separator: ConstTpl<Sep>): Split<Sep, Str>;
233
+
212
234
  /**
213
235
  * Returns whether or not the first string starts with the second. This is a alias of [string.StartsWith](https://wiki.facepunch.com/gmod/string.StartsWith).
214
236
  * @realm shared and menu
@@ -216,12 +238,14 @@ interface StringLib {
216
238
  * @deprecated Use string.StartsWith.
217
239
  */
218
240
  StartWith(inputStr: string, start: string): boolean;
241
+
219
242
  /**
220
243
  * Returns whether or not the first string starts with the second.
221
244
  * @realm shared and menu
222
245
  * @source https://wiki.facepunch.com/gmod/string.StartsWith
223
246
  */
224
247
  StartsWith(inputStr: string, start: string): boolean;
248
+
225
249
  /**
226
250
  * Removes the extension of a path.
227
251
  *
@@ -231,6 +255,7 @@ interface StringLib {
231
255
  * @source https://wiki.facepunch.com/gmod/string.StripExtension
232
256
  */
233
257
  StripExtension(path: string): string;
258
+
234
259
  /**
235
260
  * Attempts to create a Color from a string.
236
261
  *
@@ -238,18 +263,21 @@ interface StringLib {
238
263
  * @source https://wiki.facepunch.com/gmod/string.ToColor
239
264
  */
240
265
  ToColor(colorString: string): Color;
266
+
241
267
  /**
242
268
  * Returns given time in "MM:SS" format.
243
269
  * @realm shared and menu
244
270
  * @source https://wiki.facepunch.com/gmod/string.ToMinutesSeconds
245
271
  */
246
272
  ToMinutesSeconds(time: number): string;
273
+
247
274
  /**
248
275
  * Returns given time in "MM:SS:MS" format.
249
276
  * @realm shared and menu
250
277
  * @source https://wiki.facepunch.com/gmod/string.ToMinutesSecondsMilliseconds
251
278
  */
252
279
  ToMinutesSecondsMilliseconds(time: number): string;
280
+
253
281
  /**
254
282
  * Splits the string into characters and creates a sequential table of characters.
255
283
  *
@@ -260,24 +288,28 @@ interface StringLib {
260
288
  * @source https://wiki.facepunch.com/gmod/string.ToTable
261
289
  */
262
290
  ToTable(str: string): table;
291
+
263
292
  /**
264
293
  * Removes leading and trailing matches of a string.
265
294
  * @realm shared and menu
266
295
  * @source https://wiki.facepunch.com/gmod/string.Trim
267
296
  */
268
297
  Trim(Inputstring: string, Char?: string): string;
298
+
269
299
  /**
270
300
  * Removes leading spaces/characters from a string.
271
301
  * @realm shared and menu
272
302
  * @source https://wiki.facepunch.com/gmod/string.TrimLeft
273
303
  */
274
304
  TrimLeft(str: string, char?: string): string;
305
+
275
306
  /**
276
307
  * Removes trailing spaces/passed character from a string.
277
308
  * @realm shared and menu
278
309
  * @source https://wiki.facepunch.com/gmod/string.TrimRight
279
310
  */
280
311
  TrimRight(str: string, char?: string): string;
312
+
281
313
  /**
282
314
  * Returns the given string's characters in their numeric ASCII representation.
283
315
  * **WARNING**: This function will throw an error if the slice length is greater than 8000 characters.
@@ -287,12 +319,14 @@ interface StringLib {
287
319
  * @source https://wiki.facepunch.com/gmod/string.byte
288
320
  */
289
321
  byte(string: string, startPos?: number, endPos?: number): (...any);
322
+
290
323
  /**
291
324
  * Takes the given numerical bytes and converts them to a string.
292
325
  * @realm shared and menu
293
326
  * @source https://wiki.facepunch.com/gmod/string.char
294
327
  */
295
328
  char(...: any): string;
329
+
296
330
  /**
297
331
  * Returns the binary bytecode of the given function.
298
332
  *
@@ -303,6 +337,7 @@ interface StringLib {
303
337
  * @source https://wiki.facepunch.com/gmod/string.dump
304
338
  */
305
339
  dump(func: function, stripDebugInfo?: boolean): string;
340
+
306
341
  /**
307
342
  * Attempts to find the specified substring in a string.
308
343
  *
@@ -313,12 +348,14 @@ interface StringLib {
313
348
  * @source https://wiki.facepunch.com/gmod/string.find
314
349
  */
315
350
  find(haystack: string, needle: string, startPos?: number, noPatterns?: boolean): (number, number, string);
351
+
316
352
  /**
317
353
  * Formats the specified values into the string given.
318
354
  * @realm shared and menu
319
355
  * @source https://wiki.facepunch.com/gmod/string.format
320
356
  */
321
357
  format(format: string, ...: any): string;
358
+
322
359
  /**
323
360
  * Returns an iterator function that is called for every complete match of the pattern, all sub matches will be passed as to the loop.
324
361
  * @realm shared and menu
@@ -326,12 +363,14 @@ interface StringLib {
326
363
  * @deprecated This function is removed in Lua versions later than what GMod is currently using. Use string.gmatch instead.
327
364
  */
328
365
  gfind(data: string, pattern: string): function;
366
+
329
367
  /**
330
368
  * Using [Patterns](https://wiki.facepunch.com/gmod/Patterns), returns an iterator which will return either one value if no capture groups are defined, or any capture group matches.
331
369
  * @realm shared and menu
332
370
  * @source https://wiki.facepunch.com/gmod/string.gmatch
333
371
  */
334
372
  gmatch(data: string, pattern: string): function;
373
+
335
374
  /**
336
375
  * Replaces certain character sequences in a string using Patterns.
337
376
  *
@@ -342,12 +381,14 @@ interface StringLib {
342
381
  * @source https://wiki.facepunch.com/gmod/string.gsub
343
382
  */
344
383
  gsub(string: string, pattern: string, replacement: string | table | ((...: string) => string), maxReplaces?: number): (string, number);
384
+
345
385
  /**
346
386
  * Counts the number of characters in the string (length). This is equivalent to using the length operator (#).
347
387
  * @realm shared and menu
348
388
  * @source https://wiki.facepunch.com/gmod/string.len
349
389
  */
350
390
  len(str: string): number;
391
+
351
392
  /**
352
393
  * Changes any upper-case letters in a string to lower-case letters.
353
394
  * **NOTE**: This function doesn't work on special non-English UTF-8 characters.
@@ -357,30 +398,35 @@ interface StringLib {
357
398
  * @source https://wiki.facepunch.com/gmod/string.lower
358
399
  */
359
400
  lower(str: string): string;
401
+
360
402
  /**
361
403
  * Finds a [Pattern](https://wiki.facepunch.com/gmod/Patterns) in a string.
362
404
  * @realm shared and menu
363
405
  * @source https://wiki.facepunch.com/gmod/string.match
364
406
  */
365
407
  match(string: string, pattern: string, startPosition?: number): (...any);
408
+
366
409
  /**
367
410
  * Repeats a string by the provided number, with an optional separator.
368
411
  * @realm shared and menu
369
412
  * @source https://wiki.facepunch.com/gmod/string.rep
370
413
  */
371
414
  rep(str: string, repetitions: number, separator?: string): string;
415
+
372
416
  /**
373
417
  * Reverses a string.
374
418
  * @realm shared and menu
375
419
  * @source https://wiki.facepunch.com/gmod/string.reverse
376
420
  */
377
421
  reverse(str: string): string;
422
+
378
423
  /**
379
424
  * Returns a sub-string, starting from the character at position `StartPos` of the string (inclusive), and optionally ending at the character at position `EndPos` of the string (also inclusive). If EndPos is not given, the rest of the string is returned.
380
425
  * @realm shared and menu
381
426
  * @source https://wiki.facepunch.com/gmod/string.sub
382
427
  */
383
428
  sub(string: string, StartPos: number, EndPos?: number): string;
429
+
384
430
  /**
385
431
  * Changes any lower-case letters in a string to upper-case letters.
386
432
  * **NOTE**: This function doesn't work on special non-English UTF-8 characters.
@@ -391,53 +437,3 @@ interface StringLib {
391
437
  */
392
438
  upper(str: string): string;
393
439
  }
394
-
395
-
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
-
@@ -1128,7 +1128,6 @@ interface EntityCopyData {
1128
1128
  WorkshopID?: number;
1129
1129
  }
1130
1130
 
1131
-
1132
1131
  /**
1133
1132
  * The table structure used for bullets that have already been fired.
1134
1133
  *
@@ -1409,7 +1408,6 @@ interface HTTPRequestWithoutParameters extends HTTPRequest {
1409
1408
  parameters: nil;
1410
1409
  }
1411
1410
 
1412
-
1413
1411
  /**
1414
1412
  * Table used by util.TraceHull.
1415
1413
  * @realm shared
@@ -1444,7 +1442,6 @@ interface HullTrace {
1444
1442
  hitclientonly?: boolean;
1445
1443
  }
1446
1444
 
1447
-
1448
1445
  /**
1449
1446
  * Table structure used for [render.SetLocalModelLights](https://wiki.facepunch.com/gmod/render.SetLocalModelLights).
1450
1447
  * @realm client
@@ -3148,7 +3145,6 @@ interface SoundData {
3148
3145
  pitchend?: number;
3149
3146
  }
3150
3147
 
3151
-
3152
3148
  /**
3153
3149
  * Table describing a sound hint, used by [NPC:GetBestSoundHint](https://wiki.facepunch.com/gmod/NPC:GetBestSoundHint) and [sound.GetLoudestSoundHint](https://wiki.facepunch.com/gmod/sound.GetLoudestSoundHint).
3154
3150
  * @realm server
@@ -3380,7 +3376,6 @@ interface Tool {
3380
3376
  RightClickAutomatic?: boolean;
3381
3377
  }
3382
3378
 
3383
-
3384
3379
  /**
3385
3380
  * Table is one element from [team.GetAllTeams](https://wiki.facepunch.com/gmod/team.GetAllTeams).
3386
3381
  * @realm shared
@@ -3523,7 +3518,6 @@ interface Trace {
3523
3518
  hitclientonly?: boolean;
3524
3519
  }
3525
3520
 
3526
-
3527
3521
  /**
3528
3522
  * Table structure used as trace result. Default values are when the trace hits nothing.
3529
3523
  *
@@ -4439,4 +4433,3 @@ interface ViewSetup {
4439
4433
  */
4440
4434
  offcenter: table;
4441
4435
  }
4442
-