@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.
- package/README.md +28 -0
- package/__metadata.json +4 -0
- package/_globals.d.tlua +178 -0
- package/_gmod-std.d.tlua +35 -0
- package/achievementicon.d.tlua +12 -0
- package/achievements.d.tlua +162 -0
- package/ai.d.tlua +65 -0
- package/ai_schedule.d.tlua +17 -0
- package/ai_task.d.tlua +17 -0
- package/angle.d.tlua +197 -0
- package/avatarimage.d.tlua +10 -0
- package/awesomium.d.tlua +14 -0
- package/baseclass.d.tlua +42 -0
- package/bf_read.d.tlua +110 -0
- package/bit.d.tlua +121 -0
- package/button.d.tlua +13 -0
- package/cam.d.tlua +220 -0
- package/ceffectdata.d.tlua +337 -0
- package/chat.d.tlua +62 -0
- package/checkbutton.d.tlua +14 -0
- package/cleanup.d.tlua +88 -0
- package/cluaemitter.d.tlua +119 -0
- package/clualocomotion.d.tlua +383 -0
- package/cluaparticle.d.tlua +426 -0
- package/cmovedata.d.tlua +476 -0
- package/cnavarea.d.tlua +845 -0
- package/cnavladder.d.tlua +209 -0
- package/cnewparticleeffect.d.tlua +259 -0
- package/color.d.tlua +339 -0
- package/concommand.d.tlua +69 -0
- package/constraint.d.tlua +311 -0
- package/construct.d.tlua +26 -0
- package/contentheader.d.tlua +32 -0
- package/contenticon.d.tlua +86 -0
- package/contentsidebar.d.tlua +45 -0
- package/contentsidebartoolbox.d.tlua +13 -0
- package/contextbase.d.tlua +37 -0
- package/controlpanel.d.tlua +140 -0
- package/controlpresets.d.tlua +118 -0
- package/convar.d.tlua +162 -0
- package/cookie.d.tlua +60 -0
- package/coroutine.d.tlua +90 -0
- package/crecipientfilter.d.tlua +152 -0
- package/csent.d.tlua +10 -0
- package/csoundpatch.d.tlua +150 -0
- package/ctakedamageinfo.d.tlua +366 -0
- package/ctrllistbox.d.tlua +12 -0
- package/ctrlnumpad.d.tlua +73 -0
- package/cusercmd.d.tlua +320 -0
- package/custom_classes.d.tlua +65 -0
- package/custom_entity_fields.d.tlua +96 -0
- package/cvars.d.tlua +80 -0
- package/dadjustablemodelpanel.d.tlua +81 -0
- package/dalphabar.d.tlua +27 -0
- package/dbinder.d.tlua +37 -0
- package/dbubblecontainer.d.tlua +18 -0
- package/dbutton.d.tlua +88 -0
- package/dcategoryheader.d.tlua +13 -0
- package/dcategorylist.d.tlua +11 -0
- package/dcheckbox.d.tlua +46 -0
- package/dcheckboxlabel.d.tlua +90 -0
- package/dcollapsiblecategory.d.tlua +240 -0
- package/dcolorbutton.d.tlua +73 -0
- package/dcolorcombo.d.tlua +54 -0
- package/dcolorcube.d.tlua +137 -0
- package/dcolormixer.d.tlua +303 -0
- package/dcolorpalette.d.tlua +294 -0
- package/dcolumnsheet.d.tlua +49 -0
- package/dcombobox.d.tlua +161 -0
- package/ddragbase.d.tlua +151 -0
- package/ddrawer.d.tlua +72 -0
- package/debug.d.tlua +236 -0
- package/debugoverlay.d.tlua +193 -0
- package/dentityproperties.d.tlua +63 -0
- package/derma.d.tlua +119 -0
- package/dexpandbutton.d.tlua +30 -0
- package/dfilebrowser.d.tlua +228 -0
- package/dform.d.tlua +176 -0
- package/dframe.d.tlua +261 -0
- package/dgrid.d.tlua +113 -0
- package/dhorizontaldivider.d.tlua +196 -0
- package/dhorizontalscroller.d.tlua +104 -0
- package/dhscrollbar.d.tlua +109 -0
- package/dhtml.d.tlua +91 -0
- package/dhtmlcontrols.d.tlua +62 -0
- package/diconbrowser.d.tlua +113 -0
- package/diconlayout.d.tlua +190 -0
- package/dimage.d.tlua +221 -0
- package/dimagebutton.d.tlua +103 -0
- package/dkillicon.d.tlua +9 -0
- package/dlabel.d.tlua +385 -0
- package/dlabeleditable.d.tlua +51 -0
- package/dlabelurl.d.tlua +100 -0
- package/dlistbox.d.tlua +82 -0
- package/dlistboxitem.d.tlua +42 -0
- package/dlistlayout.d.tlua +14 -0
- package/dlistview.d.tlua +360 -0
- package/dlistview_column.d.tlua +135 -0
- package/dlistview_columnplain.d.tlua +11 -0
- package/dlistview_draggerbar.d.tlua +11 -0
- package/dlistview_line.d.tlua +140 -0
- package/dlistviewheaderlabel.d.tlua +11 -0
- package/dlistviewlabel.d.tlua +11 -0
- package/dlistviewline.d.tlua +11 -0
- package/dmenu.d.tlua +266 -0
- package/dmenubar.d.tlua +42 -0
- package/dmenuoption.d.tlua +135 -0
- package/dmenuoptioncvar.d.tlua +64 -0
- package/dmodelpanel.d.tlua +207 -0
- package/dmodelselect.d.tlua +20 -0
- package/dmodelselectmulti.d.tlua +19 -0
- package/dnotify.d.tlua +93 -0
- package/dnumberscratch.d.tlua +284 -0
- package/dnumberwang.d.tlua +147 -0
- package/dnumpad.d.tlua +11 -0
- package/dnumslider.d.tlua +182 -0
- package/dpanel.d.tlua +152 -0
- package/dpanellist.d.tlua +109 -0
- package/dpaneloverlay.d.tlua +65 -0
- package/dpanelselect.d.tlua +13 -0
- package/dpanpanel.d.tlua +64 -0
- package/dprogress.d.tlua +27 -0
- package/dproperties.d.tlua +52 -0
- package/dproperty_boolean.d.tlua +12 -0
- package/dproperty_combo.d.tlua +31 -0
- package/dproperty_entity.d.tlua +12 -0
- package/dproperty_float.d.tlua +12 -0
- package/dproperty_generic.d.tlua +50 -0
- package/dproperty_int.d.tlua +12 -0
- package/dproperty_vectorcolor.d.tlua +14 -0
- package/dpropertysheet.d.tlua +167 -0
- package/dragndrop.d.tlua +123 -0
- package/draw.d.tlua +162 -0
- package/drgbpicker.d.tlua +49 -0
- package/drive.d.tlua +159 -0
- package/dscrollbargrip.d.tlua +13 -0
- package/dscrollpanel.d.tlua +110 -0
- package/dshape.d.tlua +72 -0
- package/dsizetocontents.d.tlua +46 -0
- package/dslider.d.tlua +302 -0
- package/dsprite.d.tlua +84 -0
- package/dtab.d.tlua +81 -0
- package/dtextentry.d.tlua +442 -0
- package/dtilelayout.d.tlua +218 -0
- package/dtooltip.d.tlua +76 -0
- package/dtree.d.tlua +185 -0
- package/dtree_node.d.tlua +793 -0
- package/dtree_node_button.d.tlua +13 -0
- package/duplicator.d.tlua +338 -0
- package/dverticaldivider.d.tlua +223 -0
- package/dvscrollbar.d.tlua +109 -0
- package/editablepanel.d.tlua +10 -0
- package/effect.d.tlua +121 -0
- package/effects.d.tlua +77 -0
- package/engine.d.tlua +248 -0
- package/entity.d.tlua +8295 -0
- package/ents.d.tlua +267 -0
- package/enums.d.tlua +7082 -0
- package/file.d.tlua +419 -0
- package/file_class.d.tlua +7 -0
- package/fingerposer.d.tlua +12 -0
- package/fingervar.d.tlua +13 -0
- package/frame.d.tlua +11 -0
- package/frame_blend.d.tlua +105 -0
- package/game.d.tlua +482 -0
- package/gameevent.d.tlua +968 -0
- package/gamemode.d.tlua +48 -0
- package/global.d.tlua +3156 -0
- package/gm.d.tlua +3218 -0
- package/gmod.d.tlua +20 -0
- package/gmsave.d.tlua +53 -0
- package/gui.d.tlua +232 -0
- package/gwen.d.tlua +55 -0
- package/halo.d.tlua +42 -0
- package/hammer.d.tlua +17 -0
- package/hook.d.tlua +64 -0
- package/html.d.tlua +22 -0
- package/http.d.tlua +72 -0
- package/iconeditor.d.tlua +130 -0
- package/igmodaudiochannel.d.tlua +419 -0
- package/imagecheckbox.d.tlua +48 -0
- package/imaterial.d.tlua +288 -0
- package/imesh.d.tlua +70 -0
- package/index.d.tlua +277 -0
- package/input.d.tlua +252 -0
- package/invalidateinternalentitycache.d.tlua +13 -0
- package/irestore.d.tlua +94 -0
- package/isave.d.tlua +94 -0
- package/itexture.d.tlua +108 -0
- package/ivideowriter.d.tlua +53 -0
- package/jit.d.tlua +243 -0
- package/killicon.d.tlua +84 -0
- package/label.d.tlua +20 -0
- package/language.d.tlua +26 -0
- package/list.d.tlua +112 -0
- package/makeballoon.d.tlua +15 -0
- package/markup.d.tlua +38 -0
- package/markupobject.d.tlua +53 -0
- package/material.d.tlua +9 -0
- package/math.d.tlua +899 -0
- package/matproxy.d.tlua +60 -0
- package/matselect.d.tlua +106 -0
- package/menu.d.tlua +20 -0
- package/menubar.d.tlua +39 -0
- package/mesh.d.tlua +183 -0
- package/modelimage.d.tlua +12 -0
- package/motionsensor.d.tlua +115 -0
- package/navmesh.d.tlua +274 -0
- package/net.d.tlua +639 -0
- package/nextbot.d.tlua +380 -0
- package/notification.d.tlua +35 -0
- package/npc.d.tlua +1787 -0
- package/numpad.d.tlua +89 -0
- package/os.d.tlua +56 -0
- package/package.d.tlua +15 -0
- package/package.json +18 -0
- package/panel.d.tlua +3650 -0
- package/panellist.d.tlua +13 -0
- package/pathfollower.d.tlua +301 -0
- package/permissions.d.tlua +77 -0
- package/physcollide.d.tlua +40 -0
- package/physenv.d.tlua +136 -0
- package/physobj.d.tlua +799 -0
- package/pixelvis_handle_t.d.tlua +9 -0
- package/player.d.tlua +3320 -0
- package/player_manager.d.tlua +147 -0
- package/preseteditor.d.tlua +13 -0
- package/presets.d.tlua +79 -0
- package/projectedtexture.d.tlua +553 -0
- package/properties.d.tlua +65 -0
- package/propselect.d.tlua +50 -0
- package/radiobutton.d.tlua +13 -0
- package/render.d.tlua +1700 -0
- package/resource.d.tlua +73 -0
- package/richtext.d.tlua +17 -0
- package/sandbox.d.tlua +576 -0
- package/saverestore.d.tlua +148 -0
- package/schedule.d.tlua +69 -0
- package/scripted_ents.d.tlua +124 -0
- package/search.d.tlua +26 -0
- package/serverlist.d.tlua +85 -0
- package/slidebar.d.tlua +12 -0
- package/slider.d.tlua +11 -0
- package/sound.d.tlua +140 -0
- package/spawnicon.d.tlua +95 -0
- package/spawnmenu.d.tlua +286 -0
- package/spawnmenucontentpanel.d.tlua +52 -0
- package/sql.d.tlua +154 -0
- package/stack.d.tlua +57 -0
- package/steamworks.d.tlua +208 -0
- package/string.d.tlua +535 -0
- package/structures.d.tlua +4442 -0
- package/surface.d.tlua +463 -0
- package/surfaceinfo.d.tlua +70 -0
- package/system.d.tlua +134 -0
- package/table.d.tlua +533 -0
- package/task.d.tlua +92 -0
- package/team.d.tlua +195 -0
- package/textentry.d.tlua +12 -0
- package/tgaimage.d.tlua +11 -0
- package/timer.d.tlua +198 -0
- package/tool.d.tlua +466 -0
- package/ugcpublishwindow.d.tlua +83 -0
- package/umsg.d.tlua +147 -0
- package/undo.d.tlua +122 -0
- package/urllabel.d.tlua +13 -0
- package/usermessage.d.tlua +48 -0
- package/utf8.d.tlua +89 -0
- package/util.d.tlua +1087 -0
- package/vector.d.tlua +413 -0
- package/vehicle.d.tlua +472 -0
- package/vgui.d.tlua +201 -0
- package/video.d.tlua +17 -0
- package/vmatrix.d.tlua +392 -0
- package/weapon.d.tlua +913 -0
- package/weapons.d.tlua +90 -0
- package/widgets.d.tlua +29 -0
- package/workshopfilebase.d.tlua +68 -0
package/spawnicon.d.tlua
ADDED
|
@@ -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
|
+
|
package/spawnmenu.d.tlua
ADDED
|
@@ -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
|
+
|