@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/gmod.d.tlua
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
// AUTO-GENERATED tlua declarations. Do not edit by hand.
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Similar purpose to the [game](https://wiki.facepunch.com/gmod/game) and [engine](https://wiki.facepunch.com/gmod/engine), allows access to various features of the game's engine.
|
|
5
|
+
* @source https://wiki.facepunch.com/gmod/gmod
|
|
6
|
+
*/
|
|
7
|
+
declare gmod: GmodLib;
|
|
8
|
+
|
|
9
|
+
interface GmodLib {
|
|
10
|
+
/**
|
|
11
|
+
* Returns the [GAMEMODE](https://wiki.facepunch.com/gmod/GAMEMODE) table.
|
|
12
|
+
*
|
|
13
|
+
* You will want to wait until [GM:OnGamemodeLoaded](https://wiki.facepunch.com/gmod/GM:OnGamemodeLoaded) for it to return a valid value.
|
|
14
|
+
*
|
|
15
|
+
* @realm shared
|
|
16
|
+
* @source https://wiki.facepunch.com/gmod/gmod.GetGamemode
|
|
17
|
+
*/
|
|
18
|
+
GetGamemode(): GM;
|
|
19
|
+
}
|
|
20
|
+
|
package/gmsave.d.tlua
ADDED
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
// AUTO-GENERATED tlua declarations. Do not edit by hand.
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* The gmsave library provides functions relating to the singleplayer save system in Garry's Mod.
|
|
5
|
+
* @source https://wiki.facepunch.com/gmod/gmsave
|
|
6
|
+
*/
|
|
7
|
+
declare gmsave: GmsaveLib;
|
|
8
|
+
|
|
9
|
+
interface GmsaveLib {
|
|
10
|
+
/**
|
|
11
|
+
* Loads a saved map.
|
|
12
|
+
* @realm server
|
|
13
|
+
* @source https://wiki.facepunch.com/gmod/gmsave.LoadMap
|
|
14
|
+
*/
|
|
15
|
+
LoadMap(mapData: string, ply?: Player, callback?: function): void;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
interface GmsaveLib {
|
|
19
|
+
/**
|
|
20
|
+
* Sets player position and angles from supplied table.
|
|
21
|
+
* @realm server
|
|
22
|
+
* @source https://wiki.facepunch.com/gmod/gmsave.PlayerLoad
|
|
23
|
+
*/
|
|
24
|
+
PlayerLoad(ply: Player, data: table): void;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
interface GmsaveLib {
|
|
28
|
+
/**
|
|
29
|
+
* Returns a table containing player position and angles. Used by [gmsave.SaveMap](https://wiki.facepunch.com/gmod/gmsave.SaveMap).
|
|
30
|
+
* @realm server
|
|
31
|
+
* @source https://wiki.facepunch.com/gmod/gmsave.PlayerSave
|
|
32
|
+
*/
|
|
33
|
+
PlayerSave(ply: Player): table;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
interface GmsaveLib {
|
|
37
|
+
/**
|
|
38
|
+
* Saves the map.
|
|
39
|
+
* @realm server
|
|
40
|
+
* @source https://wiki.facepunch.com/gmod/gmsave.SaveMap
|
|
41
|
+
*/
|
|
42
|
+
SaveMap(ply: Player): string;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
interface GmsaveLib {
|
|
46
|
+
/**
|
|
47
|
+
* Returns if we should save this entity in a duplication or a map save or not.
|
|
48
|
+
* @realm server
|
|
49
|
+
* @source https://wiki.facepunch.com/gmod/gmsave.ShouldSaveEntity
|
|
50
|
+
*/
|
|
51
|
+
ShouldSaveEntity(ent: Entity, t: table): boolean;
|
|
52
|
+
}
|
|
53
|
+
|
package/gui.d.tlua
ADDED
|
@@ -0,0 +1,232 @@
|
|
|
1
|
+
// AUTO-GENERATED tlua declarations. Do not edit by hand.
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* The gui library is similar to the [input](https://wiki.facepunch.com/gmod/input) but features functions that are more focused on the mouse's interaction with GUI panels.
|
|
5
|
+
* @source https://wiki.facepunch.com/gmod/gui
|
|
6
|
+
*/
|
|
7
|
+
declare gui: GuiLib;
|
|
8
|
+
|
|
9
|
+
interface GuiLib {
|
|
10
|
+
/**
|
|
11
|
+
* Opens the game main menu as if the player pressed their Escape key.
|
|
12
|
+
* @realm client and menu
|
|
13
|
+
* @source https://wiki.facepunch.com/gmod/gui.ActivateGameUI
|
|
14
|
+
*/
|
|
15
|
+
ActivateGameUI(): void;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
interface GuiLib {
|
|
19
|
+
/**
|
|
20
|
+
* Pushes text to the closed caption box.
|
|
21
|
+
* **WARNING**: The function will not work, if the console command variable `closecaption` is set to 0.
|
|
22
|
+
*
|
|
23
|
+
*
|
|
24
|
+
* @realm client
|
|
25
|
+
* @source https://wiki.facepunch.com/gmod/gui.AddCaption
|
|
26
|
+
*/
|
|
27
|
+
AddCaption(captionStream: string, duration: number, fromPlayer?: boolean): void;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
interface GuiLib {
|
|
31
|
+
/**
|
|
32
|
+
* Enables the mouse cursor without restricting player movement, like using Sandbox's context menu. See [vgui.CursorVisible](https://wiki.facepunch.com/gmod/vgui.CursorVisible) for a function to see if the cursor is visible or not.
|
|
33
|
+
*
|
|
34
|
+
* **NOTE**: Some [CUserCmd](https://wiki.facepunch.com/gmod/CUserCmd) functions will return incorrect values when this function is active because [the user input is getting overtaken by the vgui system](https://github.com/Facepunch/garrysmod-issues/issues/982#issuecomment-505671531).
|
|
35
|
+
*
|
|
36
|
+
*
|
|
37
|
+
* @realm client
|
|
38
|
+
* @source https://wiki.facepunch.com/gmod/gui.EnableScreenClicker
|
|
39
|
+
*/
|
|
40
|
+
EnableScreenClicker(enabled: boolean): void;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
interface GuiLib {
|
|
44
|
+
/**
|
|
45
|
+
* Hides the game main menu if it is currently open.
|
|
46
|
+
*
|
|
47
|
+
* This can only be ran a certain amount of times per second to prevent main menu being completely inaccessible by the player.
|
|
48
|
+
*
|
|
49
|
+
* Use [GM:OnPauseMenuShow](https://wiki.facepunch.com/gmod/GM:OnPauseMenuShow) to prevent opening the main menu without a one frame flash.
|
|
50
|
+
*
|
|
51
|
+
* @realm client and menu
|
|
52
|
+
* @source https://wiki.facepunch.com/gmod/gui.HideGameUI
|
|
53
|
+
*/
|
|
54
|
+
HideGameUI(): void;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
interface GuiLib {
|
|
58
|
+
/**
|
|
59
|
+
* Simulates a mouse move with the given deltas.
|
|
60
|
+
* @realm client and menu
|
|
61
|
+
* @source https://wiki.facepunch.com/gmod/gui.InternalCursorMoved
|
|
62
|
+
*/
|
|
63
|
+
InternalCursorMoved(deltaX: number, deltaY: number): void;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
interface GuiLib {
|
|
67
|
+
/**
|
|
68
|
+
* Simulates a key press for the given key.
|
|
69
|
+
* @realm client and menu
|
|
70
|
+
* @source https://wiki.facepunch.com/gmod/gui.InternalKeyCodePressed
|
|
71
|
+
*/
|
|
72
|
+
InternalKeyCodePressed(key: number): void;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
interface GuiLib {
|
|
76
|
+
/**
|
|
77
|
+
* Simulates a key release for the given key.
|
|
78
|
+
* @realm client and menu
|
|
79
|
+
* @source https://wiki.facepunch.com/gmod/gui.InternalKeyCodeReleased
|
|
80
|
+
*/
|
|
81
|
+
InternalKeyCodeReleased(key: number): void;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
interface GuiLib {
|
|
85
|
+
/**
|
|
86
|
+
* Simulates a key type typing to the specified key.
|
|
87
|
+
* @realm client and menu
|
|
88
|
+
* @source https://wiki.facepunch.com/gmod/gui.InternalKeyCodeTyped
|
|
89
|
+
*/
|
|
90
|
+
InternalKeyCodeTyped(key: number): void;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
interface GuiLib {
|
|
94
|
+
/**
|
|
95
|
+
* Simulates an ASCII symbol writing.
|
|
96
|
+
* Use to write text in the chat or in VGUI.
|
|
97
|
+
* Doesn't work while the main menu is open!
|
|
98
|
+
*
|
|
99
|
+
* @realm client and menu
|
|
100
|
+
* @source https://wiki.facepunch.com/gmod/gui.InternalKeyTyped
|
|
101
|
+
*/
|
|
102
|
+
InternalKeyTyped(code: number): void;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
interface GuiLib {
|
|
106
|
+
/**
|
|
107
|
+
* Simulates a double mouse key press for the given mouse key.
|
|
108
|
+
* @realm client and menu
|
|
109
|
+
* @source https://wiki.facepunch.com/gmod/gui.InternalMouseDoublePressed
|
|
110
|
+
*/
|
|
111
|
+
InternalMouseDoublePressed(key: number): void;
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
interface GuiLib {
|
|
115
|
+
/**
|
|
116
|
+
* Simulates a mouse key press for the given mouse key.
|
|
117
|
+
* @realm client and menu
|
|
118
|
+
* @source https://wiki.facepunch.com/gmod/gui.InternalMousePressed
|
|
119
|
+
*/
|
|
120
|
+
InternalMousePressed(key: number): void;
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
interface GuiLib {
|
|
124
|
+
/**
|
|
125
|
+
* Simulates a mouse key release for the given mouse key.
|
|
126
|
+
* @realm client and menu
|
|
127
|
+
* @source https://wiki.facepunch.com/gmod/gui.InternalMouseReleased
|
|
128
|
+
*/
|
|
129
|
+
InternalMouseReleased(key: number): void;
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
interface GuiLib {
|
|
133
|
+
/**
|
|
134
|
+
* Simulates a mouse wheel scroll with the given delta.
|
|
135
|
+
* @realm client and menu
|
|
136
|
+
* @source https://wiki.facepunch.com/gmod/gui.InternalMouseWheeled
|
|
137
|
+
*/
|
|
138
|
+
InternalMouseWheeled(delta: number): void;
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
interface GuiLib {
|
|
142
|
+
/**
|
|
143
|
+
* Returns whether the console is visible or not.
|
|
144
|
+
* @realm client and menu
|
|
145
|
+
* @source https://wiki.facepunch.com/gmod/gui.IsConsoleVisible
|
|
146
|
+
*/
|
|
147
|
+
IsConsoleVisible(): boolean;
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
interface GuiLib {
|
|
151
|
+
/**
|
|
152
|
+
* Returns whether the game menu overlay ( main menu ) is open or not.
|
|
153
|
+
* @realm client and menu
|
|
154
|
+
* @source https://wiki.facepunch.com/gmod/gui.IsGameUIVisible
|
|
155
|
+
*/
|
|
156
|
+
IsGameUIVisible(): boolean;
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
interface GuiLib {
|
|
160
|
+
/**
|
|
161
|
+
* Returns the cursor's position on the screen, or 0, 0 if cursor is not visible.
|
|
162
|
+
*
|
|
163
|
+
* @realm client and menu
|
|
164
|
+
* @source https://wiki.facepunch.com/gmod/gui.MousePos
|
|
165
|
+
* @deprecated Use input.GetCursorPos instead.
|
|
166
|
+
*/
|
|
167
|
+
MousePos(): (number, number);
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
interface GuiLib {
|
|
171
|
+
/**
|
|
172
|
+
* Returns x component of the mouse position.
|
|
173
|
+
* @realm client and menu
|
|
174
|
+
* @source https://wiki.facepunch.com/gmod/gui.MouseX
|
|
175
|
+
*/
|
|
176
|
+
MouseX(): number;
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
interface GuiLib {
|
|
180
|
+
/**
|
|
181
|
+
* Returns y component of the mouse position.
|
|
182
|
+
* @realm client and menu
|
|
183
|
+
* @source https://wiki.facepunch.com/gmod/gui.MouseY
|
|
184
|
+
*/
|
|
185
|
+
MouseY(): number;
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
interface GuiLib {
|
|
189
|
+
/**
|
|
190
|
+
* Opens specified URL in the steam overlay browser.
|
|
191
|
+
*
|
|
192
|
+
* **NOTE**: When called clientside, user will be asked for confirmation before the website will open.
|
|
193
|
+
*
|
|
194
|
+
*
|
|
195
|
+
* @realm client and menu
|
|
196
|
+
* @source https://wiki.facepunch.com/gmod/gui.OpenURL
|
|
197
|
+
*/
|
|
198
|
+
OpenURL(url: string): void;
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
interface GuiLib {
|
|
202
|
+
/**
|
|
203
|
+
* Converts the specified screen position to a **direction** vector local to the player's view. A related function is [Vector:ToScreen](https://wiki.facepunch.com/gmod/Vector:ToScreen), which translates a 3D position to a screen coordinate.
|
|
204
|
+
*
|
|
205
|
+
* [util.AimVector](https://wiki.facepunch.com/gmod/util.AimVector) is a more generic version of this, using a custom view instead of the player's current view.
|
|
206
|
+
*
|
|
207
|
+
* @realm client
|
|
208
|
+
* @source https://wiki.facepunch.com/gmod/gui.ScreenToVector
|
|
209
|
+
*/
|
|
210
|
+
ScreenToVector(x: number, y: number): Vector;
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
interface GuiLib {
|
|
214
|
+
/**
|
|
215
|
+
* Sets the cursor's position on the screen, relative to the topleft corner of the window
|
|
216
|
+
*
|
|
217
|
+
* @realm client and menu
|
|
218
|
+
* @source https://wiki.facepunch.com/gmod/gui.SetMousePos
|
|
219
|
+
* @deprecated Use input.SetCursorPos instead.
|
|
220
|
+
*/
|
|
221
|
+
SetMousePos(mouseX: number, mouseY: number): void;
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
interface GuiLib {
|
|
225
|
+
/**
|
|
226
|
+
* Shows console in the game UI.
|
|
227
|
+
* @realm menu
|
|
228
|
+
* @source https://wiki.facepunch.com/gmod/gui.ShowConsole
|
|
229
|
+
*/
|
|
230
|
+
ShowConsole(): void;
|
|
231
|
+
}
|
|
232
|
+
|
package/gwen.d.tlua
ADDED
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
// AUTO-GENERATED tlua declarations. Do not edit by hand.
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* GWEN is a system that allows you to load a spritesheet and generate a skin out of it.
|
|
5
|
+
* @source https://wiki.facepunch.com/gmod/GWEN
|
|
6
|
+
*/
|
|
7
|
+
declare GWEN: GWENLib;
|
|
8
|
+
|
|
9
|
+
interface GWENLib {
|
|
10
|
+
/**
|
|
11
|
+
* This is a utility function that generates a specialized drawing function to render scalable textured borders. This is done with [9-slice scaling](https://en.wikipedia.org/wiki/9-slice_scaling). This is used in derma skins to create a bordered rectangle drawing function from an image.
|
|
12
|
+
*
|
|
13
|
+
* The texture is taken from `SKIN.GwenTexture` when the `material` argument is not supplied.
|
|
14
|
+
*
|
|
15
|
+
*
|
|
16
|
+
*
|
|
17
|
+
* @realm client and menu
|
|
18
|
+
* @source https://wiki.facepunch.com/gmod/GWEN.CreateTextureBorder
|
|
19
|
+
*/
|
|
20
|
+
CreateTextureBorder(x: number, y: number, w: number, h: number, left: number, top: number, right: number, bottom: number, material?: IMaterial): (x: number, y: number, w: number, h: number, clr?: Color) => void;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
interface GWENLib {
|
|
24
|
+
/**
|
|
25
|
+
* Used in derma skins to create a fixed scale rectangle drawing function from an image. it will be drawn in the center of the box.
|
|
26
|
+
*
|
|
27
|
+
* The texture is taken from `SKIN.GwenTexture` when the `material` is not supplied.
|
|
28
|
+
* @realm client and menu
|
|
29
|
+
* @source https://wiki.facepunch.com/gmod/GWEN.CreateTextureCentered
|
|
30
|
+
*/
|
|
31
|
+
CreateTextureCentered(x: number, y: number, w: number, h: number, material?: IMaterial): (x: number, y: number, w: number, h: number, clr?: Color) => void;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
interface GWENLib {
|
|
35
|
+
/**
|
|
36
|
+
* Helper function that returns a specialized drawing function for rendering a texture that scales freely to fit the given area.
|
|
37
|
+
*
|
|
38
|
+
*
|
|
39
|
+
*
|
|
40
|
+
* The texture is taken from `SKIN.GwenTexture` when the `material` is not supplied.
|
|
41
|
+
* @realm client and menu
|
|
42
|
+
* @source https://wiki.facepunch.com/gmod/GWEN.CreateTextureNormal
|
|
43
|
+
*/
|
|
44
|
+
CreateTextureNormal(x: number, y: number, w: number, h: number, material?: IMaterial): (x: number, y: number, w: number, h: number, clr?: Color) => void;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
interface GWENLib {
|
|
48
|
+
/**
|
|
49
|
+
* Retrieves the color from a materials texture at the provided UV coordinates
|
|
50
|
+
* @realm client and menu
|
|
51
|
+
* @source https://wiki.facepunch.com/gmod/GWEN.TextureColor
|
|
52
|
+
*/
|
|
53
|
+
TextureColor(x: number, y: number): Color;
|
|
54
|
+
}
|
|
55
|
+
|
package/halo.d.tlua
ADDED
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
// AUTO-GENERATED tlua declarations. Do not edit by hand.
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* The halo library is used to draw glowing outlines around entities, an example of this can be seen by picking up props with the physgun in Garry's Mod 13.
|
|
5
|
+
* @source https://wiki.facepunch.com/gmod/halo
|
|
6
|
+
*/
|
|
7
|
+
declare halo: HaloLib;
|
|
8
|
+
|
|
9
|
+
interface HaloLib {
|
|
10
|
+
/**
|
|
11
|
+
* Applies a [halo](https://wiki.facepunch.com/gmod/halo) glow effect to one or multiple entities. It is preferable to add them in [GM:PreDrawHalos](https://wiki.facepunch.com/gmod/GM:PreDrawHalos), but they can be added at any time.
|
|
12
|
+
* **NOTE**: The ignoreZ parameter will cause the halos to draw over the player's viewmodel. You can work around this using [render.DepthRange](https://wiki.facepunch.com/gmod/render.DepthRange) in the [GM:PreDrawViewModel](https://wiki.facepunch.com/gmod/GM:PreDrawViewModel), [GM:PostDrawViewModel](https://wiki.facepunch.com/gmod/GM:PostDrawViewModel), [GM:PreDrawPlayerHands](https://wiki.facepunch.com/gmod/GM:PreDrawPlayerHands) and [GM:PostDrawPlayerHands](https://wiki.facepunch.com/gmod/GM:PostDrawPlayerHands) hooks.
|
|
13
|
+
*
|
|
14
|
+
*
|
|
15
|
+
* @realm client
|
|
16
|
+
* @source https://wiki.facepunch.com/gmod/halo.Add
|
|
17
|
+
*/
|
|
18
|
+
Add(entities: table, color: Color, blurX?: number, blurY?: number, passes?: number, additive?: boolean, ignoreZ?: boolean): void;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
interface HaloLib {
|
|
22
|
+
/**
|
|
23
|
+
* **INTERNAL**: This is used internally - although you're able to use it you probably shouldn't.
|
|
24
|
+
* Renders a halo according to the specified table, only used internally, called from a [GM:PostDrawEffects](https://wiki.facepunch.com/gmod/GM:PostDrawEffects) hook added by the halo library.
|
|
25
|
+
* @realm client
|
|
26
|
+
* @source https://wiki.facepunch.com/gmod/halo.Render
|
|
27
|
+
*/
|
|
28
|
+
Render(entry: table): void;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
interface HaloLib {
|
|
32
|
+
/**
|
|
33
|
+
* Returns the entity the halo library is currently rendering the halo for.
|
|
34
|
+
*
|
|
35
|
+
* The main purpose of this function is to be used in [ENTITY:Draw](https://wiki.facepunch.com/gmod/ENTITY:Draw) in order not to draw certain parts of the entity when the halo is being rendered, so there's no halo around unwanted entity parts, such as lasers, 3D2D displays, etc.
|
|
36
|
+
*
|
|
37
|
+
* @realm client
|
|
38
|
+
* @source https://wiki.facepunch.com/gmod/halo.RenderedEntity
|
|
39
|
+
*/
|
|
40
|
+
RenderedEntity(): Entity;
|
|
41
|
+
}
|
|
42
|
+
|
package/hammer.d.tlua
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
// AUTO-GENERATED tlua declarations. Do not edit by hand.
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* The hammer library.
|
|
5
|
+
* @source https://wiki.facepunch.com/gmod/hammer
|
|
6
|
+
*/
|
|
7
|
+
declare hammer: HammerLib;
|
|
8
|
+
|
|
9
|
+
interface HammerLib {
|
|
10
|
+
/**
|
|
11
|
+
* Sends command to Hammer, if Hammer is running with the current map loaded.
|
|
12
|
+
* @realm server
|
|
13
|
+
* @source https://wiki.facepunch.com/gmod/hammer.SendCommand
|
|
14
|
+
*/
|
|
15
|
+
SendCommand(cmd: string): string;
|
|
16
|
+
}
|
|
17
|
+
|
package/hook.d.tlua
ADDED
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
// AUTO-GENERATED tlua declarations. Do not edit by hand.
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* The hook library allows you to add hooks called by the game engine, allowing multiple scripts to modify game function.
|
|
5
|
+
* @source https://wiki.facepunch.com/gmod/hook
|
|
6
|
+
*/
|
|
7
|
+
declare hook: HookLib;
|
|
8
|
+
|
|
9
|
+
interface HookLib {
|
|
10
|
+
/**
|
|
11
|
+
* Registers a function (or "callback") with the Hook system so that it will
|
|
12
|
+
* be called automatically whenever a specific event (or "hook") occurs.
|
|
13
|
+
* @realm shared
|
|
14
|
+
* @realm menu
|
|
15
|
+
* @source https://wiki.facepunch.com/gmod/hook.Add
|
|
16
|
+
*/
|
|
17
|
+
Add(eventName: string, identifier: any, func: function): void;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
interface HookLib {
|
|
22
|
+
/**
|
|
23
|
+
* Calls all hooks associated with the given event until one returns something other than `nil`, and then returns that data.
|
|
24
|
+
*
|
|
25
|
+
* In almost all cases, you should use [hook.Run](https://wiki.facepunch.com/gmod/hook.Run) instead - it calls hook.Call internally but supplies the gamemode table by itself, making your code neater.
|
|
26
|
+
*
|
|
27
|
+
* @realm shared and menu
|
|
28
|
+
* @source https://wiki.facepunch.com/gmod/hook.Call
|
|
29
|
+
*/
|
|
30
|
+
Call(eventName: string, gamemodeTable?: table, ...: any): (...any);
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
interface HookLib {
|
|
34
|
+
/**
|
|
35
|
+
* Returns a list of all the hooks registered with [hook.Add](https://wiki.facepunch.com/gmod/hook.Add).
|
|
36
|
+
* @realm shared and menu
|
|
37
|
+
* @source https://wiki.facepunch.com/gmod/hook.GetTable
|
|
38
|
+
*/
|
|
39
|
+
GetTable(): table;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
interface HookLib {
|
|
43
|
+
/**
|
|
44
|
+
* Removes the hook with the supplied identifier from the given event.
|
|
45
|
+
* @realm shared and menu
|
|
46
|
+
* @source https://wiki.facepunch.com/gmod/hook.Remove
|
|
47
|
+
*/
|
|
48
|
+
Remove(eventName: string, identifier: any): void;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
interface HookLib {
|
|
52
|
+
/**
|
|
53
|
+
* Calls all hooks associated with the given event **until** one returns something other than `nil` and then returns that data. If no hook returns any data, it will try to call the `GAMEMODE:` alternative, if one exists.
|
|
54
|
+
*
|
|
55
|
+
* This function internally calls [hook.Call](https://wiki.facepunch.com/gmod/hook.Call).
|
|
56
|
+
*
|
|
57
|
+
* See also: [gamemode.Call](https://wiki.facepunch.com/gmod/gamemode.Call) - same as this, but does not call hooks if the gamemode hasn't defined the function.
|
|
58
|
+
*
|
|
59
|
+
* @realm shared and menu
|
|
60
|
+
* @source https://wiki.facepunch.com/gmod/hook.Run
|
|
61
|
+
*/
|
|
62
|
+
Run(eventName: string, ...: any): (...any);
|
|
63
|
+
}
|
|
64
|
+
|
package/html.d.tlua
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
// AUTO-GENERATED tlua declarations. Do not edit by hand.
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* The HTML control can be used to display web pages just like an internet browser.
|
|
5
|
+
*
|
|
6
|
+
* [DHTML](https://wiki.facepunch.com/gmod/DHTML) has additional functionality for interfacing with the page, such as sending and receiving data.
|
|
7
|
+
*
|
|
8
|
+
* ## Blocked URL Extentions
|
|
9
|
+
*
|
|
10
|
+
* This means your url cannot end in any of these extensions, e.g.: (http://yourdomain.com/garry.exe)
|
|
11
|
+
* * .exe
|
|
12
|
+
* * .bat
|
|
13
|
+
* * .dll
|
|
14
|
+
* * .zip
|
|
15
|
+
* * .mp3
|
|
16
|
+
* * .swf
|
|
17
|
+
*
|
|
18
|
+
* @realm client
|
|
19
|
+
* @source https://wiki.facepunch.com/gmod/HTML
|
|
20
|
+
*/
|
|
21
|
+
interface HTML extends Panel {}
|
|
22
|
+
|
package/http.d.tlua
ADDED
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
// AUTO-GENERATED tlua declarations. Do not edit by hand.
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* The http library allows either the server or client to communicate with external websites via HTTP, both `GET` ([http.Fetch](https://wiki.facepunch.com/gmod/http.Fetch)) and `POST` ([http.Post](https://wiki.facepunch.com/gmod/http.Post)) are supported. A more powerful & advanced method can be used via the global [Global.HTTP](https://wiki.facepunch.com/gmod/Global.HTTP) function.
|
|
5
|
+
*
|
|
6
|
+
* @source https://wiki.facepunch.com/gmod/http
|
|
7
|
+
*/
|
|
8
|
+
declare http: HttpLib;
|
|
9
|
+
|
|
10
|
+
interface HttpLib {
|
|
11
|
+
/**
|
|
12
|
+
* Launches an asynchronous **GET** request to an HTTP server. Internally calls [Global.HTTP](https://wiki.facepunch.com/gmod/Global.HTTP).
|
|
13
|
+
*
|
|
14
|
+
* HTTP requests returning a status code >= `400` are still considered a success and will call the [onSuccess](https://wiki.facepunch.com/gmod/Structures/HTTPRequest) callback.
|
|
15
|
+
*
|
|
16
|
+
* The [onFailure](https://wiki.facepunch.com/gmod/Structures/HTTPRequest) callback is usually only called on DNS or TCP errors (e.g. the website is unavailable or the domain does not exist).
|
|
17
|
+
*
|
|
18
|
+
* A rough overview of possible [onFailure](https://wiki.facepunch.com/gmod/Structures/HTTPRequest) messages:
|
|
19
|
+
* * `invalid url` - Invalid/empty url. ( no request was attempted )
|
|
20
|
+
* * `invalid request` - Steam HTTP lib failed to create a HTTP request.
|
|
21
|
+
* * `error` - OnComplete callback's second argument, `bError`, is `true`.
|
|
22
|
+
* * `unsuccessful` - OnComplete's first argument, `pResult->m_bRequestSuccessful`, returned `false`.
|
|
23
|
+
*
|
|
24
|
+
* This cannot send or receive multiple headers with the same name.
|
|
25
|
+
* **NOTE**: HTTP-requests that respond with a large body may return an `unsuccessful` error. Try using the [Range](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Range) header to download the file in chunks.
|
|
26
|
+
*
|
|
27
|
+
* **NOTE**: HTTP-requests to destinations on private networks (such as `192.168.0.1`, or `127.0.0.1`) won't work.
|
|
28
|
+
*
|
|
29
|
+
* To enable HTTP-requests to destinations on private networks use [Command Line Parameters](https://wiki.facepunch.com/gmod/Command_Line_Parameters) `-allowlocalhttp`. (Dedicated servers only)
|
|
30
|
+
*
|
|
31
|
+
*
|
|
32
|
+
* **Not all headers are allowed in the client realm, here is a list of known blacklisted headers inside the client realm:**
|
|
33
|
+
* ```
|
|
34
|
+
* host
|
|
35
|
+
* expect
|
|
36
|
+
* content-length
|
|
37
|
+
* proxy-authenticate
|
|
38
|
+
* accept-charset
|
|
39
|
+
* connection
|
|
40
|
+
* accept-encoding
|
|
41
|
+
* origin
|
|
42
|
+
* date
|
|
43
|
+
* ```
|
|
44
|
+
*
|
|
45
|
+
* @realm shared and menu
|
|
46
|
+
* @source https://wiki.facepunch.com/gmod/http.Fetch
|
|
47
|
+
*/
|
|
48
|
+
Fetch(url: string, onSuccess?: (body: string, size: number, headers: table, code: number) => void, onFailure?: (error: string) => void, headers?: table): void;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
interface HttpLib {
|
|
52
|
+
/**
|
|
53
|
+
* Sends an asynchronous **POST** request to an HTTP server. Internally calls [Global.HTTP](https://wiki.facepunch.com/gmod/Global.HTTP).
|
|
54
|
+
*
|
|
55
|
+
* HTTP requests returning a status code >= `400` are still considered a success and will call the [onSuccess](https://wiki.facepunch.com/gmod/Structures/HTTPRequest) callback.
|
|
56
|
+
*
|
|
57
|
+
* The [onFailure](https://wiki.facepunch.com/gmod/Structures/HTTPRequest) callback is usually only called on DNS or TCP errors (e.g. the website is unavailable or the domain does not exist).
|
|
58
|
+
*
|
|
59
|
+
* This cannot send or receive multiple headers with the same name.
|
|
60
|
+
* **NOTE**: HTTP-requests that respond with a large body may return an `unsuccessful` error. Try using the [Range](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Range) header to download the file in chunks.
|
|
61
|
+
*
|
|
62
|
+
* **NOTE**: HTTP-requests to destinations on private networks (such as `192.168.0.1`, or `127.0.0.1`) won't work.
|
|
63
|
+
*
|
|
64
|
+
* To enable HTTP-requests to destinations on private networks use [Command Line Parameters](https://wiki.facepunch.com/gmod/Command_Line_Parameters) `-allowlocalhttp`. (Dedicated servers only)
|
|
65
|
+
*
|
|
66
|
+
*
|
|
67
|
+
* @realm shared and menu
|
|
68
|
+
* @source https://wiki.facepunch.com/gmod/http.Post
|
|
69
|
+
*/
|
|
70
|
+
Post(url: string, parameters: table, onSuccess?: (body: string, size: string, headers: table, code: number) => void, onFailure?: (error: string) => void, headers?: table): void;
|
|
71
|
+
}
|
|
72
|
+
|