@tlua/gmod 1.0.1

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 (278) hide show
  1. package/README.md +28 -0
  2. package/__metadata.json +4 -0
  3. package/_globals.d.tlua +178 -0
  4. package/_gmod-std.d.tlua +35 -0
  5. package/achievementicon.d.tlua +12 -0
  6. package/achievements.d.tlua +162 -0
  7. package/ai.d.tlua +65 -0
  8. package/ai_schedule.d.tlua +17 -0
  9. package/ai_task.d.tlua +17 -0
  10. package/angle.d.tlua +197 -0
  11. package/avatarimage.d.tlua +10 -0
  12. package/awesomium.d.tlua +14 -0
  13. package/baseclass.d.tlua +42 -0
  14. package/bf_read.d.tlua +110 -0
  15. package/bit.d.tlua +121 -0
  16. package/button.d.tlua +13 -0
  17. package/cam.d.tlua +220 -0
  18. package/ceffectdata.d.tlua +337 -0
  19. package/chat.d.tlua +62 -0
  20. package/checkbutton.d.tlua +14 -0
  21. package/cleanup.d.tlua +88 -0
  22. package/cluaemitter.d.tlua +119 -0
  23. package/clualocomotion.d.tlua +383 -0
  24. package/cluaparticle.d.tlua +426 -0
  25. package/cmovedata.d.tlua +476 -0
  26. package/cnavarea.d.tlua +845 -0
  27. package/cnavladder.d.tlua +209 -0
  28. package/cnewparticleeffect.d.tlua +259 -0
  29. package/color.d.tlua +339 -0
  30. package/concommand.d.tlua +69 -0
  31. package/constraint.d.tlua +311 -0
  32. package/construct.d.tlua +26 -0
  33. package/contentheader.d.tlua +32 -0
  34. package/contenticon.d.tlua +86 -0
  35. package/contentsidebar.d.tlua +45 -0
  36. package/contentsidebartoolbox.d.tlua +13 -0
  37. package/contextbase.d.tlua +37 -0
  38. package/controlpanel.d.tlua +140 -0
  39. package/controlpresets.d.tlua +118 -0
  40. package/convar.d.tlua +162 -0
  41. package/cookie.d.tlua +60 -0
  42. package/coroutine.d.tlua +90 -0
  43. package/crecipientfilter.d.tlua +152 -0
  44. package/csent.d.tlua +10 -0
  45. package/csoundpatch.d.tlua +150 -0
  46. package/ctakedamageinfo.d.tlua +366 -0
  47. package/ctrllistbox.d.tlua +12 -0
  48. package/ctrlnumpad.d.tlua +73 -0
  49. package/cusercmd.d.tlua +320 -0
  50. package/custom_classes.d.tlua +65 -0
  51. package/custom_entity_fields.d.tlua +96 -0
  52. package/cvars.d.tlua +80 -0
  53. package/dadjustablemodelpanel.d.tlua +81 -0
  54. package/dalphabar.d.tlua +27 -0
  55. package/dbinder.d.tlua +37 -0
  56. package/dbubblecontainer.d.tlua +18 -0
  57. package/dbutton.d.tlua +88 -0
  58. package/dcategoryheader.d.tlua +13 -0
  59. package/dcategorylist.d.tlua +11 -0
  60. package/dcheckbox.d.tlua +46 -0
  61. package/dcheckboxlabel.d.tlua +90 -0
  62. package/dcollapsiblecategory.d.tlua +240 -0
  63. package/dcolorbutton.d.tlua +73 -0
  64. package/dcolorcombo.d.tlua +54 -0
  65. package/dcolorcube.d.tlua +137 -0
  66. package/dcolormixer.d.tlua +303 -0
  67. package/dcolorpalette.d.tlua +294 -0
  68. package/dcolumnsheet.d.tlua +49 -0
  69. package/dcombobox.d.tlua +161 -0
  70. package/ddragbase.d.tlua +151 -0
  71. package/ddrawer.d.tlua +72 -0
  72. package/debug.d.tlua +236 -0
  73. package/debugoverlay.d.tlua +193 -0
  74. package/dentityproperties.d.tlua +63 -0
  75. package/derma.d.tlua +119 -0
  76. package/dexpandbutton.d.tlua +30 -0
  77. package/dfilebrowser.d.tlua +228 -0
  78. package/dform.d.tlua +176 -0
  79. package/dframe.d.tlua +261 -0
  80. package/dgrid.d.tlua +113 -0
  81. package/dhorizontaldivider.d.tlua +196 -0
  82. package/dhorizontalscroller.d.tlua +104 -0
  83. package/dhscrollbar.d.tlua +109 -0
  84. package/dhtml.d.tlua +91 -0
  85. package/dhtmlcontrols.d.tlua +62 -0
  86. package/diconbrowser.d.tlua +113 -0
  87. package/diconlayout.d.tlua +190 -0
  88. package/dimage.d.tlua +221 -0
  89. package/dimagebutton.d.tlua +103 -0
  90. package/dkillicon.d.tlua +9 -0
  91. package/dlabel.d.tlua +385 -0
  92. package/dlabeleditable.d.tlua +51 -0
  93. package/dlabelurl.d.tlua +100 -0
  94. package/dlistbox.d.tlua +82 -0
  95. package/dlistboxitem.d.tlua +42 -0
  96. package/dlistlayout.d.tlua +14 -0
  97. package/dlistview.d.tlua +360 -0
  98. package/dlistview_column.d.tlua +135 -0
  99. package/dlistview_columnplain.d.tlua +11 -0
  100. package/dlistview_draggerbar.d.tlua +11 -0
  101. package/dlistview_line.d.tlua +140 -0
  102. package/dlistviewheaderlabel.d.tlua +11 -0
  103. package/dlistviewlabel.d.tlua +11 -0
  104. package/dlistviewline.d.tlua +11 -0
  105. package/dmenu.d.tlua +266 -0
  106. package/dmenubar.d.tlua +42 -0
  107. package/dmenuoption.d.tlua +135 -0
  108. package/dmenuoptioncvar.d.tlua +64 -0
  109. package/dmodelpanel.d.tlua +207 -0
  110. package/dmodelselect.d.tlua +20 -0
  111. package/dmodelselectmulti.d.tlua +19 -0
  112. package/dnotify.d.tlua +93 -0
  113. package/dnumberscratch.d.tlua +284 -0
  114. package/dnumberwang.d.tlua +147 -0
  115. package/dnumpad.d.tlua +11 -0
  116. package/dnumslider.d.tlua +182 -0
  117. package/dpanel.d.tlua +152 -0
  118. package/dpanellist.d.tlua +109 -0
  119. package/dpaneloverlay.d.tlua +65 -0
  120. package/dpanelselect.d.tlua +13 -0
  121. package/dpanpanel.d.tlua +64 -0
  122. package/dprogress.d.tlua +27 -0
  123. package/dproperties.d.tlua +52 -0
  124. package/dproperty_boolean.d.tlua +12 -0
  125. package/dproperty_combo.d.tlua +31 -0
  126. package/dproperty_entity.d.tlua +12 -0
  127. package/dproperty_float.d.tlua +12 -0
  128. package/dproperty_generic.d.tlua +50 -0
  129. package/dproperty_int.d.tlua +12 -0
  130. package/dproperty_vectorcolor.d.tlua +14 -0
  131. package/dpropertysheet.d.tlua +167 -0
  132. package/dragndrop.d.tlua +123 -0
  133. package/draw.d.tlua +162 -0
  134. package/drgbpicker.d.tlua +49 -0
  135. package/drive.d.tlua +159 -0
  136. package/dscrollbargrip.d.tlua +13 -0
  137. package/dscrollpanel.d.tlua +110 -0
  138. package/dshape.d.tlua +72 -0
  139. package/dsizetocontents.d.tlua +46 -0
  140. package/dslider.d.tlua +302 -0
  141. package/dsprite.d.tlua +84 -0
  142. package/dtab.d.tlua +81 -0
  143. package/dtextentry.d.tlua +442 -0
  144. package/dtilelayout.d.tlua +218 -0
  145. package/dtooltip.d.tlua +76 -0
  146. package/dtree.d.tlua +185 -0
  147. package/dtree_node.d.tlua +793 -0
  148. package/dtree_node_button.d.tlua +13 -0
  149. package/duplicator.d.tlua +338 -0
  150. package/dverticaldivider.d.tlua +223 -0
  151. package/dvscrollbar.d.tlua +109 -0
  152. package/editablepanel.d.tlua +10 -0
  153. package/effect.d.tlua +121 -0
  154. package/effects.d.tlua +77 -0
  155. package/engine.d.tlua +248 -0
  156. package/entity.d.tlua +8295 -0
  157. package/ents.d.tlua +267 -0
  158. package/enums.d.tlua +7082 -0
  159. package/file.d.tlua +419 -0
  160. package/file_class.d.tlua +7 -0
  161. package/fingerposer.d.tlua +12 -0
  162. package/fingervar.d.tlua +13 -0
  163. package/frame.d.tlua +11 -0
  164. package/frame_blend.d.tlua +105 -0
  165. package/game.d.tlua +482 -0
  166. package/gameevent.d.tlua +968 -0
  167. package/gamemode.d.tlua +48 -0
  168. package/global.d.tlua +3156 -0
  169. package/gm.d.tlua +3218 -0
  170. package/gmod.d.tlua +20 -0
  171. package/gmsave.d.tlua +53 -0
  172. package/gui.d.tlua +232 -0
  173. package/gwen.d.tlua +55 -0
  174. package/halo.d.tlua +42 -0
  175. package/hammer.d.tlua +17 -0
  176. package/hook.d.tlua +64 -0
  177. package/html.d.tlua +22 -0
  178. package/http.d.tlua +72 -0
  179. package/iconeditor.d.tlua +130 -0
  180. package/igmodaudiochannel.d.tlua +419 -0
  181. package/imagecheckbox.d.tlua +48 -0
  182. package/imaterial.d.tlua +288 -0
  183. package/imesh.d.tlua +70 -0
  184. package/index.d.tlua +277 -0
  185. package/input.d.tlua +252 -0
  186. package/invalidateinternalentitycache.d.tlua +13 -0
  187. package/irestore.d.tlua +94 -0
  188. package/isave.d.tlua +94 -0
  189. package/itexture.d.tlua +108 -0
  190. package/ivideowriter.d.tlua +53 -0
  191. package/jit.d.tlua +243 -0
  192. package/killicon.d.tlua +84 -0
  193. package/label.d.tlua +20 -0
  194. package/language.d.tlua +26 -0
  195. package/list.d.tlua +112 -0
  196. package/makeballoon.d.tlua +15 -0
  197. package/markup.d.tlua +38 -0
  198. package/markupobject.d.tlua +53 -0
  199. package/material.d.tlua +9 -0
  200. package/math.d.tlua +899 -0
  201. package/matproxy.d.tlua +60 -0
  202. package/matselect.d.tlua +106 -0
  203. package/menu.d.tlua +20 -0
  204. package/menubar.d.tlua +39 -0
  205. package/mesh.d.tlua +183 -0
  206. package/modelimage.d.tlua +12 -0
  207. package/motionsensor.d.tlua +115 -0
  208. package/navmesh.d.tlua +274 -0
  209. package/net.d.tlua +639 -0
  210. package/nextbot.d.tlua +380 -0
  211. package/notification.d.tlua +35 -0
  212. package/npc.d.tlua +1787 -0
  213. package/numpad.d.tlua +89 -0
  214. package/os.d.tlua +56 -0
  215. package/package.d.tlua +15 -0
  216. package/package.json +18 -0
  217. package/panel.d.tlua +3650 -0
  218. package/panellist.d.tlua +13 -0
  219. package/pathfollower.d.tlua +301 -0
  220. package/permissions.d.tlua +77 -0
  221. package/physcollide.d.tlua +40 -0
  222. package/physenv.d.tlua +136 -0
  223. package/physobj.d.tlua +799 -0
  224. package/pixelvis_handle_t.d.tlua +9 -0
  225. package/player.d.tlua +3320 -0
  226. package/player_manager.d.tlua +147 -0
  227. package/preseteditor.d.tlua +13 -0
  228. package/presets.d.tlua +79 -0
  229. package/projectedtexture.d.tlua +553 -0
  230. package/properties.d.tlua +65 -0
  231. package/propselect.d.tlua +50 -0
  232. package/radiobutton.d.tlua +13 -0
  233. package/render.d.tlua +1700 -0
  234. package/resource.d.tlua +73 -0
  235. package/richtext.d.tlua +17 -0
  236. package/sandbox.d.tlua +576 -0
  237. package/saverestore.d.tlua +148 -0
  238. package/schedule.d.tlua +69 -0
  239. package/scripted_ents.d.tlua +124 -0
  240. package/search.d.tlua +26 -0
  241. package/serverlist.d.tlua +85 -0
  242. package/slidebar.d.tlua +12 -0
  243. package/slider.d.tlua +11 -0
  244. package/sound.d.tlua +140 -0
  245. package/spawnicon.d.tlua +95 -0
  246. package/spawnmenu.d.tlua +286 -0
  247. package/spawnmenucontentpanel.d.tlua +52 -0
  248. package/sql.d.tlua +154 -0
  249. package/stack.d.tlua +57 -0
  250. package/steamworks.d.tlua +208 -0
  251. package/string.d.tlua +535 -0
  252. package/structures.d.tlua +4442 -0
  253. package/surface.d.tlua +463 -0
  254. package/surfaceinfo.d.tlua +70 -0
  255. package/system.d.tlua +134 -0
  256. package/table.d.tlua +533 -0
  257. package/task.d.tlua +92 -0
  258. package/team.d.tlua +195 -0
  259. package/textentry.d.tlua +12 -0
  260. package/tgaimage.d.tlua +11 -0
  261. package/timer.d.tlua +198 -0
  262. package/tool.d.tlua +466 -0
  263. package/ugcpublishwindow.d.tlua +83 -0
  264. package/umsg.d.tlua +147 -0
  265. package/undo.d.tlua +122 -0
  266. package/urllabel.d.tlua +13 -0
  267. package/usermessage.d.tlua +48 -0
  268. package/utf8.d.tlua +89 -0
  269. package/util.d.tlua +1087 -0
  270. package/vector.d.tlua +413 -0
  271. package/vehicle.d.tlua +472 -0
  272. package/vgui.d.tlua +201 -0
  273. package/video.d.tlua +17 -0
  274. package/vmatrix.d.tlua +392 -0
  275. package/weapon.d.tlua +913 -0
  276. package/weapons.d.tlua +90 -0
  277. package/widgets.d.tlua +29 -0
  278. package/workshopfilebase.d.tlua +68 -0
@@ -0,0 +1,95 @@
1
+ // AUTO-GENERATED tlua declarations. Do not edit by hand.
2
+
3
+ /**
4
+ * A "spawn icon" displays an image for the given model path.
5
+ * It is mostly used in the Spawn Menu (Q).
6
+ * It uses [ModelImage](https://wiki.facepunch.com/gmod/ModelImage) internally.
7
+ *
8
+ * @realm client
9
+ * @source https://wiki.facepunch.com/gmod/SpawnIcon
10
+ */
11
+ interface SpawnIcon extends DButton {}
12
+
13
+ interface SpawnIcon {
14
+ /**
15
+ * Returns the currently active [Sub Model IDs](https://wiki.facepunch.com/gmod/Structures/BodyGroupData#submodels) for each Body Group of the spawn icon.
16
+ *
17
+ * This is set by [SpawnIcon:SetBodyGroup](https://wiki.facepunch.com/gmod/SpawnIcon:SetBodyGroup).
18
+ *
19
+ * @realm client
20
+ * @source https://wiki.facepunch.com/gmod/SpawnIcon:GetBodyGroup
21
+ */
22
+ GetBodyGroup(self: SpawnIcon): string;
23
+ }
24
+
25
+ interface SpawnIcon {
26
+ /**
27
+ * Returns the currently set model name. This is set by [SpawnIcon:SetModelName](https://wiki.facepunch.com/gmod/SpawnIcon:SetModelName).
28
+ *
29
+ * @realm client
30
+ * @source https://wiki.facepunch.com/gmod/SpawnIcon:GetModelName
31
+ */
32
+ GetModelName(self: SpawnIcon): string;
33
+ }
34
+
35
+ interface SpawnIcon {
36
+ /**
37
+ * Returns the currently set skin of the spawnicon. This is set by [SpawnIcon:SetSkinID](https://wiki.facepunch.com/gmod/SpawnIcon:SetSkinID).
38
+ *
39
+ * @realm client
40
+ * @source https://wiki.facepunch.com/gmod/SpawnIcon:GetSkinID
41
+ */
42
+ GetSkinID(self: SpawnIcon): number;
43
+ }
44
+
45
+ interface SpawnIcon {
46
+ /**
47
+ * Called when right clicked on the SpawnIcon. It will not be called if there is a selection ([Panel:GetSelectionCanvas](https://wiki.facepunch.com/gmod/Panel:GetSelectionCanvas)), in which case [SANDBOX:SpawnlistOpenGenericMenu](https://wiki.facepunch.com/gmod/SANDBOX:SpawnlistOpenGenericMenu) is called.
48
+ *
49
+ * @realm client
50
+ * @source https://wiki.facepunch.com/gmod/SpawnIcon:OpenMenu
51
+ */
52
+ OpenMenu(self: SpawnIcon): void;
53
+ }
54
+
55
+ interface SpawnIcon {
56
+ /**
57
+ * **INTERNAL**: This is done automatically by SpawnIcon. You do not need to call this. Doing so may cause unforeseen consequences.
58
+ *
59
+ *
60
+ * Sets the active [Sub Model ID](https://wiki.facepunch.com/gmod/Structures/BodyGroupData#submodels) for the given [Body Group ID](https://wiki.facepunch.com/gmod/Structures/BodyGroupData#id), so it can be retrieved with [SpawnIcon:GetBodyGroup](https://wiki.facepunch.com/gmod/SpawnIcon:GetBodyGroup).
61
+ *
62
+ * Use [Panel:SetModel](https://wiki.facepunch.com/gmod/Panel:SetModel) instead.
63
+ *
64
+ * @realm client
65
+ * @source https://wiki.facepunch.com/gmod/SpawnIcon:SetBodyGroup
66
+ */
67
+ SetBodyGroup(self: SpawnIcon, bodyGroupId: number, activeSubModelId: number): void;
68
+ }
69
+
70
+ interface SpawnIcon {
71
+ /**
72
+ * **INTERNAL**: This is done automatically by SpawnIcon. You do not need to call this. Doing so may cause unforeseen consequences.
73
+ *
74
+ *
75
+ * Sets the model name, so it can be retrieved with [SpawnIcon:GetModelName](https://wiki.facepunch.com/gmod/SpawnIcon:GetModelName). Use [Panel:SetModel](https://wiki.facepunch.com/gmod/Panel:SetModel) instead.
76
+ *
77
+ * @realm client
78
+ * @source https://wiki.facepunch.com/gmod/SpawnIcon:SetModelName
79
+ */
80
+ SetModelName(self: SpawnIcon, mdl: string): void;
81
+ }
82
+
83
+ interface SpawnIcon {
84
+ /**
85
+ * **INTERNAL**: This is done automatically by SpawnIcon. You do not need to call this. Doing so may cause unforeseen consequences.
86
+ *
87
+ *
88
+ * Sets the skin id of the spawn icon, so it can be retrieved with [SpawnIcon:GetSkinID](https://wiki.facepunch.com/gmod/SpawnIcon:GetSkinID). Use [Panel:SetModel](https://wiki.facepunch.com/gmod/Panel:SetModel) instead.
89
+ *
90
+ * @realm client
91
+ * @source https://wiki.facepunch.com/gmod/SpawnIcon:SetSkinID
92
+ */
93
+ SetSkinID(self: SpawnIcon, skin: number): void;
94
+ }
95
+
@@ -0,0 +1,286 @@
1
+ // AUTO-GENERATED tlua declarations. Do not edit by hand.
2
+
3
+ /**
4
+ * The spawnmenu library is a set of functions that allow you to control the spawn (Q) menu.
5
+ * @source https://wiki.facepunch.com/gmod/spawnmenu
6
+ */
7
+ declare spawnmenu: SpawnmenuLib;
8
+
9
+ interface SpawnmenuLib {
10
+ /**
11
+ * Activates a tool, opens context menu and brings up the tool gun.
12
+ * @realm client
13
+ * @source https://wiki.facepunch.com/gmod/spawnmenu.ActivateTool
14
+ */
15
+ ActivateTool(tool: string, menu_only?: boolean): void;
16
+ }
17
+
18
+ interface SpawnmenuLib {
19
+ /**
20
+ * Activates tools context menu in specified tool tab.
21
+ * @realm client
22
+ * @source https://wiki.facepunch.com/gmod/spawnmenu.ActivateToolPanel
23
+ */
24
+ ActivateToolPanel(tab: number, cp: Panel): void;
25
+ }
26
+
27
+ interface SpawnmenuLib {
28
+ /**
29
+ * Returns currently opened control panel of a tool, post process effect or some other menu in spawnmenu.
30
+ * @realm client
31
+ * @source https://wiki.facepunch.com/gmod/spawnmenu.ActiveControlPanel
32
+ */
33
+ ActiveControlPanel(): Panel;
34
+ }
35
+
36
+ interface SpawnmenuLib {
37
+ /**
38
+ * Registers a new content type that is saveable into spawnlists.
39
+ * Created/called by [spawnmenu.CreateContentIcon](https://wiki.facepunch.com/gmod/spawnmenu.CreateContentIcon).
40
+ *
41
+ * @realm client
42
+ * @source https://wiki.facepunch.com/gmod/spawnmenu.AddContentType
43
+ */
44
+ AddContentType(name: string, constructor: (container: Panel, data: table) => Panel): void;
45
+ }
46
+
47
+ interface SpawnmenuLib {
48
+ /**
49
+ * Inserts a new tab into the CreationMenus table, used by the creation menu to
50
+ * generate its tabs (Spawnlists, Weapons, Entities, etc.).
51
+ * @realm client
52
+ * @source https://wiki.facepunch.com/gmod/spawnmenu.AddCreationTab
53
+ */
54
+ AddCreationTab<T extends Panel>(name: string, _function: () => T, material?: string, order?: number, tooltip?: string): void;
55
+ }
56
+
57
+
58
+ interface SpawnmenuLib {
59
+ /**
60
+ * Used to add addon spawnlists to the spawnmenu tree. This function should be called within [SANDBOX:PopulatePropMenu](https://wiki.facepunch.com/gmod/SANDBOX:PopulatePropMenu).
61
+ *
62
+ * Addon spawnlists will not save to disk if edited.
63
+ *
64
+ * **WARNING**: You should never try to modify player customized spawnlists!
65
+ *
66
+ *
67
+ * @realm client
68
+ * @source https://wiki.facepunch.com/gmod/spawnmenu.AddPropCategory
69
+ */
70
+ AddPropCategory(classname: string, name: string, contents: table, icon: string, id?: number, parentID?: number, needsApp?: string): void;
71
+ }
72
+
73
+ interface SpawnmenuLib {
74
+ /**
75
+ * Used to create a new category in the list inside of a spawnmenu Tool Tab.
76
+ *
77
+ * You must call this function from [SANDBOX:AddToolMenuCategories](https://wiki.facepunch.com/gmod/SANDBOX:AddToolMenuCategories) for it to work properly.
78
+ *
79
+ * See [spawnmenu.AddToolTab](https://wiki.facepunch.com/gmod/spawnmenu.AddToolTab) to add new tool tabs.
80
+ * See [spawnmenu.AddToolMenuOption](https://wiki.facepunch.com/gmod/spawnmenu.AddToolMenuOption) to add new sub options to a newly created tool category.
81
+ *
82
+ * @realm client
83
+ * @source https://wiki.facepunch.com/gmod/spawnmenu.AddToolCategory
84
+ */
85
+ AddToolCategory(tabName: string, className: string, printName: string): void;
86
+ }
87
+
88
+ interface SpawnmenuLib {
89
+ /**
90
+ * Adds an option to the right side of the spawnmenu.
91
+ *
92
+ * See [spawnmenu.AddToolTab](https://wiki.facepunch.com/gmod/spawnmenu.AddToolTab) to add new right-side tabs. See [spawnmenu.AddToolCategory](https://wiki.facepunch.com/gmod/spawnmenu.AddToolCategory) to add new categories.
93
+ *
94
+ * @realm client
95
+ * @source https://wiki.facepunch.com/gmod/spawnmenu.AddToolMenuOption
96
+ * @deprecated Legacy argument, no longer works.
97
+ */
98
+ AddToolMenuOption(tab: string, category: string, _class: string, name: string, cmd?: string, config?: string, cpanel?: (pnl: Panel) => void, table?: table): void;
99
+ }
100
+
101
+ interface SpawnmenuLib {
102
+ /**
103
+ * Adds a new tool tab to the right side of the spawnmenu. (usually via the [SANDBOX:AddToolMenuTabs](https://wiki.facepunch.com/gmod/SANDBOX:AddToolMenuTabs) hook)
104
+ *
105
+ * See [spawnmenu.GetToolMenu](https://wiki.facepunch.com/gmod/spawnmenu.GetToolMenu) for a function to retrieve existing tool tabs.
106
+ *
107
+ * See [spawnmenu.AddCreationTab](https://wiki.facepunch.com/gmod/spawnmenu.AddCreationTab) for tabs on the left side of the spawnmenu.
108
+ *
109
+ * See [spawnmenu.AddToolCategory](https://wiki.facepunch.com/gmod/spawnmenu.AddToolCategory) to add new categories to the newly created tool tab.
110
+ * See [spawnmenu.AddToolMenuOption](https://wiki.facepunch.com/gmod/spawnmenu.AddToolMenuOption) to add new options to the categories within a tool tab.
111
+ *
112
+ * @realm client
113
+ * @source https://wiki.facepunch.com/gmod/spawnmenu.AddToolTab
114
+ */
115
+ AddToolTab(name: string, label?: string, icon?: string): void;
116
+ }
117
+
118
+ interface SpawnmenuLib {
119
+ /**
120
+ * Clears all the tools from the different tool categories and the categories itself, if ran at the correct place.
121
+ *
122
+ * Seems to only work when ran at initialization.
123
+ *
124
+ * @realm client
125
+ * @source https://wiki.facepunch.com/gmod/spawnmenu.ClearToolMenus
126
+ */
127
+ ClearToolMenus(): void;
128
+ }
129
+
130
+ interface SpawnmenuLib {
131
+ /**
132
+ * Creates a new [ContentIcon](https://wiki.facepunch.com/gmod/ContentIcon) previously defined via [spawnmenu.AddContentType](https://wiki.facepunch.com/gmod/spawnmenu.AddContentType).
133
+ * @realm client
134
+ * @source https://wiki.facepunch.com/gmod/spawnmenu.CreateContentIcon
135
+ */
136
+ CreateContentIcon(type: string, parent?: Panel, data?: table): Panel;
137
+ }
138
+
139
+ interface SpawnmenuLib {
140
+ /**
141
+ * **INTERNAL**: This is used internally - although you're able to use it you probably shouldn't.
142
+ *
143
+ *
144
+ * Calls [spawnmenu.SaveToTextFiles](https://wiki.facepunch.com/gmod/spawnmenu.SaveToTextFiles).
145
+ *
146
+ * @realm client
147
+ * @source https://wiki.facepunch.com/gmod/spawnmenu.DoSaveToTextFiles
148
+ */
149
+ DoSaveToTextFiles(spawnlists: table): void;
150
+ }
151
+
152
+ interface SpawnmenuLib {
153
+ /**
154
+ * Returns the function to create an vgui element for a specified content type, previously defined by [spawnmenu.AddContentType](https://wiki.facepunch.com/gmod/spawnmenu.AddContentType).
155
+ *
156
+ * If a content type doesn't exist, a dummy function will be returned, and a warning printed to the console.
157
+ *
158
+ * You probably want to use [spawnmenu.CreateContentIcon](https://wiki.facepunch.com/gmod/spawnmenu.CreateContentIcon) to create icons.
159
+ *
160
+ * @realm client
161
+ * @source https://wiki.facepunch.com/gmod/spawnmenu.GetContentType
162
+ */
163
+ GetContentType(contentType: string): (container: Panel, data: table) => Panel;
164
+ }
165
+
166
+ interface SpawnmenuLib {
167
+ /**
168
+ * Returns the list of Creation tabs. Creation tabs are added via [spawnmenu.AddCreationTab](https://wiki.facepunch.com/gmod/spawnmenu.AddCreationTab).
169
+ * @realm client
170
+ * @source https://wiki.facepunch.com/gmod/spawnmenu.GetCreationTabs
171
+ */
172
+ GetCreationTabs(): table;
173
+ }
174
+
175
+ interface SpawnmenuLib {
176
+ /**
177
+ * Similar to [spawnmenu.GetPropTable](https://wiki.facepunch.com/gmod/spawnmenu.GetPropTable), but only returns spawnlists created by addons via [spawnmenu.AddPropCategory](https://wiki.facepunch.com/gmod/spawnmenu.AddPropCategory).
178
+ *
179
+ * These spawnlists are shown in a separate menu in-game.
180
+ *
181
+ * @realm client
182
+ * @source https://wiki.facepunch.com/gmod/spawnmenu.GetCustomPropTable
183
+ */
184
+ GetCustomPropTable(): table;
185
+ }
186
+
187
+ interface SpawnmenuLib {
188
+ /**
189
+ * Returns a table of all prop categories and their props in the spawnmenu.
190
+ *
191
+ * Note that if the spawnmenu has not been populated, this will return an empty table.
192
+ *
193
+ * This will not return spawnlists created by addons, see [spawnmenu.GetCustomPropTable](https://wiki.facepunch.com/gmod/spawnmenu.GetCustomPropTable) for that.
194
+ *
195
+ * @realm client
196
+ * @source https://wiki.facepunch.com/gmod/spawnmenu.GetPropTable
197
+ */
198
+ GetPropTable(): table;
199
+ }
200
+
201
+ interface SpawnmenuLib {
202
+ /**
203
+ * Returns an existing tool tab by name from the right side of the spawnmenu (usually during the [SANDBOX:AddToolMenuTabs](https://wiki.facepunch.com/gmod/SANDBOX:AddToolMenuTabs) hook)
204
+ *
205
+ * If the requested tooltab does not exist, it will be added. See also [spawnmenu.AddToolTab](https://wiki.facepunch.com/gmod/spawnmenu.AddToolTab).
206
+ * @realm client
207
+ * @source https://wiki.facepunch.com/gmod/spawnmenu.GetToolMenu
208
+ */
209
+ GetToolMenu(name: string, label?: string, icon?: string): table;
210
+ }
211
+
212
+ interface SpawnmenuLib {
213
+ /**
214
+ * Gets a table of tools on the client.
215
+ * @realm client
216
+ * @source https://wiki.facepunch.com/gmod/spawnmenu.GetTools
217
+ */
218
+ GetTools(): table;
219
+ }
220
+
221
+ interface SpawnmenuLib {
222
+ /**
223
+ * **INTERNAL**: This is used internally - although you're able to use it you probably shouldn't.
224
+ *
225
+ *
226
+ * Calls [spawnmenu.PopulateFromTextFiles](https://wiki.facepunch.com/gmod/spawnmenu.PopulateFromTextFiles).
227
+ *
228
+ * @realm client
229
+ * @source https://wiki.facepunch.com/gmod/spawnmenu.PopulateFromEngineTextFiles
230
+ */
231
+ PopulateFromEngineTextFiles(): void;
232
+ }
233
+
234
+ interface SpawnmenuLib {
235
+ /**
236
+ * **INTERNAL**: This is used internally - although you're able to use it you probably shouldn't.
237
+ *
238
+ * Loads spawnlists from text files. You probably are looking for [spawnmenu.AddPropCategory](https://wiki.facepunch.com/gmod/spawnmenu.AddPropCategory).
239
+ * @realm client
240
+ * @source https://wiki.facepunch.com/gmod/spawnmenu.PopulateFromTextFiles
241
+ */
242
+ PopulateFromTextFiles(callback: (strFilename: string, strName: string, tabContents: table, icon: string, id: number, parentid: number, needsapp: string) => void): void;
243
+ }
244
+
245
+ interface SpawnmenuLib {
246
+ /**
247
+ * **INTERNAL**: This is used internally - although you're able to use it you probably shouldn't.
248
+ *
249
+ *
250
+ * Saves a table of spawnlists to files.
251
+ *
252
+ * @realm client
253
+ * @source https://wiki.facepunch.com/gmod/spawnmenu.SaveToTextFiles
254
+ */
255
+ SaveToTextFiles(spawnlists: table): void;
256
+ }
257
+
258
+ interface SpawnmenuLib {
259
+ /**
260
+ * **INTERNAL**: This is used internally - although you're able to use it you probably shouldn't.
261
+ * Sets currently active control panel to be returned by [spawnmenu.ActiveControlPanel](https://wiki.facepunch.com/gmod/spawnmenu.ActiveControlPanel).
262
+ * @realm client
263
+ * @source https://wiki.facepunch.com/gmod/spawnmenu.SetActiveControlPanel
264
+ */
265
+ SetActiveControlPanel(pnl: Panel): void;
266
+ }
267
+
268
+ interface SpawnmenuLib {
269
+ /**
270
+ * Switches the creation tab (left side of the spawnmenu) on the spawnmenu to the given tab.
271
+ * @realm client
272
+ * @source https://wiki.facepunch.com/gmod/spawnmenu.SwitchCreationTab
273
+ */
274
+ SwitchCreationTab(id: string): void;
275
+ }
276
+
277
+ interface SpawnmenuLib {
278
+ /**
279
+ * Opens specified tool tab in spawnmenu.
280
+ *
281
+ * @realm client
282
+ * @source https://wiki.facepunch.com/gmod/spawnmenu.SwitchToolTab
283
+ */
284
+ SwitchToolTab(id: number): void;
285
+ }
286
+
@@ -0,0 +1,52 @@
1
+ // AUTO-GENERATED tlua declarations. Do not edit by hand.
2
+
3
+ /**
4
+ * The default SpawnmenuContentPanel
5
+ * **INTERNAL**: This is used internally - although you're able to use it you probably shouldn't.
6
+ *
7
+ *
8
+ * @realm client
9
+ * @source https://wiki.facepunch.com/gmod/SpawnmenuContentPanel
10
+ */
11
+ interface SpawnmenuContentPanel extends DPanel {}
12
+
13
+ interface SpawnmenuContentPanel {
14
+ /**
15
+ * Changes the Spawnmenu category to search in
16
+ *
17
+ * @realm client
18
+ * @source https://wiki.facepunch.com/gmod/SpawnmenuContentPanel:CallPopulateHook
19
+ */
20
+ CallPopulateHook(self: SpawnmenuContentPanel, hookname: string): void;
21
+ }
22
+
23
+ interface SpawnmenuContentPanel {
24
+ /**
25
+ * Allows the modification of the ContentSidebar
26
+ *
27
+ * @realm client
28
+ * @source https://wiki.facepunch.com/gmod/SpawnmenuContentPanel:EnableModify
29
+ */
30
+ EnableModify(self: SpawnmenuContentPanel): void;
31
+ }
32
+
33
+ interface SpawnmenuContentPanel {
34
+ /**
35
+ * Changes the Spawnmenu category to search in
36
+ *
37
+ * @realm client
38
+ * @source https://wiki.facepunch.com/gmod/SpawnmenuContentPanel:EnableSearch
39
+ */
40
+ EnableSearch(self: SpawnmenuContentPanel, category: string, hookname: string): void;
41
+ }
42
+
43
+ interface SpawnmenuContentPanel {
44
+ /**
45
+ * Switches the current panel with the given panel
46
+ *
47
+ * @realm client
48
+ * @source https://wiki.facepunch.com/gmod/SpawnmenuContentPanel:SwitchPanel
49
+ */
50
+ SwitchPanel(self: SpawnmenuContentPanel, panel: Panel): void;
51
+ }
52
+
package/sql.d.tlua ADDED
@@ -0,0 +1,154 @@
1
+ // AUTO-GENERATED tlua declarations. Do not edit by hand.
2
+
3
+ /**
4
+ * The SQL library allows you to access powerful database software included with Garry's Mod. It is the preferred and fastest method of storing large amounts of data. The database is located in sv.db serverside and cl.db clientside, both in the Garry's Mod base folder. SQL is a whole scripting language in itself although relatively simple, it's something you'll need to read up on before using this library.
5
+ *
6
+ *
7
+ * Example of using sql.
8
+ * ```
9
+ * -- Creating a table
10
+ * sql.Query("CREATE TABLE my_db_table( id NUMBER , name TEXT )" )
11
+ *
12
+ * -- Inserting a value to the table
13
+ * sql.Query("INSERT INTO my_db_table( id , name ) VALUES( 1 , 'First') ")
14
+ *
15
+ * -- Printing the tables data
16
+ * PrintTable( sql.Query("SELECT * FROM my_db_table ") )
17
+ *
18
+ * -- Deleting the table
19
+ * sql.Query("DROP TABLE my_db_table")
20
+ * ```
21
+ *
22
+ * Known GMod [SQLite](https://www.sqlite.org/compile.html) settings:
23
+ * * Temp files are stored in memory (`SQLITE_TEMP_STORE = 3`)
24
+ * * No `ATTACH` and `DETACH` operations (`SQLITE_OMIT_ATTACH = 1`)
25
+ * * No Virtual Tables (`SQLITE_OMIT_VIRTUALTABLE = 1`)
26
+ * * No `VACUUM` operation (`SQLITE_OMIT_VACUUM = 1`)
27
+ * * No `LIMIT` and `ORDER BY` clauses in `DELETE` and `UPDATE` statements (`SQLITE_ENABLE_UPDATE_DELETE_LIMIT`)
28
+ * @source https://wiki.facepunch.com/gmod/sql
29
+ */
30
+ declare sql: SqlLib;
31
+
32
+ interface SqlLib {
33
+ /**
34
+ * Tells the engine a set of queries is coming. Will wait until [sql.Commit](https://wiki.facepunch.com/gmod/sql.Commit) is called to run them.
35
+ * This is most useful when you run more than 100+ queries.
36
+ * This is equivalent to :
37
+ * ```
38
+ * sql.Query( "BEGIN;" )
39
+ * ```
40
+ *
41
+ * @realm shared and menu
42
+ * @source https://wiki.facepunch.com/gmod/sql.Begin
43
+ */
44
+ Begin(): void;
45
+ }
46
+
47
+ interface SqlLib {
48
+ /**
49
+ * Tells the engine to execute a series of queries queued for execution, must be preceded by [sql.Begin](https://wiki.facepunch.com/gmod/sql.Begin).
50
+ *
51
+ * This is equivalent to `sql.Query( "COMMIT;" )`.
52
+ *
53
+ * @realm shared and menu
54
+ * @source https://wiki.facepunch.com/gmod/sql.Commit
55
+ */
56
+ Commit(): void;
57
+ }
58
+
59
+ interface SqlLib {
60
+ /**
61
+ * Returns true if the index with the specified name exists.
62
+ * @realm shared and menu
63
+ * @source https://wiki.facepunch.com/gmod/sql.IndexExists
64
+ */
65
+ IndexExists(indexName: string): boolean;
66
+ }
67
+
68
+ interface SqlLib {
69
+ /**
70
+ * Returns the last error from a SQLite query.
71
+ * @realm shared and menu
72
+ * @source https://wiki.facepunch.com/gmod/sql.LastError
73
+ */
74
+ LastError(): string;
75
+ }
76
+
77
+ interface SqlLib {
78
+ /**
79
+ * Performs a query on the local SQLite database, returns a table as result set, nil if result is empty and false on error.
80
+ * **WARNING**: To run SQL queries with this function safely, it is crucial to ensure that the concatenated variables in the query string are safe to avoid vulnerabilities like SQL injections. For this, it is recommended to use the [sql.SQLStr](https://wiki.facepunch.com/gmod/sql.SQLStr), which allows arguments to be escaped correctly.
81
+ *
82
+ * It's best to just use [sql.QueryTyped](https://wiki.facepunch.com/gmod/sql.QueryTyped) instead if possible.
83
+ *
84
+ *
85
+ * @realm shared and menu
86
+ * @source https://wiki.facepunch.com/gmod/sql.Query
87
+ */
88
+ Query(query: string): table | boolean | nil;
89
+ }
90
+
91
+ interface SqlLib {
92
+ /**
93
+ * Performs the [sql.Query](https://wiki.facepunch.com/gmod/sql.Query) and returns the n'th row.
94
+ *
95
+ * This function is equivalent to safely returning
96
+ * ```lua
97
+ * sql.Query(query)[row]
98
+ * ```
99
+ *
100
+ * @realm shared and menu
101
+ * @source https://wiki.facepunch.com/gmod/sql.QueryRow
102
+ */
103
+ QueryRow(query: string, row?: number): table;
104
+ }
105
+
106
+ interface SqlLib {
107
+ /**
108
+ * Performs a query on the local SQLite database with proper type handling and parameter binding, returns a table as result set, empty table if no results, and false on error. Unlike [sql.Query](https://wiki.facepunch.com/gmod/sql.Query), this function properly handles SQLite data types and allows safe parameter binding to prevent SQL injection attacks.
109
+ * **WARNING**: * This function only executes a single SQL statement, unlike [sql.Query](https://wiki.facepunch.com/gmod/sql.Query) which can execute multiple statements separated by semicolons.
110
+ *
111
+ * * Large INTEGER values (beyond ±9,007,199,254,740,991) are returned as strings to preserve exact values. This is because Lua represents all numbers as doubles, which lose precision for integers larger than 2⁵³-1. Returning them as strings prevents data corruption from rounding errors.
112
+ *
113
+ *
114
+ *
115
+ *
116
+ * @realm shared and menu
117
+ * @source https://wiki.facepunch.com/gmod/sql.QueryTyped
118
+ */
119
+ QueryTyped(query: string, ...: any): table | boolean;
120
+ }
121
+
122
+ interface SqlLib {
123
+ /**
124
+ * Performs the query like [sql.QueryRow](https://wiki.facepunch.com/gmod/sql.QueryRow), but returns the first value found.
125
+ * @realm shared and menu
126
+ * @source https://wiki.facepunch.com/gmod/sql.QueryValue
127
+ */
128
+ QueryValue(query: string): string;
129
+ }
130
+
131
+ interface SqlLib {
132
+ /**
133
+ * Escapes dangerous characters and symbols from user input used in an SQLite SQL Query.
134
+ *
135
+ * If possible, it is recommended to use [sql.QueryTyped](https://wiki.facepunch.com/gmod/sql.QueryTyped) instead.
136
+ *
137
+ * **WARNING**: Do not use this function with external database engines such as `MySQL`. `MySQL` and `SQLite` use different escape sequences that are incompatible with each other! Escaping strings with inadequate functions is dangerous and will lead to SQL injection vulnerabilities.
138
+ *
139
+ *
140
+ * @realm shared and menu
141
+ * @source https://wiki.facepunch.com/gmod/sql.SQLStr
142
+ */
143
+ SQLStr(string: string, bNoQuotes?: boolean): string;
144
+ }
145
+
146
+ interface SqlLib {
147
+ /**
148
+ * Returns true if the table with the specified name exists.
149
+ * @realm shared and menu
150
+ * @source https://wiki.facepunch.com/gmod/sql.TableExists
151
+ */
152
+ TableExists(tableName: string): boolean;
153
+ }
154
+
package/stack.d.tlua ADDED
@@ -0,0 +1,57 @@
1
+ // AUTO-GENERATED tlua declarations. Do not edit by hand.
2
+
3
+ /**
4
+ * An object returned by [util.Stack](https://wiki.facepunch.com/gmod/util.Stack).
5
+ *
6
+ * Like a Lua table, a Stack is a container. It follows the principle of LIFO (last in, first out).
7
+ *
8
+ * The Stack works like a stack of papers: the first page you put down (push) will be the last one you remove (pop). That also means that the last page you put down, will be the first to be removed.
9
+ * @source https://wiki.facepunch.com/gmod/Stack
10
+ */
11
+ interface Stack {}
12
+
13
+ interface Stack {
14
+ /**
15
+ * Pop an item from the stack
16
+ * @realm shared and menu
17
+ * @source https://wiki.facepunch.com/gmod/Stack:Pop
18
+ */
19
+ Pop(self: Stack, amount?: number): any;
20
+ }
21
+
22
+ interface Stack {
23
+ /**
24
+ * Pop an item from the stack
25
+ * @realm shared and menu
26
+ * @source https://wiki.facepunch.com/gmod/Stack:PopMulti
27
+ */
28
+ PopMulti(self: Stack, amount?: number): table;
29
+ }
30
+
31
+ interface Stack {
32
+ /**
33
+ * Push an item onto the stack
34
+ * @realm shared and menu
35
+ * @source https://wiki.facepunch.com/gmod/Stack:Push
36
+ */
37
+ Push(self: Stack, object: any): void;
38
+ }
39
+
40
+ interface Stack {
41
+ /**
42
+ * Returns the size of the stack
43
+ * @realm shared and menu
44
+ * @source https://wiki.facepunch.com/gmod/Stack:Size
45
+ */
46
+ Size(self: Stack): number;
47
+ }
48
+
49
+ interface Stack {
50
+ /**
51
+ * Get the item at the top of the stack
52
+ * @realm shared and menu
53
+ * @source https://wiki.facepunch.com/gmod/Stack:Top
54
+ */
55
+ Top(self: Stack): any;
56
+ }
57
+