@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
|
@@ -0,0 +1,140 @@
|
|
|
1
|
+
// AUTO-GENERATED tlua declarations. Do not edit by hand.
|
|
2
|
+
|
|
3
|
+
/** Used by the context menu in sandbox. */
|
|
4
|
+
interface ControlPanel extends DForm {
|
|
5
|
+
/**
|
|
6
|
+
* Adds a DLabel to the ControlPanel as a helper text. Functionally
|
|
7
|
+
* equivalent to DForm:Help.
|
|
8
|
+
* @realm client
|
|
9
|
+
*/
|
|
10
|
+
Label(self: ControlPanel, text: string): DLabel;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* The controlpanel library.
|
|
15
|
+
* @source https://wiki.facepunch.com/gmod/controlpanel(library)
|
|
16
|
+
*/
|
|
17
|
+
declare controlpanel: ControlpanelLib;
|
|
18
|
+
|
|
19
|
+
interface ControlPanel {
|
|
20
|
+
/**
|
|
21
|
+
* Adds a control to the control panel.
|
|
22
|
+
* @realm client
|
|
23
|
+
* @deprecated It is recommended to use DForm's members instead.
|
|
24
|
+
* @source https://wiki.facepunch.com/gmod/ControlPanel:AddControl
|
|
25
|
+
*/
|
|
26
|
+
AddControl(self: ControlPanel, type: "color", controlinfo: table): CtrlColor;
|
|
27
|
+
/**
|
|
28
|
+
* Adds a control to the control panel.
|
|
29
|
+
* @realm client
|
|
30
|
+
* @deprecated It is recommended to use DForm's members instead.
|
|
31
|
+
* @source https://wiki.facepunch.com/gmod/ControlPanel:AddControl
|
|
32
|
+
*/
|
|
33
|
+
AddControl(self: ControlPanel, type: string, controlinfo: table): Panel;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
interface ControlPanel {
|
|
38
|
+
/**
|
|
39
|
+
* Adds an item by calling [DForm:AddItem](https://wiki.facepunch.com/gmod/DForm:AddItem).
|
|
40
|
+
* @realm client
|
|
41
|
+
* @source https://wiki.facepunch.com/gmod/ControlPanel:AddPanel
|
|
42
|
+
*/
|
|
43
|
+
AddPanel(self: ControlPanel, panel: Panel): void;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
interface ControlPanel {
|
|
47
|
+
/**
|
|
48
|
+
* Alias of [Panel:Clear](https://wiki.facepunch.com/gmod/Panel:Clear).
|
|
49
|
+
* @realm client
|
|
50
|
+
* @source https://wiki.facepunch.com/gmod/ControlPanel:ClearControls
|
|
51
|
+
*/
|
|
52
|
+
ClearControls(self: ControlPanel): void;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
interface ControlPanel {
|
|
56
|
+
/**
|
|
57
|
+
* Creates a [CtrlColor](https://wiki.facepunch.com/gmod/CtrlColor) (a color picker) panel and adds it as an [item](https://wiki.facepunch.com/gmod/ControlPanel:AddPanel).
|
|
58
|
+
* @realm client
|
|
59
|
+
* @source https://wiki.facepunch.com/gmod/ControlPanel:ColorPicker
|
|
60
|
+
*/
|
|
61
|
+
ColorPicker(self: ControlPanel, label: string, convarR: string, convarG: string, convarB: string, convarA?: string): Panel;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
interface ControlPanel {
|
|
65
|
+
/**
|
|
66
|
+
* Sets control values of the control panel.
|
|
67
|
+
* @realm client
|
|
68
|
+
* @source https://wiki.facepunch.com/gmod/ControlPanel:ControlValues
|
|
69
|
+
*/
|
|
70
|
+
ControlValues(self: ControlPanel, data: table): void;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
interface ControlPanel {
|
|
74
|
+
/**
|
|
75
|
+
* Calls the given function with this panel as the only argument. Used by the spawnmenu to populate the control panel.
|
|
76
|
+
*
|
|
77
|
+
*
|
|
78
|
+
*
|
|
79
|
+
* @realm client
|
|
80
|
+
* @source https://wiki.facepunch.com/gmod/ControlPanel:FillViaFunction
|
|
81
|
+
* @deprecated This is dumb. Just call the builder function directly.
|
|
82
|
+
*/
|
|
83
|
+
FillViaFunction(self: ControlPanel, func: (panelToPopulate: ControlPanel) => void): void;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
interface ControlPanel {
|
|
87
|
+
/**
|
|
88
|
+
* Returns this control panel.
|
|
89
|
+
* @realm client
|
|
90
|
+
* @source https://wiki.facepunch.com/gmod/ControlPanel:GetEmbeddedPanel
|
|
91
|
+
*/
|
|
92
|
+
GetEmbeddedPanel(self: ControlPanel): ControlPanel;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
interface ControlPanel {
|
|
96
|
+
/**
|
|
97
|
+
* Creates a CtrlNumPad (a Sandbox key binder) panel and adds it as an [item](https://wiki.facepunch.com/gmod/ControlPanel:AddPanel).
|
|
98
|
+
* @realm client
|
|
99
|
+
* @source https://wiki.facepunch.com/gmod/ControlPanel:KeyBinder
|
|
100
|
+
*/
|
|
101
|
+
KeyBinder(self: ControlPanel, label1: string, convar1: string, label2?: string, convar2?: string): Panel;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
interface ControlPanel {
|
|
105
|
+
/**
|
|
106
|
+
* Creates a [MatSelect](https://wiki.facepunch.com/gmod/MatSelect) panel and adds it as an [item](https://wiki.facepunch.com/gmod/ControlPanel:AddPanel).
|
|
107
|
+
* @realm client
|
|
108
|
+
* @source https://wiki.facepunch.com/gmod/ControlPanel:MatSelect
|
|
109
|
+
*/
|
|
110
|
+
MatSelect(self: ControlPanel, convar: string, options?: table, autostretch?: boolean, width?: number, height?: number): MatSelect;
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
interface ControlPanel {
|
|
114
|
+
/**
|
|
115
|
+
* Creates a [ControlPresets](https://wiki.facepunch.com/gmod/ControlPresets) panel and adds it as an [item](https://wiki.facepunch.com/gmod/ControlPanel:AddPanel).
|
|
116
|
+
* @realm client
|
|
117
|
+
* @source https://wiki.facepunch.com/gmod/ControlPanel:ToolPresets
|
|
118
|
+
*/
|
|
119
|
+
ToolPresets(self: ControlPanel, group: string, cvarList: table): Panel;
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
interface ControlpanelLib {
|
|
123
|
+
/**
|
|
124
|
+
* Clears ALL the control panels ( for tools ).
|
|
125
|
+
* @realm client
|
|
126
|
+
* @source https://wiki.facepunch.com/gmod/controlpanel.Clear
|
|
127
|
+
*/
|
|
128
|
+
Clear(): void;
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
interface ControlpanelLib {
|
|
132
|
+
/**
|
|
133
|
+
* Returns (or creates if not exists) a control panel.
|
|
134
|
+
* @realm client
|
|
135
|
+
* @source https://wiki.facepunch.com/gmod/controlpanel.Get
|
|
136
|
+
*/
|
|
137
|
+
Get(name: string): ControlPanel;
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
// AUTO-GENERATED tlua declarations. Do not edit by hand.
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* A preset manager, found at the top of almost every default tool's C-menu.
|
|
5
|
+
*
|
|
6
|
+
* This control only exists in Sandbox derived gamemodes.
|
|
7
|
+
*
|
|
8
|
+
* @realm client
|
|
9
|
+
* @source https://wiki.facepunch.com/gmod/ControlPresets
|
|
10
|
+
*/
|
|
11
|
+
interface ControlPresets extends Panel {}
|
|
12
|
+
|
|
13
|
+
interface ControlPresets {
|
|
14
|
+
/**
|
|
15
|
+
* Adds a convar to be managed by this control.
|
|
16
|
+
* @realm client
|
|
17
|
+
* @source https://wiki.facepunch.com/gmod/ControlPresets:AddConVar
|
|
18
|
+
*/
|
|
19
|
+
AddConVar(self: ControlPresets, convar: string): void;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
interface ControlPresets {
|
|
23
|
+
/**
|
|
24
|
+
* Adds option to the [DComboBox](https://wiki.facepunch.com/gmod/DComboBox) subelement with [DComboBox:AddChoice](https://wiki.facepunch.com/gmod/DComboBox:AddChoice) then adds it to the `options` subtable
|
|
25
|
+
* @realm client
|
|
26
|
+
* @source https://wiki.facepunch.com/gmod/ControlPresets:AddOption
|
|
27
|
+
*/
|
|
28
|
+
AddOption(self: ControlPresets, strName: string, data: any): void;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
interface ControlPresets {
|
|
32
|
+
/**
|
|
33
|
+
* Get a list of all Console Variables being managed by this panel.
|
|
34
|
+
* @realm client
|
|
35
|
+
* @source https://wiki.facepunch.com/gmod/ControlPresets:GetConVars
|
|
36
|
+
*/
|
|
37
|
+
GetConVars(self: ControlPresets): table;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
interface ControlPresets {
|
|
41
|
+
/**
|
|
42
|
+
* Checks if Data is valid then uses [Global.pairs](https://wiki.facepunch.com/gmod/Global.pairs) to iterate over the data parameter and run each entry using [Global.RunConsoleCommand](https://wiki.facepunch.com/gmod/Global.RunConsoleCommand)
|
|
43
|
+
* Index and Value parameters appear to not be used. Further testing should be done to confirm
|
|
44
|
+
*
|
|
45
|
+
* @realm client
|
|
46
|
+
* @source https://wiki.facepunch.com/gmod/ControlPresets:OnSelect
|
|
47
|
+
*/
|
|
48
|
+
OnSelect(self: ControlPresets, index: number, value: any, data: table): void;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
interface ControlPresets {
|
|
52
|
+
/**
|
|
53
|
+
* Creates and opens [PresetEditor](https://wiki.facepunch.com/gmod/PresetEditor)
|
|
54
|
+
* @realm client
|
|
55
|
+
* @source https://wiki.facepunch.com/gmod/ControlPresets:OpenPresetEditor
|
|
56
|
+
*/
|
|
57
|
+
OpenPresetEditor(self: ControlPresets): void;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
interface ControlPresets {
|
|
61
|
+
/**
|
|
62
|
+
* @realm client
|
|
63
|
+
* @source https://wiki.facepunch.com/gmod/ControlPresets:QuickSaveInternal
|
|
64
|
+
*/
|
|
65
|
+
QuickSaveInternal(self: ControlPresets, text: string): void;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
interface ControlPresets {
|
|
69
|
+
/**
|
|
70
|
+
* @realm client
|
|
71
|
+
* @source https://wiki.facepunch.com/gmod/ControlPresets:QuickSavePreset
|
|
72
|
+
*/
|
|
73
|
+
QuickSavePreset(self: ControlPresets): void;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
interface ControlPresets {
|
|
77
|
+
/**
|
|
78
|
+
* @realm client
|
|
79
|
+
* @source https://wiki.facepunch.com/gmod/ControlPresets:ReloadPresets
|
|
80
|
+
*/
|
|
81
|
+
ReloadPresets(self: ControlPresets): void;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
interface ControlPresets {
|
|
85
|
+
/**
|
|
86
|
+
* Set the name label text.
|
|
87
|
+
* @realm client
|
|
88
|
+
* @source https://wiki.facepunch.com/gmod/ControlPresets:SetLabel
|
|
89
|
+
*/
|
|
90
|
+
SetLabel(self: ControlPresets, name: string): void;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
interface ControlPresets {
|
|
94
|
+
/**
|
|
95
|
+
* Uses [table.Merge](https://wiki.facepunch.com/gmod/table.Merge) to combine the provided table into the `Options` subtable
|
|
96
|
+
* @realm client
|
|
97
|
+
* @source https://wiki.facepunch.com/gmod/ControlPresets:SetOptions
|
|
98
|
+
*/
|
|
99
|
+
SetOptions(self: ControlPresets, Options: table): void;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
interface ControlPresets {
|
|
103
|
+
/**
|
|
104
|
+
* @realm client
|
|
105
|
+
* @source https://wiki.facepunch.com/gmod/ControlPresets:SetPreset
|
|
106
|
+
*/
|
|
107
|
+
SetPreset(self: ControlPresets, strName: string): void;
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
interface ControlPresets {
|
|
111
|
+
/**
|
|
112
|
+
* Alias of [ControlPresets:ReloadPresets](https://wiki.facepunch.com/gmod/ControlPresets:ReloadPresets)
|
|
113
|
+
* @realm client
|
|
114
|
+
* @source https://wiki.facepunch.com/gmod/ControlPresets:Update
|
|
115
|
+
*/
|
|
116
|
+
Update(self: ControlPresets): void;
|
|
117
|
+
}
|
|
118
|
+
|
package/convar.d.tlua
ADDED
|
@@ -0,0 +1,162 @@
|
|
|
1
|
+
// AUTO-GENERATED tlua declarations. Do not edit by hand.
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* An object returned by [Global.CreateConVar](https://wiki.facepunch.com/gmod/Global.CreateConVar), [Global.CreateClientConVar](https://wiki.facepunch.com/gmod/Global.CreateClientConVar) (which uses [Global.CreateConVar](https://wiki.facepunch.com/gmod/Global.CreateConVar) internally), and [Global.GetConVar](https://wiki.facepunch.com/gmod/Global.GetConVar).
|
|
5
|
+
*
|
|
6
|
+
* It represents a console variable. See [this](https://wiki.facepunch.com/gmod/ConVars) page for more information.
|
|
7
|
+
* @source https://wiki.facepunch.com/gmod/ConVar
|
|
8
|
+
*/
|
|
9
|
+
interface ConVar {}
|
|
10
|
+
|
|
11
|
+
interface ConVar {
|
|
12
|
+
/**
|
|
13
|
+
* Tries to convert the current string value of a [ConVar](https://wiki.facepunch.com/gmod/ConVar) to a boolean.
|
|
14
|
+
* @realm shared and menu
|
|
15
|
+
* @source https://wiki.facepunch.com/gmod/ConVar:GetBool
|
|
16
|
+
*/
|
|
17
|
+
GetBool(self: ConVar): boolean;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
interface ConVar {
|
|
21
|
+
/**
|
|
22
|
+
* Returns the default value of the [ConVar](https://wiki.facepunch.com/gmod/ConVar)
|
|
23
|
+
* @realm shared and menu
|
|
24
|
+
* @source https://wiki.facepunch.com/gmod/ConVar:GetDefault
|
|
25
|
+
*/
|
|
26
|
+
GetDefault(self: ConVar): string;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
interface ConVar {
|
|
30
|
+
/**
|
|
31
|
+
* Returns the [Enums/FCVAR](https://wiki.facepunch.com/gmod/Enums/FCVAR) flags of the ConVar
|
|
32
|
+
* @realm shared and menu
|
|
33
|
+
* @source https://wiki.facepunch.com/gmod/ConVar:GetFlags
|
|
34
|
+
*/
|
|
35
|
+
GetFlags(self: ConVar): number;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
interface ConVar {
|
|
39
|
+
/**
|
|
40
|
+
* Attempts to convert the [ConVar](https://wiki.facepunch.com/gmod/ConVar) value to a float
|
|
41
|
+
* @realm shared and menu
|
|
42
|
+
* @source https://wiki.facepunch.com/gmod/ConVar:GetFloat
|
|
43
|
+
*/
|
|
44
|
+
GetFloat(self: ConVar): number;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
interface ConVar {
|
|
48
|
+
/**
|
|
49
|
+
* Returns the help text assigned to that convar.
|
|
50
|
+
* @realm shared and menu
|
|
51
|
+
* @source https://wiki.facepunch.com/gmod/ConVar:GetHelpText
|
|
52
|
+
*/
|
|
53
|
+
GetHelpText(self: ConVar): string;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
interface ConVar {
|
|
57
|
+
/**
|
|
58
|
+
* Attempts to convert the [ConVar](https://wiki.facepunch.com/gmod/ConVar) value to a integer.
|
|
59
|
+
* @realm shared and menu
|
|
60
|
+
* @source https://wiki.facepunch.com/gmod/ConVar:GetInt
|
|
61
|
+
*/
|
|
62
|
+
GetInt(self: ConVar): number;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
interface ConVar {
|
|
66
|
+
/**
|
|
67
|
+
* Returns the maximum value of the [ConVar](https://wiki.facepunch.com/gmod/ConVar)
|
|
68
|
+
* @realm shared and menu
|
|
69
|
+
* @source https://wiki.facepunch.com/gmod/ConVar:GetMax
|
|
70
|
+
*/
|
|
71
|
+
GetMax(self: ConVar): number;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
interface ConVar {
|
|
75
|
+
/**
|
|
76
|
+
* Returns the minimum value of the [ConVar](https://wiki.facepunch.com/gmod/ConVar)
|
|
77
|
+
* @realm shared and menu
|
|
78
|
+
* @source https://wiki.facepunch.com/gmod/ConVar:GetMin
|
|
79
|
+
*/
|
|
80
|
+
GetMin(self: ConVar): number;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
interface ConVar {
|
|
84
|
+
/**
|
|
85
|
+
* Returns the name of the [ConVar](https://wiki.facepunch.com/gmod/ConVar).
|
|
86
|
+
* @realm shared and menu
|
|
87
|
+
* @source https://wiki.facepunch.com/gmod/ConVar:GetName
|
|
88
|
+
*/
|
|
89
|
+
GetName(self: ConVar): string;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
interface ConVar {
|
|
93
|
+
/**
|
|
94
|
+
* Returns the current [ConVar](https://wiki.facepunch.com/gmod/ConVar) value as a string.
|
|
95
|
+
* @realm shared and menu
|
|
96
|
+
* @source https://wiki.facepunch.com/gmod/ConVar:GetString
|
|
97
|
+
*/
|
|
98
|
+
GetString(self: ConVar): string;
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
interface ConVar {
|
|
102
|
+
/**
|
|
103
|
+
* Returns whether the specified flag is set on the [ConVar](https://wiki.facepunch.com/gmod/ConVar)
|
|
104
|
+
* @realm shared and menu
|
|
105
|
+
* @source https://wiki.facepunch.com/gmod/ConVar:IsFlagSet
|
|
106
|
+
*/
|
|
107
|
+
IsFlagSet(self: ConVar, flag: number): boolean;
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
interface ConVar {
|
|
111
|
+
/**
|
|
112
|
+
* Reverts [ConVar](https://wiki.facepunch.com/gmod/ConVar) to its default value
|
|
113
|
+
*
|
|
114
|
+
* **NOTE**: This can only be ran on ConVars created from within Lua.
|
|
115
|
+
*
|
|
116
|
+
* @realm shared and menu
|
|
117
|
+
* @source https://wiki.facepunch.com/gmod/ConVar:Revert
|
|
118
|
+
*/
|
|
119
|
+
Revert(self: ConVar): void;
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
interface ConVar {
|
|
123
|
+
/**
|
|
124
|
+
* Sets a ConVar's value to 1 or 0 based on the input boolean. This can only be ran on ConVars created from within Lua.
|
|
125
|
+
* @realm shared and menu
|
|
126
|
+
* @source https://wiki.facepunch.com/gmod/ConVar:SetBool
|
|
127
|
+
*/
|
|
128
|
+
SetBool(self: ConVar, value: boolean): void;
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
interface ConVar {
|
|
132
|
+
/**
|
|
133
|
+
* Sets a ConVar's value to the input number.
|
|
134
|
+
* **NOTE**: This can only be ran on ConVars created from within Lua.
|
|
135
|
+
*
|
|
136
|
+
* @realm shared and menu
|
|
137
|
+
* @source https://wiki.facepunch.com/gmod/ConVar:SetFloat
|
|
138
|
+
*/
|
|
139
|
+
SetFloat(self: ConVar, value: number): void;
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
interface ConVar {
|
|
143
|
+
/**
|
|
144
|
+
* Sets a ConVar's value to the input number after converting it to an integer.
|
|
145
|
+
*
|
|
146
|
+
* **NOTE**: This can only be ran on ConVars created from within Lua.
|
|
147
|
+
*
|
|
148
|
+
* @realm shared and menu
|
|
149
|
+
* @source https://wiki.facepunch.com/gmod/ConVar:SetInt
|
|
150
|
+
*/
|
|
151
|
+
SetInt(self: ConVar, value: number): void;
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
interface ConVar {
|
|
155
|
+
/**
|
|
156
|
+
* Sets a ConVar's value to the input string. This can only be ran on ConVars created from within Lua.
|
|
157
|
+
* @realm shared and menu
|
|
158
|
+
* @source https://wiki.facepunch.com/gmod/ConVar:SetString
|
|
159
|
+
*/
|
|
160
|
+
SetString(self: ConVar, value: string): void;
|
|
161
|
+
}
|
|
162
|
+
|
package/cookie.d.tlua
ADDED
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
// AUTO-GENERATED tlua declarations. Do not edit by hand.
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Functions to persist data on a user's computer.
|
|
5
|
+
*
|
|
6
|
+
* The data will be read / written to / from a database
|
|
7
|
+
* corresponding to the realm the library was used in.
|
|
8
|
+
*
|
|
9
|
+
* | Realm | Database File |
|
|
10
|
+
* |:-----:|:-----|
|
|
11
|
+
* | [Server](https://wiki.facepunch.com/gmod//gmod/States#server) | `garrysmod/sv.db`
|
|
12
|
+
* | [Client](https://wiki.facepunch.com/gmod//gmod/States#client) | `garrysmod/cl.db`
|
|
13
|
+
* | [Menu](https://wiki.facepunch.com/gmod//gmod/States#menu) | `garrysmod/mn.db`
|
|
14
|
+
*
|
|
15
|
+
* @source https://wiki.facepunch.com/gmod/cookie
|
|
16
|
+
*/
|
|
17
|
+
declare cookie: CookieLib;
|
|
18
|
+
|
|
19
|
+
interface CookieLib {
|
|
20
|
+
/**
|
|
21
|
+
* Removes any cookie with the given name.
|
|
22
|
+
*
|
|
23
|
+
* Does nothing if the cookie doesn't exist.
|
|
24
|
+
*
|
|
25
|
+
*
|
|
26
|
+
* @realm shared and menu
|
|
27
|
+
* @source https://wiki.facepunch.com/gmod/cookie.Delete
|
|
28
|
+
*/
|
|
29
|
+
Delete(key: string): void;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
interface CookieLib {
|
|
33
|
+
/**
|
|
34
|
+
* Gets the value of a cookie on the client as a number.
|
|
35
|
+
* @realm shared and menu
|
|
36
|
+
* @source https://wiki.facepunch.com/gmod/cookie.GetNumber
|
|
37
|
+
*/
|
|
38
|
+
GetNumber(name: string, _default?: any): number;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
interface CookieLib {
|
|
42
|
+
/**
|
|
43
|
+
* Gets the value of a cookie on the client as a string.
|
|
44
|
+
* @realm shared and menu
|
|
45
|
+
* @source https://wiki.facepunch.com/gmod/cookie.GetString
|
|
46
|
+
*/
|
|
47
|
+
GetString(name: string, _default?: any): string;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
interface CookieLib {
|
|
51
|
+
/**
|
|
52
|
+
* Creates / updates a cookie in the [Database](https://wiki.facepunch.com/gmod/cookie).
|
|
53
|
+
*
|
|
54
|
+
*
|
|
55
|
+
* @realm shared and menu
|
|
56
|
+
* @source https://wiki.facepunch.com/gmod/cookie.Set
|
|
57
|
+
*/
|
|
58
|
+
Set(key: string, value: string): void;
|
|
59
|
+
}
|
|
60
|
+
|
package/coroutine.d.tlua
ADDED
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
// AUTO-GENERATED tlua declarations. Do not edit by hand.
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Coroutines are similar to threads, however they do not run simultaneously. They offer a way to split up tasks and dynamically pause & resume functions.
|
|
5
|
+
* @source https://wiki.facepunch.com/gmod/coroutine
|
|
6
|
+
*/
|
|
7
|
+
interface CoroutineLib {
|
|
8
|
+
/**
|
|
9
|
+
* Creates a coroutine of the given function.
|
|
10
|
+
* @realm shared and menu
|
|
11
|
+
* @source https://wiki.facepunch.com/gmod/coroutine.create
|
|
12
|
+
*/
|
|
13
|
+
create(func: function): thread;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
interface CoroutineLib {
|
|
17
|
+
/**
|
|
18
|
+
* Returns whether the running coroutine can yield.
|
|
19
|
+
* A running coroutine is yieldable if it is not in the main thread, and it is not inside a non-yieldable C function.
|
|
20
|
+
* **NOTE**: This is only available on the x86-64 versions, because of the difference in the LuaJIT version. [See here](https://wiki.facepunch.com/gmod/jit.version)
|
|
21
|
+
*
|
|
22
|
+
*
|
|
23
|
+
* @realm shared and menu
|
|
24
|
+
* @source https://wiki.facepunch.com/gmod/coroutine.isyieldable
|
|
25
|
+
*/
|
|
26
|
+
isyieldable(): boolean;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
interface CoroutineLib {
|
|
30
|
+
/**
|
|
31
|
+
* Resumes the given coroutine and passes the given vararg to either the function arguments or the [coroutine.yield](https://wiki.facepunch.com/gmod/coroutine.yield) that is inside that function and returns whatever yield is called with the next time or by the final return in the function.
|
|
32
|
+
* @realm shared and menu
|
|
33
|
+
* @source https://wiki.facepunch.com/gmod/coroutine.resume
|
|
34
|
+
*/
|
|
35
|
+
resume(coroutine: thread, ...: any): (boolean, ...any);
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
interface CoroutineLib {
|
|
39
|
+
/**
|
|
40
|
+
* Returns the active coroutine or nil if we are not within a coroutine.
|
|
41
|
+
* @realm shared and menu
|
|
42
|
+
* @source https://wiki.facepunch.com/gmod/coroutine.running
|
|
43
|
+
*/
|
|
44
|
+
running(): thread;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
interface CoroutineLib {
|
|
48
|
+
/**
|
|
49
|
+
* Returns the status of the coroutine passed to it, the possible statuses are "suspended", "running", and "dead".
|
|
50
|
+
* @realm shared and menu
|
|
51
|
+
* @source https://wiki.facepunch.com/gmod/coroutine.status
|
|
52
|
+
*/
|
|
53
|
+
status(coroutine: thread): string;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
interface CoroutineLib {
|
|
57
|
+
/**
|
|
58
|
+
* Repeatedly yields the coroutine for the given duration before continuing.
|
|
59
|
+
*
|
|
60
|
+
* Only works inside a coroutine. Only useful in nextbot coroutine think function.
|
|
61
|
+
*
|
|
62
|
+
* This function uses [Global.CurTime](https://wiki.facepunch.com/gmod/Global.CurTime) instead of [Global.RealTime](https://wiki.facepunch.com/gmod/Global.RealTime).
|
|
63
|
+
*
|
|
64
|
+
* @realm shared
|
|
65
|
+
* @source https://wiki.facepunch.com/gmod/coroutine.wait
|
|
66
|
+
*/
|
|
67
|
+
wait(duration: number): void;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
interface CoroutineLib {
|
|
71
|
+
/**
|
|
72
|
+
* Returns a function which calling is equivalent with calling [coroutine.resume](https://wiki.facepunch.com/gmod/coroutine.resume) with the coroutine and all extra parameters.
|
|
73
|
+
*
|
|
74
|
+
* The values returned by the returned function only contain the values passed to the inner [coroutine.yield](https://wiki.facepunch.com/gmod/coroutine.yield) call and do not include the *no error* status that [coroutine.resume](https://wiki.facepunch.com/gmod/coroutine.resume) provides. In case of failure, an error is thrown instead.
|
|
75
|
+
*
|
|
76
|
+
* @realm shared and menu
|
|
77
|
+
* @source https://wiki.facepunch.com/gmod/coroutine.wrap
|
|
78
|
+
*/
|
|
79
|
+
wrap(coroutine: function): function;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
interface CoroutineLib {
|
|
83
|
+
/**
|
|
84
|
+
* Pauses the active coroutine and passes all additional variables to the call of [coroutine.resume](https://wiki.facepunch.com/gmod/coroutine.resume) that resumed the coroutine last time, and returns all additional variables that were passed to the previous call of resume.
|
|
85
|
+
* @realm shared and menu
|
|
86
|
+
* @source https://wiki.facepunch.com/gmod/coroutine.yield
|
|
87
|
+
*/
|
|
88
|
+
yield(...: any): (...any);
|
|
89
|
+
}
|
|
90
|
+
|