@tlua/gmod 1.0.3 → 1.0.5
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/index.d.tlua +1 -0
- package/package.json +1 -1
- package/types/achievements.d.tlua +15 -45
- package/types/ai.d.tlua +5 -15
- package/types/angle.d.tlua +18 -54
- package/types/baseclass.d.tlua +2 -4
- package/types/bf_read.d.tlua +11 -32
- package/types/bit.d.tlua +11 -33
- package/types/cam.d.tlua +16 -48
- package/types/ceffectdata.d.tlua +32 -95
- package/types/chat.d.tlua +5 -15
- package/types/cleanup.d.tlua +7 -21
- package/types/cluaemitter.d.tlua +12 -35
- package/types/clualocomotion.d.tlua +40 -119
- package/types/cluaparticle.d.tlua +44 -131
- package/types/cmovedata.d.tlua +47 -140
- package/types/cnavarea.d.tlua +77 -230
- package/types/cnavladder.d.tlua +22 -65
- package/types/cnewparticleeffect.d.tlua +26 -77
- package/types/color.d.tlua +28 -84
- package/types/concommand.d.tlua +4 -12
- package/types/constraint.d.tlua +28 -84
- package/types/construct.d.tlua +1 -3
- package/types/contentheader.d.tlua +3 -6
- package/types/contenticon.d.tlua +9 -24
- package/types/contentsidebar.d.tlua +4 -9
- package/types/contextbase.d.tlua +4 -9
- package/types/controlpanel.d.tlua +18 -40
- package/types/controlpresets.d.tlua +13 -36
- package/types/convar.d.tlua +16 -47
- package/types/cookie.d.tlua +3 -9
- package/types/coroutine.d.tlua +7 -21
- package/types/crecipientfilter.d.tlua +16 -47
- package/types/csoundpatch.d.tlua +14 -41
- package/types/ctakedamageinfo.d.tlua +33 -98
- package/types/ctrlnumpad.d.tlua +6 -17
- package/types/cusercmd.d.tlua +27 -80
- package/types/cvars.d.tlua +6 -18
- package/types/dadjustablemodelpanel.d.tlua +7 -18
- package/types/dalphabar.d.tlua +3 -6
- package/types/dbinder.d.tlua +4 -9
- package/types/dbubblecontainer.d.tlua +2 -3
- package/types/dbutton.d.tlua +8 -21
- package/types/dcheckbox.d.tlua +5 -12
- package/types/dcheckboxlabel.d.tlua +9 -27
- package/types/dcollapsiblecategory.d.tlua +23 -66
- package/types/dcolorbutton.d.tlua +7 -18
- package/types/dcolorcombo.d.tlua +5 -12
- package/types/dcolorcube.d.tlua +13 -36
- package/types/dcolormixer.d.tlua +27 -78
- package/types/dcolorpalette.d.tlua +23 -66
- package/types/dcolumnsheet.d.tlua +5 -12
- package/types/dcombobox.d.tlua +17 -48
- package/types/ddragbase.d.tlua +13 -36
- package/types/ddrawer.d.tlua +8 -21
- package/types/debug.d.tlua +44 -76
- package/types/debugoverlay.d.tlua +11 -33
- package/types/dentityproperties.d.tlua +5 -12
- package/types/derma.d.tlua +10 -30
- package/types/dexpandbutton.d.tlua +3 -6
- package/types/dfilebrowser.d.tlua +20 -60
- package/types/dform.d.tlua +18 -51
- package/types/dframe.d.tlua +24 -72
- package/types/dgrid.d.tlua +11 -30
- package/types/dhorizontaldivider.d.tlua +20 -57
- package/types/dhorizontalscroller.d.tlua +11 -30
- package/types/dhscrollbar.d.tlua +11 -30
- package/types/dhtml.d.tlua +8 -21
- package/types/dhtmlcontrols.d.tlua +5 -15
- package/types/diconbrowser.d.tlua +11 -30
- package/types/diconlayout.d.tlua +18 -51
- package/types/dimage.d.tlua +20 -55
- package/types/dimagebutton.d.tlua +9 -27
- package/types/dlabel.d.tlua +33 -96
- package/types/dlabeleditable.d.tlua +5 -12
- package/types/dlabelurl.d.tlua +10 -27
- package/types/dlistbox.d.tlua +8 -21
- package/types/dlistboxitem.d.tlua +4 -9
- package/types/dlistview.d.tlua +34 -99
- package/types/dlistview_column.d.tlua +14 -39
- package/types/dlistview_line.d.tlua +13 -36
- package/types/dmenu.d.tlua +28 -75
- package/types/dmenubar.d.tlua +6 -11
- package/types/dmenuoption.d.tlua +13 -36
- package/types/dmenuoptioncvar.d.tlua +6 -15
- package/types/dmodelpanel.d.tlua +22 -63
- package/types/dmodelselect.d.tlua +2 -3
- package/types/dmodelselectmulti.d.tlua +2 -3
- package/types/dnotify.d.tlua +10 -27
- package/types/dnumberscratch.d.tlua +26 -75
- package/types/dnumberwang.d.tlua +16 -45
- package/types/dnumslider.d.tlua +17 -51
- package/types/dpanel.d.tlua +14 -39
- package/types/dpanellist.d.tlua +11 -33
- package/types/dpaneloverlay.d.tlua +7 -18
- package/types/dpanpanel.d.tlua +6 -15
- package/types/dprogress.d.tlua +3 -6
- package/types/dproperties.d.tlua +4 -9
- package/types/dproperty_combo.d.tlua +3 -6
- package/types/dproperty_generic.d.tlua +5 -12
- package/types/dpropertysheet.d.tlua +26 -56
- package/types/dragndrop.d.tlua +10 -30
- package/types/draw.d.tlua +11 -31
- package/types/drgbpicker.d.tlua +4 -9
- package/types/drive.d.tlua +18 -41
- package/types/dscrollpanel.d.tlua +10 -30
- package/types/dshape.d.tlua +7 -18
- package/types/dsizetocontents.d.tlua +5 -12
- package/types/dslider.d.tlua +28 -81
- package/types/dsprite.d.tlua +9 -24
- package/types/dtab.d.tlua +8 -21
- package/types/dtextentry.d.tlua +43 -126
- package/types/dtilelayout.d.tlua +21 -60
- package/types/dtooltip.d.tlua +6 -15
- package/types/dtree.d.tlua +16 -45
- package/types/dtree_node.d.tlua +68 -201
- package/types/duplicator.d.tlua +30 -88
- package/types/dverticaldivider.d.tlua +23 -66
- package/types/dvscrollbar.d.tlua +11 -30
- package/types/effect.d.tlua +4 -9
- package/types/effects.d.tlua +6 -18
- package/types/engine.d.tlua +21 -63
- package/types/entity.d.tlua +676 -1962
- package/types/ents.d.tlua +23 -61
- package/types/file.d.tlua +39 -117
- package/types/frame_blend.d.tlua +7 -21
- package/types/game.d.tlua +39 -117
- package/types/gameevent.d.tlua +4 -8
- package/types/gamemode.d.tlua +3 -7
- package/types/gm.d.tlua +267 -800
- package/types/gmsave.d.tlua +4 -12
- package/types/gui.d.tlua +21 -63
- package/types/gwen.d.tlua +3 -9
- package/types/halo.d.tlua +2 -6
- package/types/hook.d.tlua +8 -17
- package/types/hook_events.d.tlua +2412 -0
- package/types/http.d.tlua +1 -3
- package/types/iconeditor.d.tlua +11 -30
- package/types/igmodaudiochannel.d.tlua +41 -122
- package/types/imagecheckbox.d.tlua +4 -9
- package/types/imaterial.d.tlua +26 -77
- package/types/imesh.d.tlua +5 -14
- package/types/input.d.tlua +24 -68
- package/types/irestore.d.tlua +9 -26
- package/types/isave.d.tlua +9 -26
- package/types/itexture.d.tlua +10 -29
- package/types/ivideowriter.d.tlua +5 -14
- package/types/jit.d.tlua +21 -53
- package/types/killicon.d.tlua +7 -21
- package/types/language.d.tlua +1 -3
- package/types/list.d.tlua +8 -24
- package/types/markup.d.tlua +2 -6
- package/types/markupobject.d.tlua +5 -14
- package/types/math.d.tlua +277 -447
- package/types/matproxy.d.tlua +3 -9
- package/types/matselect.d.tlua +11 -30
- package/types/menubar.d.tlua +2 -6
- package/types/mesh.d.tlua +19 -57
- package/types/motionsensor.d.tlua +10 -30
- package/types/navmesh.d.tlua +26 -78
- package/types/net.d.tlua +52 -154
- package/types/nextbot.d.tlua +46 -116
- package/types/notification.d.tlua +2 -6
- package/types/npc.d.tlua +182 -543
- package/types/numpad.d.tlua +7 -21
- package/types/os.d.tlua +4 -10
- package/types/panel.d.tlua +333 -991
- package/types/pathfollower.d.tlua +31 -92
- package/types/permissions.d.tlua +6 -18
- package/types/physcollide.d.tlua +3 -8
- package/types/physenv.d.tlua +11 -33
- package/types/physobj.d.tlua +78 -233
- package/types/player.d.tlua +302 -880
- package/types/player_manager.d.tlua +13 -39
- package/types/presets.d.tlua +6 -18
- package/types/projectedtexture.d.tlua +48 -143
- package/types/properties.d.tlua +5 -15
- package/types/propselect.d.tlua +5 -12
- package/types/render.d.tlua +142 -426
- package/types/resource.d.tlua +2 -6
- package/types/sandbox.d.tlua +54 -159
- package/types/saverestore.d.tlua +12 -36
- package/types/schedule.d.tlua +6 -17
- package/types/scripted_ents.d.tlua +11 -29
- package/types/search.d.tlua +1 -3
- package/types/serverlist.d.tlua +7 -21
- package/types/sound.d.tlua +10 -30
- package/types/spawnicon.d.tlua +8 -21
- package/types/spawnmenu.d.tlua +24 -70
- package/types/spawnmenucontentpanel.d.tlua +5 -12
- package/types/sql.d.tlua +9 -27
- package/types/stack.d.tlua +5 -14
- package/types/steamworks.d.tlua +18 -54
- package/types/string.d.tlua +49 -141
- package/types/surface.d.tlua +34 -102
- package/types/surfaceinfo.d.tlua +5 -14
- package/types/system.d.tlua +10 -30
- package/types/table.d.tlua +47 -137
- package/types/task.d.tlua +9 -26
- package/types/team.d.tlua +19 -57
- package/types/timer.d.tlua +14 -42
- package/types/tool.d.tlua +46 -131
- package/types/ugcpublishwindow.d.tlua +9 -24
- package/types/umsg.d.tlua +12 -36
- package/types/undo.d.tlua +10 -30
- package/types/usermessage.d.tlua +2 -6
- package/types/utf8.d.tlua +7 -21
- package/types/util.d.tlua +94 -274
- package/types/vector.d.tlua +36 -108
- package/types/vehicle.d.tlua +52 -149
- package/types/vgui.d.tlua +18 -46
- package/types/vmatrix.d.tlua +35 -105
- package/types/weapon.d.tlua +85 -248
- package/types/weapons.d.tlua +6 -16
- package/types/widgets.d.tlua +1 -3
- package/types/workshopfilebase.d.tlua +5 -14
package/index.d.tlua
CHANGED
|
@@ -175,6 +175,7 @@
|
|
|
175
175
|
/// <reference path="./types/halo.d.tlua" />
|
|
176
176
|
/// <reference path="./types/hammer.d.tlua" />
|
|
177
177
|
/// <reference path="./types/hook.d.tlua" />
|
|
178
|
+
/// <reference path="./types/hook_events.d.tlua" />
|
|
178
179
|
/// <reference path="./types/html.d.tlua" />
|
|
179
180
|
/// <reference path="./types/http.d.tlua" />
|
|
180
181
|
/// <reference path="./types/iconeditor.d.tlua" />
|
package/package.json
CHANGED
|
@@ -14,18 +14,12 @@ interface AchievementsLib {
|
|
|
14
14
|
* @source https://wiki.facepunch.com/gmod/achievements.BalloonPopped
|
|
15
15
|
*/
|
|
16
16
|
BalloonPopped(): void;
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
interface AchievementsLib {
|
|
20
17
|
/**
|
|
21
18
|
* Returns the amount of achievements currently in Garry's Mod.
|
|
22
19
|
* @realm client and menu
|
|
23
20
|
* @source https://wiki.facepunch.com/gmod/achievements.Count
|
|
24
21
|
*/
|
|
25
22
|
Count(): number;
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
interface AchievementsLib {
|
|
29
23
|
/**
|
|
30
24
|
* **INTERNAL**: This is used internally - although you're able to use it you probably shouldn't.
|
|
31
25
|
* Adds one to the count of balls eaten. Once this count reaches 200, the 'Ball Eater' achievement is unlocked.
|
|
@@ -33,45 +27,30 @@ interface AchievementsLib {
|
|
|
33
27
|
* @source https://wiki.facepunch.com/gmod/achievements.EatBall
|
|
34
28
|
*/
|
|
35
29
|
EatBall(): void;
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
interface AchievementsLib {
|
|
39
30
|
/**
|
|
40
31
|
* Retrieves progress of given achievement.
|
|
41
32
|
* @realm client and menu
|
|
42
33
|
* @source https://wiki.facepunch.com/gmod/achievements.GetCount
|
|
43
34
|
*/
|
|
44
35
|
GetCount(achievementID: number): number;
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
interface AchievementsLib {
|
|
48
36
|
/**
|
|
49
37
|
* Retrieves the description of the given achievement.
|
|
50
38
|
* @realm client and menu
|
|
51
39
|
* @source https://wiki.facepunch.com/gmod/achievements.GetDesc
|
|
52
40
|
*/
|
|
53
41
|
GetDesc(achievementID: number): string;
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
interface AchievementsLib {
|
|
57
42
|
/**
|
|
58
43
|
* Retrieves the end progress goal of the given achievement.
|
|
59
44
|
* @realm client and menu
|
|
60
45
|
* @source https://wiki.facepunch.com/gmod/achievements.GetGoal
|
|
61
46
|
*/
|
|
62
47
|
GetGoal(achievementID: number): number;
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
interface AchievementsLib {
|
|
66
48
|
/**
|
|
67
49
|
* Retrieves the name of the given achievement.
|
|
68
50
|
* @realm client and menu
|
|
69
51
|
* @source https://wiki.facepunch.com/gmod/achievements.GetName
|
|
70
52
|
*/
|
|
71
53
|
GetName(achievementID: number): string;
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
interface AchievementsLib {
|
|
75
54
|
/**
|
|
76
55
|
* **INTERNAL**: This is used internally - although you're able to use it you probably shouldn't.
|
|
77
56
|
* Adds one to the count of baddies killed. Once this count reaches 1000, the 'War Zone' achievement is unlocked.
|
|
@@ -79,9 +58,6 @@ interface AchievementsLib {
|
|
|
79
58
|
* @source https://wiki.facepunch.com/gmod/achievements.IncBaddies
|
|
80
59
|
*/
|
|
81
60
|
IncBaddies(): void;
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
interface AchievementsLib {
|
|
85
61
|
/**
|
|
86
62
|
* **INTERNAL**: This is used internally - although you're able to use it you probably shouldn't.
|
|
87
63
|
* Adds one to the count of innocent animals killed. Once this count reaches 1000, the 'Innocent Bystander' achievement is unlocked.
|
|
@@ -89,9 +65,6 @@ interface AchievementsLib {
|
|
|
89
65
|
* @source https://wiki.facepunch.com/gmod/achievements.IncBystander
|
|
90
66
|
*/
|
|
91
67
|
IncBystander(): void;
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
interface AchievementsLib {
|
|
95
68
|
/**
|
|
96
69
|
* **INTERNAL**: This is used internally - although you're able to use it you probably shouldn't.
|
|
97
70
|
* Adds one to the count of friendly NPCs killed. Once this count reaches 1000, the 'Bad Friend' achievement is unlocked.
|
|
@@ -99,18 +72,12 @@ interface AchievementsLib {
|
|
|
99
72
|
* @source https://wiki.facepunch.com/gmod/achievements.IncGoodies
|
|
100
73
|
*/
|
|
101
74
|
IncGoodies(): void;
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
interface AchievementsLib {
|
|
105
75
|
/**
|
|
106
76
|
* Returns whether the given achievement is obtained or not.
|
|
107
77
|
* @realm client and menu
|
|
108
78
|
* @source https://wiki.facepunch.com/gmod/achievements.IsAchieved
|
|
109
79
|
*/
|
|
110
80
|
IsAchieved(achievementID: number): boolean;
|
|
111
|
-
}
|
|
112
|
-
|
|
113
|
-
interface AchievementsLib {
|
|
114
81
|
/**
|
|
115
82
|
* **INTERNAL**: This is used internally - although you're able to use it you probably shouldn't.
|
|
116
83
|
* Adds one to the count of things removed. Once this count reaches 5000, the 'Destroyer' achievement is unlocked.
|
|
@@ -118,9 +85,6 @@ interface AchievementsLib {
|
|
|
118
85
|
* @source https://wiki.facepunch.com/gmod/achievements.Remover
|
|
119
86
|
*/
|
|
120
87
|
Remover(): void;
|
|
121
|
-
}
|
|
122
|
-
|
|
123
|
-
interface AchievementsLib {
|
|
124
88
|
/**
|
|
125
89
|
* **INTERNAL**: This is used internally - although you're able to use it you probably shouldn't.
|
|
126
90
|
* Adds one to the count of how many times the spawnmenu has been opened. Once this count reaches 100,000, the 'Menu User' achievement is unlocked.
|
|
@@ -128,9 +92,6 @@ interface AchievementsLib {
|
|
|
128
92
|
* @source https://wiki.facepunch.com/gmod/achievements.SpawnMenuOpen
|
|
129
93
|
*/
|
|
130
94
|
SpawnMenuOpen(): void;
|
|
131
|
-
}
|
|
132
|
-
|
|
133
|
-
interface AchievementsLib {
|
|
134
95
|
/**
|
|
135
96
|
* **INTERNAL**: This is used internally - although you're able to use it you probably shouldn't.
|
|
136
97
|
* Adds one to the count of NPCs spawned. Once this count reaches 1000, the 'Procreator' achievement is unlocked.
|
|
@@ -138,9 +99,6 @@ interface AchievementsLib {
|
|
|
138
99
|
* @source https://wiki.facepunch.com/gmod/achievements.SpawnedNPC
|
|
139
100
|
*/
|
|
140
101
|
SpawnedNPC(): void;
|
|
141
|
-
}
|
|
142
|
-
|
|
143
|
-
interface AchievementsLib {
|
|
144
102
|
/**
|
|
145
103
|
* **INTERNAL**: This is used internally - although you're able to use it you probably shouldn't.
|
|
146
104
|
* Adds one to the count of props spawned. Once this count reaches 5000, the 'Creator' achievement is unlocked.
|
|
@@ -148,9 +106,6 @@ interface AchievementsLib {
|
|
|
148
106
|
* @source https://wiki.facepunch.com/gmod/achievements.SpawnedProp
|
|
149
107
|
*/
|
|
150
108
|
SpawnedProp(): void;
|
|
151
|
-
}
|
|
152
|
-
|
|
153
|
-
interface AchievementsLib {
|
|
154
109
|
/**
|
|
155
110
|
* **INTERNAL**: This is used internally - although you're able to use it you probably shouldn't.
|
|
156
111
|
* Adds one to the count of ragdolls spawned. Once this count reaches 2000, the 'Dollhouse' achievement is unlocked.
|
|
@@ -160,3 +115,18 @@ interface AchievementsLib {
|
|
|
160
115
|
SpawnedRagdoll(): void;
|
|
161
116
|
}
|
|
162
117
|
|
|
118
|
+
|
|
119
|
+
|
|
120
|
+
|
|
121
|
+
|
|
122
|
+
|
|
123
|
+
|
|
124
|
+
|
|
125
|
+
|
|
126
|
+
|
|
127
|
+
|
|
128
|
+
|
|
129
|
+
|
|
130
|
+
|
|
131
|
+
|
|
132
|
+
|
package/types/ai.d.tlua
CHANGED
|
@@ -16,45 +16,30 @@ interface AiLib {
|
|
|
16
16
|
* @source https://wiki.facepunch.com/gmod/ai.GetNodeCount
|
|
17
17
|
*/
|
|
18
18
|
GetNodeCount(): number;
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
interface AiLib {
|
|
22
19
|
/**
|
|
23
20
|
* Translates a schedule name to its corresponding ID.
|
|
24
21
|
* @realm server
|
|
25
22
|
* @source https://wiki.facepunch.com/gmod/ai.GetScheduleID
|
|
26
23
|
*/
|
|
27
24
|
GetScheduleID(sched: string): number;
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
interface AiLib {
|
|
31
25
|
/**
|
|
32
26
|
* Returns the squad leader of the given squad.
|
|
33
27
|
* @realm server
|
|
34
28
|
* @source https://wiki.facepunch.com/gmod/ai.GetSquadLeader
|
|
35
29
|
*/
|
|
36
30
|
GetSquadLeader(squad: string): NPC;
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
interface AiLib {
|
|
40
31
|
/**
|
|
41
32
|
* Returns the amount of members a given squad has. See also [ai.GetSquadMembers](https://wiki.facepunch.com/gmod/ai.GetSquadMembers).
|
|
42
33
|
* @realm server
|
|
43
34
|
* @source https://wiki.facepunch.com/gmod/ai.GetSquadMemberCount
|
|
44
35
|
*/
|
|
45
36
|
GetSquadMemberCount(squad: string): number;
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
interface AiLib {
|
|
49
37
|
/**
|
|
50
38
|
* Returns all members of a given squad. See also [ai.GetSquadMemberCount](https://wiki.facepunch.com/gmod/ai.GetSquadMemberCount) and [NPC:GetSquad](https://wiki.facepunch.com/gmod/NPC:GetSquad).
|
|
51
39
|
* @realm server
|
|
52
40
|
* @source https://wiki.facepunch.com/gmod/ai.GetSquadMembers
|
|
53
41
|
*/
|
|
54
42
|
GetSquadMembers(squad: string): table;
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
interface AiLib {
|
|
58
43
|
/**
|
|
59
44
|
* Translates a task name to its corresponding ID.
|
|
60
45
|
* @realm server
|
|
@@ -63,3 +48,8 @@ interface AiLib {
|
|
|
63
48
|
GetTaskID(task: string): number;
|
|
64
49
|
}
|
|
65
50
|
|
|
51
|
+
|
|
52
|
+
|
|
53
|
+
|
|
54
|
+
|
|
55
|
+
|
package/types/angle.d.tlua
CHANGED
|
@@ -23,9 +23,6 @@ interface Angle {
|
|
|
23
23
|
__mul(l: number, r: Angle): Angle;
|
|
24
24
|
__div(l: Angle, r: number): Angle;
|
|
25
25
|
__unm(a: Angle): Angle;
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
interface Angle {
|
|
29
26
|
/**
|
|
30
27
|
* Adds the values of the argument angle to the orignal angle.
|
|
31
28
|
*
|
|
@@ -34,108 +31,72 @@ interface Angle {
|
|
|
34
31
|
* @source https://wiki.facepunch.com/gmod/Angle:Add
|
|
35
32
|
*/
|
|
36
33
|
Add(self: Angle, angle: Angle): void;
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
interface Angle {
|
|
40
34
|
/**
|
|
41
35
|
* Divides all values of the original angle by a scalar. This functions the same as angle1 / num without creating a new angle object, skipping object construction and garbage collection.
|
|
42
36
|
* @realm shared and menu
|
|
43
37
|
* @source https://wiki.facepunch.com/gmod/Angle:Div
|
|
44
38
|
*/
|
|
45
39
|
Div(self: Angle, scalar: number): void;
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
interface Angle {
|
|
49
40
|
/**
|
|
50
41
|
* Returns a normal vector facing in the direction that the angle points.
|
|
51
42
|
* @realm shared and menu
|
|
52
43
|
* @source https://wiki.facepunch.com/gmod/Angle:Forward
|
|
53
44
|
*/
|
|
54
45
|
Forward(self: Angle): Vector;
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
interface Angle {
|
|
58
46
|
/**
|
|
59
47
|
* Returns if the angle is equal to another angle with the given tolerance.
|
|
60
48
|
* @realm shared and menu
|
|
61
49
|
* @source https://wiki.facepunch.com/gmod/Angle:IsEqualTol
|
|
62
50
|
*/
|
|
63
51
|
IsEqualTol(self: Angle, compare: Angle, tolerance: number): boolean;
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
interface Angle {
|
|
67
52
|
/**
|
|
68
53
|
* Returns whether the pitch, yaw and roll are 0 or not.
|
|
69
54
|
* @realm shared and menu
|
|
70
55
|
* @source https://wiki.facepunch.com/gmod/Angle:IsZero
|
|
71
56
|
*/
|
|
72
57
|
IsZero(self: Angle): boolean;
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
interface Angle {
|
|
76
58
|
/**
|
|
77
59
|
* Multiplies a scalar to all the values of the orignal angle. This functions the same as num * angle without creating a new angle object, skipping object construction and garbage collection.
|
|
78
60
|
* @realm shared and menu
|
|
79
61
|
* @source https://wiki.facepunch.com/gmod/Angle:Mul
|
|
80
62
|
*/
|
|
81
63
|
Mul(self: Angle, scalar: number): void;
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
interface Angle {
|
|
85
64
|
/**
|
|
86
65
|
* Normalizes the angles by applying a modulo with 360 to pitch, yaw and roll.
|
|
87
66
|
* @realm shared and menu
|
|
88
67
|
* @source https://wiki.facepunch.com/gmod/Angle:Normalize
|
|
89
68
|
*/
|
|
90
69
|
Normalize(self: Angle): void;
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
interface Angle {
|
|
94
70
|
/**
|
|
95
71
|
* Randomizes each element of this Angle object.
|
|
96
72
|
* @realm shared and menu
|
|
97
73
|
* @source https://wiki.facepunch.com/gmod/Angle:Random
|
|
98
74
|
*/
|
|
99
75
|
Random(self: Angle, min?: number, max?: number): void;
|
|
100
|
-
}
|
|
101
|
-
|
|
102
|
-
interface Angle {
|
|
103
76
|
/**
|
|
104
77
|
* Returns a normal vector facing in the direction that points right relative to the angle's direction.
|
|
105
78
|
* @realm shared and menu
|
|
106
79
|
* @source https://wiki.facepunch.com/gmod/Angle:Right
|
|
107
80
|
*/
|
|
108
81
|
Right(self: Angle): Vector;
|
|
109
|
-
}
|
|
110
|
-
|
|
111
|
-
interface Angle {
|
|
112
82
|
/**
|
|
113
83
|
* Rotates the angle around the specified axis by the specified degrees.
|
|
114
84
|
* @realm shared and menu
|
|
115
85
|
* @source https://wiki.facepunch.com/gmod/Angle:RotateAroundAxis
|
|
116
86
|
*/
|
|
117
87
|
RotateAroundAxis(self: Angle, axis: Vector, rotation: number): void;
|
|
118
|
-
}
|
|
119
|
-
|
|
120
|
-
interface Angle {
|
|
121
88
|
/**
|
|
122
89
|
* Copies pitch, yaw and roll from the second angle to the first.
|
|
123
90
|
* @realm shared and menu
|
|
124
91
|
* @source https://wiki.facepunch.com/gmod/Angle:Set
|
|
125
92
|
*/
|
|
126
93
|
Set(self: Angle, originalAngle: Angle): void;
|
|
127
|
-
}
|
|
128
|
-
|
|
129
|
-
interface Angle {
|
|
130
94
|
/**
|
|
131
95
|
* Sets the p, y, and r of the angle.
|
|
132
96
|
* @realm shared and menu
|
|
133
97
|
* @source https://wiki.facepunch.com/gmod/Angle:SetUnpacked
|
|
134
98
|
*/
|
|
135
99
|
SetUnpacked(self: Angle, p: number, y: number, r: number): void;
|
|
136
|
-
}
|
|
137
|
-
|
|
138
|
-
interface Angle {
|
|
139
100
|
/**
|
|
140
101
|
* Snaps the angle to nearest interval of degrees.
|
|
141
102
|
*
|
|
@@ -146,45 +107,30 @@ interface Angle {
|
|
|
146
107
|
* @source https://wiki.facepunch.com/gmod/Angle:SnapTo
|
|
147
108
|
*/
|
|
148
109
|
SnapTo(self: Angle, axis: string, target: number): Angle;
|
|
149
|
-
}
|
|
150
|
-
|
|
151
|
-
interface Angle {
|
|
152
110
|
/**
|
|
153
111
|
* Subtracts the values of the argument angle to the orignal angle. This functions the same as angle1 - angle2 without creating a new angle object, skipping object construction and garbage collection.
|
|
154
112
|
* @realm shared and menu
|
|
155
113
|
* @source https://wiki.facepunch.com/gmod/Angle:Sub
|
|
156
114
|
*/
|
|
157
115
|
Sub(self: Angle, angle: Angle): void;
|
|
158
|
-
}
|
|
159
|
-
|
|
160
|
-
interface Angle {
|
|
161
116
|
/**
|
|
162
117
|
* Returns the angle as a table with three elements.
|
|
163
118
|
* @realm shared and menu
|
|
164
119
|
* @source https://wiki.facepunch.com/gmod/Angle:ToTable
|
|
165
120
|
*/
|
|
166
121
|
ToTable(self: Angle): table;
|
|
167
|
-
}
|
|
168
|
-
|
|
169
|
-
interface Angle {
|
|
170
122
|
/**
|
|
171
123
|
* Returns the pitch, yaw, and roll components of the angle.
|
|
172
124
|
* @realm shared and menu
|
|
173
125
|
* @source https://wiki.facepunch.com/gmod/Angle:Unpack
|
|
174
126
|
*/
|
|
175
127
|
Unpack(self: Angle): (number, number, number);
|
|
176
|
-
}
|
|
177
|
-
|
|
178
|
-
interface Angle {
|
|
179
128
|
/**
|
|
180
129
|
* Returns a normal vector facing in the direction that points up relative to the angle's direction.
|
|
181
130
|
* @realm shared and menu
|
|
182
131
|
* @source https://wiki.facepunch.com/gmod/Angle:Up
|
|
183
132
|
*/
|
|
184
133
|
Up(self: Angle): Vector;
|
|
185
|
-
}
|
|
186
|
-
|
|
187
|
-
interface Angle {
|
|
188
134
|
/**
|
|
189
135
|
* Sets pitch, yaw and roll to 0.
|
|
190
136
|
* This function is faster than doing it manually.
|
|
@@ -195,3 +141,21 @@ interface Angle {
|
|
|
195
141
|
Zero(self: Angle): void;
|
|
196
142
|
}
|
|
197
143
|
|
|
144
|
+
|
|
145
|
+
|
|
146
|
+
|
|
147
|
+
|
|
148
|
+
|
|
149
|
+
|
|
150
|
+
|
|
151
|
+
|
|
152
|
+
|
|
153
|
+
|
|
154
|
+
|
|
155
|
+
|
|
156
|
+
|
|
157
|
+
|
|
158
|
+
|
|
159
|
+
|
|
160
|
+
|
|
161
|
+
|
package/types/baseclass.d.tlua
CHANGED
|
@@ -20,10 +20,6 @@ interface BaseclassLib {
|
|
|
20
20
|
* @source https://wiki.facepunch.com/gmod/baseclass.Get
|
|
21
21
|
*/
|
|
22
22
|
Get<T>(name: T): T;
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
interface BaseclassLib {
|
|
27
23
|
/**
|
|
28
24
|
* Add a new base class that can be derived by others. This is done automatically for:
|
|
29
25
|
* * [panels](https://wiki.facepunch.com/gmod/vgui.Register)
|
|
@@ -40,3 +36,5 @@ interface BaseclassLib {
|
|
|
40
36
|
Set(name: string, tab: table): void;
|
|
41
37
|
}
|
|
42
38
|
|
|
39
|
+
|
|
40
|
+
|
package/types/bf_read.d.tlua
CHANGED
|
@@ -7,8 +7,6 @@
|
|
|
7
7
|
* @source https://wiki.facepunch.com/gmod/bf_read
|
|
8
8
|
* @deprecated You should be using net instead
|
|
9
9
|
*/
|
|
10
|
-
interface bf_read {}
|
|
11
|
-
|
|
12
10
|
interface bf_read {
|
|
13
11
|
/**
|
|
14
12
|
* Reads and returns an angle object from the bitstream.
|
|
@@ -16,90 +14,60 @@ interface bf_read {
|
|
|
16
14
|
* @source https://wiki.facepunch.com/gmod/bf_read:ReadAngle
|
|
17
15
|
*/
|
|
18
16
|
ReadAngle(self: bf_read): Angle;
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
interface bf_read {
|
|
22
17
|
/**
|
|
23
18
|
* Reads 1 bit and returns a bool representing the bit.
|
|
24
19
|
* @realm client
|
|
25
20
|
* @source https://wiki.facepunch.com/gmod/bf_read:ReadBool
|
|
26
21
|
*/
|
|
27
22
|
ReadBool(self: bf_read): boolean;
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
interface bf_read {
|
|
31
23
|
/**
|
|
32
24
|
* Reads a signed char and returns a number from -127 to 127 representing the ascii value of that char.
|
|
33
25
|
* @realm client
|
|
34
26
|
* @source https://wiki.facepunch.com/gmod/bf_read:ReadChar
|
|
35
27
|
*/
|
|
36
28
|
ReadChar(self: bf_read): number;
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
interface bf_read {
|
|
40
29
|
/**
|
|
41
30
|
* Reads a short representing an entity index and returns the matching entity handle.
|
|
42
31
|
* @realm client
|
|
43
32
|
* @source https://wiki.facepunch.com/gmod/bf_read:ReadEntity
|
|
44
33
|
*/
|
|
45
34
|
ReadEntity(self: bf_read): Entity;
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
interface bf_read {
|
|
49
35
|
/**
|
|
50
36
|
* Reads a 4 byte float from the bitstream and returns it.
|
|
51
37
|
* @realm client
|
|
52
38
|
* @source https://wiki.facepunch.com/gmod/bf_read:ReadFloat
|
|
53
39
|
*/
|
|
54
40
|
ReadFloat(self: bf_read): number;
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
interface bf_read {
|
|
58
41
|
/**
|
|
59
42
|
* Reads a 4 byte long from the bitstream and returns it.
|
|
60
43
|
* @realm client
|
|
61
44
|
* @source https://wiki.facepunch.com/gmod/bf_read:ReadLong
|
|
62
45
|
*/
|
|
63
46
|
ReadLong(self: bf_read): number;
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
interface bf_read {
|
|
67
47
|
/**
|
|
68
48
|
* Reads a 2 byte short from the bitstream and returns it.
|
|
69
49
|
* @realm client
|
|
70
50
|
* @source https://wiki.facepunch.com/gmod/bf_read:ReadShort
|
|
71
51
|
*/
|
|
72
52
|
ReadShort(self: bf_read): number;
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
interface bf_read {
|
|
76
53
|
/**
|
|
77
54
|
* Reads a null terminated string from the bitstream.
|
|
78
55
|
* @realm client
|
|
79
56
|
* @source https://wiki.facepunch.com/gmod/bf_read:ReadString
|
|
80
57
|
*/
|
|
81
58
|
ReadString(self: bf_read): string;
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
interface bf_read {
|
|
85
59
|
/**
|
|
86
60
|
* Reads a special encoded vector from the bitstream and returns it, this function is not suitable to send normals.
|
|
87
61
|
* @realm client
|
|
88
62
|
* @source https://wiki.facepunch.com/gmod/bf_read:ReadVector
|
|
89
63
|
*/
|
|
90
64
|
ReadVector(self: bf_read): Vector;
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
interface bf_read {
|
|
94
65
|
/**
|
|
95
66
|
* Reads a special encoded vector normal from the bitstream and returns it, this function is not suitable to send vectors that represent a position.
|
|
96
67
|
* @realm client
|
|
97
68
|
* @source https://wiki.facepunch.com/gmod/bf_read:ReadVectorNormal
|
|
98
69
|
*/
|
|
99
70
|
ReadVectorNormal(self: bf_read): Vector;
|
|
100
|
-
}
|
|
101
|
-
|
|
102
|
-
interface bf_read {
|
|
103
71
|
/**
|
|
104
72
|
* Rewinds the bitstream so it can be read again.
|
|
105
73
|
* @realm client
|
|
@@ -108,3 +76,14 @@ interface bf_read {
|
|
|
108
76
|
Reset(self: bf_read): void;
|
|
109
77
|
}
|
|
110
78
|
|
|
79
|
+
|
|
80
|
+
|
|
81
|
+
|
|
82
|
+
|
|
83
|
+
|
|
84
|
+
|
|
85
|
+
|
|
86
|
+
|
|
87
|
+
|
|
88
|
+
|
|
89
|
+
|
package/types/bit.d.tlua
CHANGED
|
@@ -12,54 +12,36 @@ interface BitLib {
|
|
|
12
12
|
* @source https://wiki.facepunch.com/gmod/bit.arshift
|
|
13
13
|
*/
|
|
14
14
|
arshift(value: number, shiftCount: number): number;
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
interface BitLib {
|
|
18
15
|
/**
|
|
19
16
|
* Performs the bitwise `and` for all values specified.
|
|
20
17
|
* @realm shared and menu
|
|
21
18
|
* @source https://wiki.facepunch.com/gmod/bit.band
|
|
22
19
|
*/
|
|
23
20
|
band(value: number, ...: any): number;
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
interface BitLib {
|
|
27
21
|
/**
|
|
28
22
|
* Returns the bitwise not of the value. Inverts every bit of the 32bit integer.
|
|
29
23
|
* @realm shared and menu
|
|
30
24
|
* @source https://wiki.facepunch.com/gmod/bit.bnot
|
|
31
25
|
*/
|
|
32
26
|
bnot(value: number): number;
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
interface BitLib {
|
|
36
27
|
/**
|
|
37
28
|
* Returns the bitwise OR of all values specified.
|
|
38
29
|
* @realm shared and menu
|
|
39
30
|
* @source https://wiki.facepunch.com/gmod/bit.bor
|
|
40
31
|
*/
|
|
41
32
|
bor(value1: number, ...: any): number;
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
interface BitLib {
|
|
45
33
|
/**
|
|
46
34
|
* Swaps the byte order.
|
|
47
35
|
* @realm shared and menu
|
|
48
36
|
* @source https://wiki.facepunch.com/gmod/bit.bswap
|
|
49
37
|
*/
|
|
50
38
|
bswap(value: number): number;
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
interface BitLib {
|
|
54
39
|
/**
|
|
55
40
|
* Returns the bitwise xor of all values specified.
|
|
56
41
|
* @realm shared and menu
|
|
57
42
|
* @source https://wiki.facepunch.com/gmod/bit.bxor
|
|
58
43
|
*/
|
|
59
44
|
bxor(value: number, otherValues?: number): number;
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
interface BitLib {
|
|
63
45
|
/**
|
|
64
46
|
* Returns the result of shifting given value left bitwise by given number of bits. See [this wiki article](https://en.wikipedia.org/wiki/Bitwise_operation#Bit_shifts) for more details.
|
|
65
47
|
* **NOTE**: The returned value will be clamped to a signed 32-bit integer, even on 64-bit builds.
|
|
@@ -69,27 +51,18 @@ interface BitLib {
|
|
|
69
51
|
* @source https://wiki.facepunch.com/gmod/bit.lshift
|
|
70
52
|
*/
|
|
71
53
|
lshift(value: number, shiftCount: number): number;
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
interface BitLib {
|
|
75
54
|
/**
|
|
76
55
|
* Returns the left rotated value.
|
|
77
56
|
* @realm shared and menu
|
|
78
57
|
* @source https://wiki.facepunch.com/gmod/bit.rol
|
|
79
58
|
*/
|
|
80
59
|
rol(value: number, shiftCount: number): number;
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
interface BitLib {
|
|
84
60
|
/**
|
|
85
61
|
* Returns the right rotated value.
|
|
86
62
|
* @realm shared and menu
|
|
87
63
|
* @source https://wiki.facepunch.com/gmod/bit.ror
|
|
88
64
|
*/
|
|
89
65
|
ror(value: number, shiftCount: number): number;
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
interface BitLib {
|
|
93
66
|
/**
|
|
94
67
|
* Returns the right shifted value.
|
|
95
68
|
* **NOTE**: The returned value will be clamped to a signed 32-bit integer, even on 64-bit builds.
|
|
@@ -99,18 +72,12 @@ interface BitLib {
|
|
|
99
72
|
* @source https://wiki.facepunch.com/gmod/bit.rshift
|
|
100
73
|
*/
|
|
101
74
|
rshift(value: number, shiftCount: number): number;
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
interface BitLib {
|
|
105
75
|
/**
|
|
106
76
|
* Normalizes the specified value and clamps it in the range of a signed 32bit integer.
|
|
107
77
|
* @realm shared and menu
|
|
108
78
|
* @source https://wiki.facepunch.com/gmod/bit.tobit
|
|
109
79
|
*/
|
|
110
80
|
tobit(value: number): number;
|
|
111
|
-
}
|
|
112
|
-
|
|
113
|
-
interface BitLib {
|
|
114
81
|
/**
|
|
115
82
|
* Returns the hexadecimal representation of the number with the specified number of characters.
|
|
116
83
|
* @realm shared and menu
|
|
@@ -119,3 +86,14 @@ interface BitLib {
|
|
|
119
86
|
tohex(value: number, characters?: number): string;
|
|
120
87
|
}
|
|
121
88
|
|
|
89
|
+
|
|
90
|
+
|
|
91
|
+
|
|
92
|
+
|
|
93
|
+
|
|
94
|
+
|
|
95
|
+
|
|
96
|
+
|
|
97
|
+
|
|
98
|
+
|
|
99
|
+
|