@tlua/gmod 1.0.5 → 1.0.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/types/achievementicon.d.tlua +0 -1
- package/types/achievements.d.tlua +15 -16
- package/types/ai.d.tlua +5 -6
- package/types/ai_schedule.d.tlua +0 -1
- package/types/ai_task.d.tlua +0 -1
- package/types/angle.d.tlua +18 -19
- package/types/avatarimage.d.tlua +0 -1
- package/types/awesomium.d.tlua +0 -1
- package/types/baseclass.d.tlua +1 -3
- package/types/bf_read.d.tlua +10 -12
- package/types/bit.d.tlua +11 -12
- package/types/button.d.tlua +0 -1
- package/types/cam.d.tlua +16 -17
- package/types/ceffectdata.d.tlua +31 -33
- package/types/chat.d.tlua +5 -6
- package/types/checkbutton.d.tlua +0 -1
- package/types/cleanup.d.tlua +7 -8
- package/types/cluaemitter.d.tlua +11 -13
- package/types/clualocomotion.d.tlua +39 -41
- package/types/cluaparticle.d.tlua +43 -45
- package/types/cmovedata.d.tlua +46 -48
- package/types/cnavarea.d.tlua +76 -78
- package/types/cnavladder.d.tlua +21 -23
- package/types/cnewparticleeffect.d.tlua +25 -27
- package/types/color.d.tlua +28 -29
- package/types/concommand.d.tlua +4 -5
- package/types/constraint.d.tlua +28 -29
- package/types/construct.d.tlua +1 -2
- package/types/contentheader.d.tlua +1 -3
- package/types/contenticon.d.tlua +7 -9
- package/types/contentsidebar.d.tlua +2 -4
- package/types/contentsidebartoolbox.d.tlua +0 -1
- package/types/contextbase.d.tlua +2 -4
- package/types/controlpanel.d.tlua +11 -14
- package/types/controlpresets.d.tlua +11 -13
- package/types/convar.d.tlua +15 -17
- package/types/cookie.d.tlua +3 -4
- package/types/coroutine.d.tlua +7 -8
- package/types/crecipientfilter.d.tlua +15 -17
- package/types/csent.d.tlua +0 -1
- package/types/csoundpatch.d.tlua +13 -15
- package/types/ctakedamageinfo.d.tlua +32 -34
- package/types/ctrllistbox.d.tlua +0 -1
- package/types/ctrlnumpad.d.tlua +5 -7
- package/types/cusercmd.d.tlua +26 -28
- package/types/custom_entity_fields.d.tlua +0 -1
- package/types/cvars.d.tlua +6 -7
- package/types/dadjustablemodelpanel.d.tlua +5 -7
- package/types/dalphabar.d.tlua +1 -3
- package/types/dbinder.d.tlua +2 -4
- package/types/dbubblecontainer.d.tlua +0 -2
- package/types/dbutton.d.tlua +6 -8
- package/types/dcategoryheader.d.tlua +0 -1
- package/types/dcategorylist.d.tlua +0 -1
- package/types/dcheckbox.d.tlua +3 -5
- package/types/dcheckboxlabel.d.tlua +9 -10
- package/types/dcollapsiblecategory.d.tlua +21 -23
- package/types/dcolorbutton.d.tlua +5 -7
- package/types/dcolorcombo.d.tlua +3 -5
- package/types/dcolorcube.d.tlua +11 -13
- package/types/dcolormixer.d.tlua +25 -27
- package/types/dcolorpalette.d.tlua +21 -23
- package/types/dcolumnsheet.d.tlua +3 -5
- package/types/dcombobox.d.tlua +15 -17
- package/types/ddragbase.d.tlua +11 -13
- package/types/ddrawer.d.tlua +6 -8
- package/types/debug.d.tlua +16 -19
- package/types/debugoverlay.d.tlua +11 -12
- package/types/dentityproperties.d.tlua +3 -5
- package/types/derma.d.tlua +10 -11
- package/types/dexpandbutton.d.tlua +1 -3
- package/types/dfilebrowser.d.tlua +20 -21
- package/types/dform.d.tlua +16 -18
- package/types/dframe.d.tlua +24 -25
- package/types/dgrid.d.tlua +9 -11
- package/types/dhorizontaldivider.d.tlua +18 -20
- package/types/dhorizontalscroller.d.tlua +9 -11
- package/types/dhscrollbar.d.tlua +9 -11
- package/types/dhtml.d.tlua +6 -8
- package/types/dhtmlcontrols.d.tlua +5 -6
- package/types/diconbrowser.d.tlua +9 -11
- package/types/diconlayout.d.tlua +16 -18
- package/types/dimage.d.tlua +17 -20
- package/types/dimagebutton.d.tlua +9 -10
- package/types/dkillicon.d.tlua +0 -1
- package/types/dlabel.d.tlua +31 -33
- package/types/dlabeleditable.d.tlua +3 -5
- package/types/dlabelurl.d.tlua +8 -10
- package/types/dlistbox.d.tlua +6 -8
- package/types/dlistboxitem.d.tlua +2 -4
- package/types/dlistlayout.d.tlua +0 -1
- package/types/dlistview.d.tlua +32 -34
- package/types/dlistview_column.d.tlua +12 -14
- package/types/dlistview_columnplain.d.tlua +0 -1
- package/types/dlistview_draggerbar.d.tlua +0 -1
- package/types/dlistview_line.d.tlua +11 -13
- package/types/dlistviewheaderlabel.d.tlua +0 -1
- package/types/dlistviewlabel.d.tlua +0 -1
- package/types/dlistviewline.d.tlua +0 -1
- package/types/dmenu.d.tlua +23 -28
- package/types/dmenubar.d.tlua +2 -7
- package/types/dmenuoption.d.tlua +11 -13
- package/types/dmenuoptioncvar.d.tlua +4 -6
- package/types/dmodelpanel.d.tlua +20 -22
- package/types/dmodelselect.d.tlua +0 -2
- package/types/dmodelselectmulti.d.tlua +0 -2
- package/types/dnotify.d.tlua +8 -10
- package/types/dnumberscratch.d.tlua +24 -26
- package/types/dnumberwang.d.tlua +14 -16
- package/types/dnumpad.d.tlua +0 -1
- package/types/dnumslider.d.tlua +17 -18
- package/types/dpanel.d.tlua +12 -14
- package/types/dpanellist.d.tlua +11 -12
- package/types/dpaneloverlay.d.tlua +5 -7
- package/types/dpanelselect.d.tlua +0 -1
- package/types/dpanpanel.d.tlua +4 -6
- package/types/dprogress.d.tlua +1 -3
- package/types/dproperties.d.tlua +2 -4
- package/types/dproperty_boolean.d.tlua +0 -1
- package/types/dproperty_combo.d.tlua +1 -3
- package/types/dproperty_entity.d.tlua +0 -1
- package/types/dproperty_float.d.tlua +0 -1
- package/types/dproperty_generic.d.tlua +3 -5
- package/types/dproperty_int.d.tlua +0 -1
- package/types/dproperty_vectorcolor.d.tlua +0 -1
- package/types/dpropertysheet.d.tlua +15 -17
- package/types/dragndrop.d.tlua +10 -11
- package/types/draw.d.tlua +10 -12
- package/types/drgbpicker.d.tlua +2 -4
- package/types/drive.d.tlua +11 -13
- package/types/dscrollbargrip.d.tlua +0 -1
- package/types/dscrollpanel.d.tlua +10 -11
- package/types/dshape.d.tlua +5 -7
- package/types/dsizetocontents.d.tlua +3 -5
- package/types/dslider.d.tlua +26 -28
- package/types/dsprite.d.tlua +7 -9
- package/types/dtab.d.tlua +6 -8
- package/types/dtextentry.d.tlua +41 -43
- package/types/dtilelayout.d.tlua +19 -21
- package/types/dtooltip.d.tlua +4 -6
- package/types/dtree.d.tlua +14 -16
- package/types/dtree_node.d.tlua +66 -68
- package/types/dtree_node_button.d.tlua +0 -1
- package/types/duplicator.d.tlua +29 -31
- package/types/dverticaldivider.d.tlua +21 -23
- package/types/dvscrollbar.d.tlua +9 -11
- package/types/editablepanel.d.tlua +0 -1
- package/types/effect.d.tlua +2 -4
- package/types/effects.d.tlua +6 -7
- package/types/engine.d.tlua +21 -22
- package/types/entity.d.tlua +643 -674
- package/types/ents.d.tlua +19 -25
- package/types/enums.d.tlua +0 -1
- package/types/file.d.tlua +39 -40
- package/types/file_class.d.tlua +0 -1
- package/types/fingerposer.d.tlua +0 -1
- package/types/fingervar.d.tlua +0 -1
- package/types/frame.d.tlua +0 -1
- package/types/frame_blend.d.tlua +7 -8
- package/types/game.d.tlua +39 -40
- package/types/gameevent.d.tlua +0 -1
- package/types/gamemode.d.tlua +2 -4
- package/types/global.d.tlua +0 -18
- package/types/gm.d.tlua +266 -268
- package/types/gmod.d.tlua +0 -1
- package/types/gmsave.d.tlua +4 -5
- package/types/gui.d.tlua +21 -22
- package/types/gwen.d.tlua +3 -4
- package/types/halo.d.tlua +2 -3
- package/types/hammer.d.tlua +0 -1
- package/types/hook.d.tlua +4 -5
- package/types/html.d.tlua +0 -1
- package/types/http.d.tlua +1 -2
- package/types/iconeditor.d.tlua +9 -11
- package/types/igmodaudiochannel.d.tlua +40 -42
- package/types/imagecheckbox.d.tlua +2 -4
- package/types/imaterial.d.tlua +25 -27
- package/types/imesh.d.tlua +4 -6
- package/types/input.d.tlua +22 -25
- package/types/invalidateinternalentitycache.d.tlua +0 -1
- package/types/irestore.d.tlua +8 -10
- package/types/isave.d.tlua +8 -10
- package/types/itexture.d.tlua +9 -11
- package/types/ivideowriter.d.tlua +4 -6
- package/types/jit.d.tlua +16 -17
- package/types/killicon.d.tlua +7 -8
- package/types/label.d.tlua +0 -1
- package/types/language.d.tlua +1 -2
- package/types/list.d.tlua +8 -9
- package/types/makeballoon.d.tlua +0 -1
- package/types/markup.d.tlua +2 -3
- package/types/markupobject.d.tlua +4 -6
- package/types/material.d.tlua +0 -1
- package/types/math.d.tlua +83 -84
- package/types/matproxy.d.tlua +3 -4
- package/types/matselect.d.tlua +9 -11
- package/types/menu.d.tlua +0 -1
- package/types/menubar.d.tlua +2 -3
- package/types/mesh.d.tlua +19 -20
- package/types/modelimage.d.tlua +0 -1
- package/types/motionsensor.d.tlua +10 -11
- package/types/navmesh.d.tlua +26 -27
- package/types/net.d.tlua +51 -53
- package/types/nextbot.d.tlua +34 -37
- package/types/notification.d.tlua +2 -3
- package/types/npc.d.tlua +180 -182
- package/types/numpad.d.tlua +7 -8
- package/types/os.d.tlua +3 -5
- package/types/package.d.tlua +0 -1
- package/types/panel.d.tlua +329 -331
- package/types/panellist.d.tlua +0 -1
- package/types/pathfollower.d.tlua +30 -32
- package/types/permissions.d.tlua +6 -7
- package/types/physcollide.d.tlua +2 -4
- package/types/physenv.d.tlua +11 -12
- package/types/physobj.d.tlua +77 -79
- package/types/pixelvis_handle_t.d.tlua +0 -1
- package/types/player.d.tlua +288 -293
- package/types/player_manager.d.tlua +13 -14
- package/types/preseteditor.d.tlua +0 -1
- package/types/presets.d.tlua +6 -7
- package/types/projectedtexture.d.tlua +47 -49
- package/types/properties.d.tlua +5 -6
- package/types/propselect.d.tlua +3 -5
- package/types/radiobutton.d.tlua +0 -1
- package/types/render.d.tlua +142 -143
- package/types/resource.d.tlua +2 -3
- package/types/richtext.d.tlua +0 -1
- package/types/sandbox.d.tlua +52 -54
- package/types/saverestore.d.tlua +12 -13
- package/types/schedule.d.tlua +5 -7
- package/types/scripted_ents.d.tlua +9 -12
- package/types/search.d.tlua +1 -2
- package/types/serverlist.d.tlua +7 -8
- package/types/slidebar.d.tlua +0 -1
- package/types/slider.d.tlua +0 -1
- package/types/sound.d.tlua +10 -11
- package/types/spawnicon.d.tlua +6 -8
- package/types/spawnmenu.d.tlua +23 -25
- package/types/spawnmenucontentpanel.d.tlua +3 -5
- package/types/sql.d.tlua +9 -10
- package/types/stack.d.tlua +4 -6
- package/types/steamworks.d.tlua +18 -19
- package/types/string.d.tlua +46 -50
- package/types/structures.d.tlua +0 -7
- package/types/surface.d.tlua +34 -35
- package/types/surfaceinfo.d.tlua +4 -6
- package/types/system.d.tlua +10 -11
- package/types/table.d.tlua +45 -48
- package/types/task.d.tlua +8 -10
- package/types/team.d.tlua +19 -20
- package/types/textentry.d.tlua +0 -1
- package/types/tgaimage.d.tlua +0 -1
- package/types/timer.d.tlua +14 -15
- package/types/tool.d.tlua +42 -46
- package/types/ugcpublishwindow.d.tlua +7 -9
- package/types/umsg.d.tlua +12 -13
- package/types/undo.d.tlua +10 -11
- package/types/urllabel.d.tlua +0 -1
- package/types/usermessage.d.tlua +2 -3
- package/types/utf8.d.tlua +7 -8
- package/types/util.d.tlua +90 -95
- package/types/vector.d.tlua +36 -37
- package/types/vehicle.d.tlua +48 -51
- package/types/vgui.d.tlua +14 -19
- package/types/video.d.tlua +0 -1
- package/types/vmatrix.d.tlua +35 -36
- package/types/weapon.d.tlua +81 -84
- package/types/weapons.d.tlua +5 -7
- package/types/widgets.d.tlua +1 -2
- package/types/workshopfilebase.d.tlua +4 -6
package/types/net.d.tlua
CHANGED
|
@@ -18,6 +18,7 @@ interface NetLib {
|
|
|
18
18
|
* @source https://wiki.facepunch.com/gmod/net.Abort
|
|
19
19
|
*/
|
|
20
20
|
Abort(): void;
|
|
21
|
+
|
|
21
22
|
/**
|
|
22
23
|
* Sends the currently built net message (see [net.Start](https://wiki.facepunch.com/gmod/net.Start)) to all connected players.
|
|
23
24
|
* More information can be found in [Net Library Usage](https://wiki.facepunch.com/gmod/Net_Library_Usage).
|
|
@@ -26,6 +27,7 @@ interface NetLib {
|
|
|
26
27
|
* @source https://wiki.facepunch.com/gmod/net.Broadcast
|
|
27
28
|
*/
|
|
28
29
|
Broadcast(): void;
|
|
30
|
+
|
|
29
31
|
/**
|
|
30
32
|
* Returns the amount of data left to read in the current message. Does nothing when sending data.
|
|
31
33
|
*
|
|
@@ -33,6 +35,7 @@ interface NetLib {
|
|
|
33
35
|
* @source https://wiki.facepunch.com/gmod/net.BytesLeft
|
|
34
36
|
*/
|
|
35
37
|
BytesLeft(): (number, number);
|
|
38
|
+
|
|
36
39
|
/**
|
|
37
40
|
* Returns the size of the current message.
|
|
38
41
|
*
|
|
@@ -43,6 +46,7 @@ interface NetLib {
|
|
|
43
46
|
* @source https://wiki.facepunch.com/gmod/net.BytesWritten
|
|
44
47
|
*/
|
|
45
48
|
BytesWritten(): (number, number);
|
|
49
|
+
|
|
46
50
|
/**
|
|
47
51
|
* **INTERNAL**: You may be looking for [net.Receive](https://wiki.facepunch.com/gmod/net.Receive).
|
|
48
52
|
*
|
|
@@ -53,6 +57,7 @@ interface NetLib {
|
|
|
53
57
|
* @source https://wiki.facepunch.com/gmod/net.Incoming
|
|
54
58
|
*/
|
|
55
59
|
Incoming(length: number, client: Player): void;
|
|
60
|
+
|
|
56
61
|
/**
|
|
57
62
|
* Reads an angle from the received net message.
|
|
58
63
|
*
|
|
@@ -63,6 +68,7 @@ interface NetLib {
|
|
|
63
68
|
* @source https://wiki.facepunch.com/gmod/net.ReadAngle
|
|
64
69
|
*/
|
|
65
70
|
ReadAngle(): Angle;
|
|
71
|
+
|
|
66
72
|
/**
|
|
67
73
|
* Reads a bit from the received net message.
|
|
68
74
|
*
|
|
@@ -73,6 +79,7 @@ interface NetLib {
|
|
|
73
79
|
* @source https://wiki.facepunch.com/gmod/net.ReadBit
|
|
74
80
|
*/
|
|
75
81
|
ReadBit(): number;
|
|
82
|
+
|
|
76
83
|
/**
|
|
77
84
|
* Reads a boolean from the received net message.
|
|
78
85
|
*
|
|
@@ -83,6 +90,7 @@ interface NetLib {
|
|
|
83
90
|
* @source https://wiki.facepunch.com/gmod/net.ReadBool
|
|
84
91
|
*/
|
|
85
92
|
ReadBool(): boolean;
|
|
93
|
+
|
|
86
94
|
/**
|
|
87
95
|
* Reads a [Color](https://wiki.facepunch.com/gmod/Color) from the current net message.
|
|
88
96
|
*
|
|
@@ -93,6 +101,7 @@ interface NetLib {
|
|
|
93
101
|
* @source https://wiki.facepunch.com/gmod/net.ReadColor
|
|
94
102
|
*/
|
|
95
103
|
ReadColor(hasAlpha?: boolean): Color;
|
|
104
|
+
|
|
96
105
|
/**
|
|
97
106
|
* Reads pure binary data from the message.
|
|
98
107
|
*
|
|
@@ -103,6 +112,7 @@ interface NetLib {
|
|
|
103
112
|
* @source https://wiki.facepunch.com/gmod/net.ReadData
|
|
104
113
|
*/
|
|
105
114
|
ReadData(length: number): string;
|
|
115
|
+
|
|
106
116
|
/**
|
|
107
117
|
* Reads a double-precision number from the received net message.
|
|
108
118
|
*
|
|
@@ -113,6 +123,7 @@ interface NetLib {
|
|
|
113
123
|
* @source https://wiki.facepunch.com/gmod/net.ReadDouble
|
|
114
124
|
*/
|
|
115
125
|
ReadDouble(): number;
|
|
126
|
+
|
|
116
127
|
/**
|
|
117
128
|
* Reads an entity from the received net message. You should always check if the specified entity exists as it may have been removed and therefore `NULL` if it is outside of the players [PVS (Potential Visibility Set)](https://developer.valvesoftware.com/wiki/PVS "PVS - Valve Developer Community") or was already removed.
|
|
118
129
|
*
|
|
@@ -123,6 +134,7 @@ interface NetLib {
|
|
|
123
134
|
* @source https://wiki.facepunch.com/gmod/net.ReadEntity
|
|
124
135
|
*/
|
|
125
136
|
ReadEntity(): Entity;
|
|
137
|
+
|
|
126
138
|
/**
|
|
127
139
|
* Reads a floating point number from the received net message.
|
|
128
140
|
*
|
|
@@ -133,6 +145,7 @@ interface NetLib {
|
|
|
133
145
|
* @source https://wiki.facepunch.com/gmod/net.ReadFloat
|
|
134
146
|
*/
|
|
135
147
|
ReadFloat(): number;
|
|
148
|
+
|
|
136
149
|
/**
|
|
137
150
|
* **INTERNAL**: This is used internally - although you're able to use it you probably shouldn't.
|
|
138
151
|
*
|
|
@@ -143,6 +156,7 @@ interface NetLib {
|
|
|
143
156
|
* @source https://wiki.facepunch.com/gmod/net.ReadHeader
|
|
144
157
|
*/
|
|
145
158
|
ReadHeader(): number;
|
|
159
|
+
|
|
146
160
|
/**
|
|
147
161
|
* Reads an integer from the received net message.
|
|
148
162
|
*
|
|
@@ -153,6 +167,7 @@ interface NetLib {
|
|
|
153
167
|
* @source https://wiki.facepunch.com/gmod/net.ReadInt
|
|
154
168
|
*/
|
|
155
169
|
ReadInt(bitCount: number): number;
|
|
170
|
+
|
|
156
171
|
/**
|
|
157
172
|
* Reads a [VMatrix](https://wiki.facepunch.com/gmod/VMatrix) from the received net message.
|
|
158
173
|
* **WARNING**: You **must** read information in same order as you write it.
|
|
@@ -162,6 +177,7 @@ interface NetLib {
|
|
|
162
177
|
* @source https://wiki.facepunch.com/gmod/net.ReadMatrix
|
|
163
178
|
*/
|
|
164
179
|
ReadMatrix(): VMatrix;
|
|
180
|
+
|
|
165
181
|
/**
|
|
166
182
|
* Reads a normal vector from the net message.
|
|
167
183
|
*
|
|
@@ -172,6 +188,7 @@ interface NetLib {
|
|
|
172
188
|
* @source https://wiki.facepunch.com/gmod/net.ReadNormal
|
|
173
189
|
*/
|
|
174
190
|
ReadNormal(): Vector;
|
|
191
|
+
|
|
175
192
|
/**
|
|
176
193
|
* Reads a player entity that was written with [net.WritePlayer](https://wiki.facepunch.com/gmod/net.WritePlayer) from the received net message.
|
|
177
194
|
*
|
|
@@ -184,6 +201,7 @@ interface NetLib {
|
|
|
184
201
|
* @source https://wiki.facepunch.com/gmod/net.ReadPlayer
|
|
185
202
|
*/
|
|
186
203
|
ReadPlayer(): Player;
|
|
204
|
+
|
|
187
205
|
/**
|
|
188
206
|
* Reads a [null-terminated string](https://en.wikipedia.org/wiki/Null-terminated_string) from the net stream. The size of the string is 8 bits plus 8 bits for every ASCII character in the string.
|
|
189
207
|
*
|
|
@@ -194,6 +212,7 @@ interface NetLib {
|
|
|
194
212
|
* @source https://wiki.facepunch.com/gmod/net.ReadString
|
|
195
213
|
*/
|
|
196
214
|
ReadString(): string;
|
|
215
|
+
|
|
197
216
|
/**
|
|
198
217
|
* Reads a table from the received net message. See net.WriteTable for extra
|
|
199
218
|
* info.
|
|
@@ -206,6 +225,7 @@ interface NetLib {
|
|
|
206
225
|
* @source https://wiki.facepunch.com/gmod/net.ReadTable
|
|
207
226
|
*/
|
|
208
227
|
ReadTable(sequential?: boolean): Table<any, any>;
|
|
228
|
+
|
|
209
229
|
/**
|
|
210
230
|
* **INTERNAL**: Used internally by [net.ReadTable](https://wiki.facepunch.com/gmod/net.ReadTable).
|
|
211
231
|
*
|
|
@@ -219,6 +239,7 @@ interface NetLib {
|
|
|
219
239
|
* @source https://wiki.facepunch.com/gmod/net.ReadType
|
|
220
240
|
*/
|
|
221
241
|
ReadType(typeID?: number): any;
|
|
242
|
+
|
|
222
243
|
/**
|
|
223
244
|
* Reads an unsigned integer with the specified number of bits from the received net message.
|
|
224
245
|
*
|
|
@@ -229,6 +250,7 @@ interface NetLib {
|
|
|
229
250
|
* @source https://wiki.facepunch.com/gmod/net.ReadUInt
|
|
230
251
|
*/
|
|
231
252
|
ReadUInt(bitCount: number): number;
|
|
253
|
+
|
|
232
254
|
/**
|
|
233
255
|
* Reads a unsigned integer with 64 bits from the received net message.
|
|
234
256
|
*
|
|
@@ -239,6 +261,7 @@ interface NetLib {
|
|
|
239
261
|
* @source https://wiki.facepunch.com/gmod/net.ReadUInt64
|
|
240
262
|
*/
|
|
241
263
|
ReadUInt64(): string;
|
|
264
|
+
|
|
242
265
|
/**
|
|
243
266
|
* Reads a vector from the received net message. Vectors sent by this function are **compressed**, which may result in precision loss. See [net.WriteVector](https://wiki.facepunch.com/gmod/net.WriteVector) for more information.
|
|
244
267
|
*
|
|
@@ -249,6 +272,7 @@ interface NetLib {
|
|
|
249
272
|
* @source https://wiki.facepunch.com/gmod/net.ReadVector
|
|
250
273
|
*/
|
|
251
274
|
ReadVector(): Vector;
|
|
275
|
+
|
|
252
276
|
/**
|
|
253
277
|
* Adds a net message handler. Only one receiver can be used to receive the net message.
|
|
254
278
|
*
|
|
@@ -265,14 +289,18 @@ interface NetLib {
|
|
|
265
289
|
* @source https://wiki.facepunch.com/gmod/net.Receive
|
|
266
290
|
*/
|
|
267
291
|
Receive(messageName: string, callback: (len: number, ply: Player) => void): void;
|
|
292
|
+
|
|
268
293
|
/**
|
|
269
294
|
* Sends the current net message to the specified player(s)
|
|
270
295
|
* @realm server
|
|
271
296
|
* @source https://wiki.facepunch.com/gmod/net.Send
|
|
272
297
|
*/
|
|
273
298
|
Send(ply: Player): void;
|
|
299
|
+
|
|
274
300
|
Send(plys: Player[]): void;
|
|
301
|
+
|
|
275
302
|
Send(filter: CRecipientFilter): void;
|
|
303
|
+
|
|
276
304
|
/**
|
|
277
305
|
* Sends the current message (see [net.Start](https://wiki.facepunch.com/gmod/net.Start)) to all except the player or players specified.
|
|
278
306
|
*
|
|
@@ -280,19 +308,23 @@ interface NetLib {
|
|
|
280
308
|
* @source https://wiki.facepunch.com/gmod/net.SendOmit
|
|
281
309
|
*/
|
|
282
310
|
SendOmit(ply: Player): void;
|
|
311
|
+
|
|
283
312
|
SendOmit(plys: Player[]): void;
|
|
313
|
+
|
|
284
314
|
/**
|
|
285
315
|
* Sends current net message (see [net.Start](https://wiki.facepunch.com/gmod/net.Start)) to all players that are in the same [Potentially Audible Set (PAS)](https://developer.valvesoftware.com/wiki/PAS) as the position, or simply said, it adds all players that can potentially hear sounds from this position.
|
|
286
316
|
* @realm server
|
|
287
317
|
* @source https://wiki.facepunch.com/gmod/net.SendPAS
|
|
288
318
|
*/
|
|
289
319
|
SendPAS(position: Vector): void;
|
|
320
|
+
|
|
290
321
|
/**
|
|
291
322
|
* Sends current net message (see [net.Start](https://wiki.facepunch.com/gmod/net.Start)) to all players in the [PVS (Potential Visibility Set)](https://developer.valvesoftware.com/wiki/PVS "PVS - Valve Developer Community") of the position, or, more simply said, sends the message to players that can potentially see this position.
|
|
292
323
|
* @realm server
|
|
293
324
|
* @source https://wiki.facepunch.com/gmod/net.SendPVS
|
|
294
325
|
*/
|
|
295
326
|
SendPVS(position: Vector): void;
|
|
327
|
+
|
|
296
328
|
/**
|
|
297
329
|
* Sends the current net message (see [net.Start](https://wiki.facepunch.com/gmod/net.Start)) to the server. The player object must exist on the server for the net message to be received successfully by the server.
|
|
298
330
|
*
|
|
@@ -305,6 +337,7 @@ interface NetLib {
|
|
|
305
337
|
* @source https://wiki.facepunch.com/gmod/net.SendToServer
|
|
306
338
|
*/
|
|
307
339
|
SendToServer(): void;
|
|
340
|
+
|
|
308
341
|
/**
|
|
309
342
|
* Begins a new net message. If another net message is already started and hasn't been sent yet, it will be discarded.
|
|
310
343
|
*
|
|
@@ -330,12 +363,14 @@ interface NetLib {
|
|
|
330
363
|
* @source https://wiki.facepunch.com/gmod/net.Start
|
|
331
364
|
*/
|
|
332
365
|
Start(messageName: string, unreliable?: boolean): boolean;
|
|
366
|
+
|
|
333
367
|
/**
|
|
334
368
|
* Writes an angle to the current net message.
|
|
335
369
|
* @realm shared
|
|
336
370
|
* @source https://wiki.facepunch.com/gmod/net.WriteAngle
|
|
337
371
|
*/
|
|
338
372
|
WriteAngle(angle: Angle): void;
|
|
373
|
+
|
|
339
374
|
/**
|
|
340
375
|
* Appends a boolean (as `1` or `0`) to the current net message.
|
|
341
376
|
*
|
|
@@ -345,30 +380,35 @@ interface NetLib {
|
|
|
345
380
|
* @source https://wiki.facepunch.com/gmod/net.WriteBit
|
|
346
381
|
*/
|
|
347
382
|
WriteBit(boolean: boolean): void;
|
|
383
|
+
|
|
348
384
|
/**
|
|
349
385
|
* Appends a boolean to the current net message. Alias of [net.WriteBit](https://wiki.facepunch.com/gmod/net.WriteBit).
|
|
350
386
|
* @realm shared
|
|
351
387
|
* @source https://wiki.facepunch.com/gmod/net.WriteBool
|
|
352
388
|
*/
|
|
353
389
|
WriteBool(boolean: boolean): void;
|
|
390
|
+
|
|
354
391
|
/**
|
|
355
392
|
* Appends a [Color](https://wiki.facepunch.com/gmod/Color) to the current net message.
|
|
356
393
|
* @realm shared
|
|
357
394
|
* @source https://wiki.facepunch.com/gmod/net.WriteColor
|
|
358
395
|
*/
|
|
359
396
|
WriteColor(Color: Color, writeAlpha?: boolean): void;
|
|
397
|
+
|
|
360
398
|
/**
|
|
361
399
|
* Writes a chunk of binary data to the message.
|
|
362
400
|
* @realm shared
|
|
363
401
|
* @source https://wiki.facepunch.com/gmod/net.WriteData
|
|
364
402
|
*/
|
|
365
403
|
WriteData(binaryData: string, length?: number): void;
|
|
404
|
+
|
|
366
405
|
/**
|
|
367
406
|
* Appends a double-precision number to the current net message.
|
|
368
407
|
* @realm shared
|
|
369
408
|
* @source https://wiki.facepunch.com/gmod/net.WriteDouble
|
|
370
409
|
*/
|
|
371
410
|
WriteDouble(double: number): void;
|
|
411
|
+
|
|
372
412
|
/**
|
|
373
413
|
* Appends an entity to the current net message using its [Entity:EntIndex](https://wiki.facepunch.com/gmod/Entity:EntIndex).
|
|
374
414
|
*
|
|
@@ -378,12 +418,14 @@ interface NetLib {
|
|
|
378
418
|
* @source https://wiki.facepunch.com/gmod/net.WriteEntity
|
|
379
419
|
*/
|
|
380
420
|
WriteEntity(entity: Entity): void;
|
|
421
|
+
|
|
381
422
|
/**
|
|
382
423
|
* Appends a float (number with decimals) to the current net message.
|
|
383
424
|
* @realm shared
|
|
384
425
|
* @source https://wiki.facepunch.com/gmod/net.WriteFloat
|
|
385
426
|
*/
|
|
386
427
|
WriteFloat(float: number): void;
|
|
428
|
+
|
|
387
429
|
/**
|
|
388
430
|
* Appends a signed integer - a whole number, positive/negative - to the current net message. Can be read back with [net.ReadInt](https://wiki.facepunch.com/gmod/net.ReadInt) on the receiving end.
|
|
389
431
|
*
|
|
@@ -393,12 +435,14 @@ interface NetLib {
|
|
|
393
435
|
* @source https://wiki.facepunch.com/gmod/net.WriteInt
|
|
394
436
|
*/
|
|
395
437
|
WriteInt(integer: number, bitCount: number): void;
|
|
438
|
+
|
|
396
439
|
/**
|
|
397
440
|
* Writes a [VMatrix](https://wiki.facepunch.com/gmod/VMatrix) to the current net message.
|
|
398
441
|
* @realm shared
|
|
399
442
|
* @source https://wiki.facepunch.com/gmod/net.WriteMatrix
|
|
400
443
|
*/
|
|
401
444
|
WriteMatrix(matrix: VMatrix): void;
|
|
445
|
+
|
|
402
446
|
/**
|
|
403
447
|
* Writes a normalized/direction vector ( Vector with length of 1 ) to the net message.
|
|
404
448
|
*
|
|
@@ -408,6 +452,7 @@ interface NetLib {
|
|
|
408
452
|
* @source https://wiki.facepunch.com/gmod/net.WriteNormal
|
|
409
453
|
*/
|
|
410
454
|
WriteNormal(normal: Vector): void;
|
|
455
|
+
|
|
411
456
|
/**
|
|
412
457
|
* Appends a player entity to the current net message using its [Entity:EntIndex](https://wiki.facepunch.com/gmod/Entity:EntIndex). This saves a small amount of network bandwidth over [net.WriteEntity](https://wiki.facepunch.com/gmod/net.WriteEntity).
|
|
413
458
|
*
|
|
@@ -416,6 +461,7 @@ interface NetLib {
|
|
|
416
461
|
* @source https://wiki.facepunch.com/gmod/net.WritePlayer
|
|
417
462
|
*/
|
|
418
463
|
WritePlayer(ply: Player): void;
|
|
464
|
+
|
|
419
465
|
/**
|
|
420
466
|
* Appends a string to the current net message. The size of the written data is 8 bits for every ASCII character in the string + 8 bits for the null terminator.
|
|
421
467
|
*
|
|
@@ -425,6 +471,7 @@ interface NetLib {
|
|
|
425
471
|
* @source https://wiki.facepunch.com/gmod/net.WriteString
|
|
426
472
|
*/
|
|
427
473
|
WriteString(string: string): void;
|
|
474
|
+
|
|
428
475
|
/**
|
|
429
476
|
* Appends a table to the current net message. Adds **16 extra bits** per key/value pair, so you're better off writing each individual key/value as the exact type if possible.
|
|
430
477
|
*
|
|
@@ -435,6 +482,7 @@ interface NetLib {
|
|
|
435
482
|
* @source https://wiki.facepunch.com/gmod/net.WriteTable
|
|
436
483
|
*/
|
|
437
484
|
WriteTable(table: table, sequential?: boolean): void;
|
|
485
|
+
|
|
438
486
|
/**
|
|
439
487
|
* **INTERNAL**: Used internally by [net.WriteTable](https://wiki.facepunch.com/gmod/net.WriteTable).
|
|
440
488
|
*
|
|
@@ -448,6 +496,7 @@ interface NetLib {
|
|
|
448
496
|
* @source https://wiki.facepunch.com/gmod/net.WriteType
|
|
449
497
|
*/
|
|
450
498
|
WriteType(Data: any): void;
|
|
499
|
+
|
|
451
500
|
/**
|
|
452
501
|
* Appends an unsigned integer with the specified number of bits to the current net message.
|
|
453
502
|
*
|
|
@@ -460,6 +509,7 @@ interface NetLib {
|
|
|
460
509
|
* @source https://wiki.facepunch.com/gmod/net.WriteUInt
|
|
461
510
|
*/
|
|
462
511
|
WriteUInt(unsignedInteger: number, bitCount: number): void;
|
|
512
|
+
|
|
463
513
|
/**
|
|
464
514
|
* Appends an unsigned integer with 64 bits to the current net message.
|
|
465
515
|
*
|
|
@@ -473,6 +523,7 @@ interface NetLib {
|
|
|
473
523
|
* @source https://wiki.facepunch.com/gmod/net.WriteUInt64
|
|
474
524
|
*/
|
|
475
525
|
WriteUInt64(uint64: string): void;
|
|
526
|
+
|
|
476
527
|
/**
|
|
477
528
|
* Appends a vector to the current net message.
|
|
478
529
|
* Vectors sent by this function are compressed, which may result in precision loss. XYZ components greater than `16384` or less than `-16384` are irrecoverably altered (most significant bits are trimmed) and precision after the decimal point is 1 digit (5 bits).
|
|
@@ -482,56 +533,3 @@ interface NetLib {
|
|
|
482
533
|
*/
|
|
483
534
|
WriteVector(vector: Vector): void;
|
|
484
535
|
}
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|