@tlua/gmod 1.0.4 → 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.
Files changed (214) hide show
  1. package/package.json +1 -1
  2. package/types/achievements.d.tlua +15 -45
  3. package/types/ai.d.tlua +5 -15
  4. package/types/angle.d.tlua +18 -54
  5. package/types/baseclass.d.tlua +2 -4
  6. package/types/bf_read.d.tlua +11 -32
  7. package/types/bit.d.tlua +11 -33
  8. package/types/cam.d.tlua +16 -48
  9. package/types/ceffectdata.d.tlua +32 -95
  10. package/types/chat.d.tlua +5 -15
  11. package/types/cleanup.d.tlua +7 -21
  12. package/types/cluaemitter.d.tlua +12 -35
  13. package/types/clualocomotion.d.tlua +40 -119
  14. package/types/cluaparticle.d.tlua +44 -131
  15. package/types/cmovedata.d.tlua +47 -140
  16. package/types/cnavarea.d.tlua +77 -230
  17. package/types/cnavladder.d.tlua +22 -65
  18. package/types/cnewparticleeffect.d.tlua +26 -77
  19. package/types/color.d.tlua +28 -84
  20. package/types/concommand.d.tlua +4 -12
  21. package/types/constraint.d.tlua +28 -84
  22. package/types/construct.d.tlua +1 -3
  23. package/types/contentheader.d.tlua +3 -6
  24. package/types/contenticon.d.tlua +9 -24
  25. package/types/contentsidebar.d.tlua +4 -9
  26. package/types/contextbase.d.tlua +4 -9
  27. package/types/controlpanel.d.tlua +18 -40
  28. package/types/controlpresets.d.tlua +13 -36
  29. package/types/convar.d.tlua +16 -47
  30. package/types/cookie.d.tlua +3 -9
  31. package/types/coroutine.d.tlua +7 -21
  32. package/types/crecipientfilter.d.tlua +16 -47
  33. package/types/csoundpatch.d.tlua +14 -41
  34. package/types/ctakedamageinfo.d.tlua +33 -98
  35. package/types/ctrlnumpad.d.tlua +6 -17
  36. package/types/cusercmd.d.tlua +27 -80
  37. package/types/cvars.d.tlua +6 -18
  38. package/types/dadjustablemodelpanel.d.tlua +7 -18
  39. package/types/dalphabar.d.tlua +3 -6
  40. package/types/dbinder.d.tlua +4 -9
  41. package/types/dbubblecontainer.d.tlua +2 -3
  42. package/types/dbutton.d.tlua +8 -21
  43. package/types/dcheckbox.d.tlua +5 -12
  44. package/types/dcheckboxlabel.d.tlua +9 -27
  45. package/types/dcollapsiblecategory.d.tlua +23 -66
  46. package/types/dcolorbutton.d.tlua +7 -18
  47. package/types/dcolorcombo.d.tlua +5 -12
  48. package/types/dcolorcube.d.tlua +13 -36
  49. package/types/dcolormixer.d.tlua +27 -78
  50. package/types/dcolorpalette.d.tlua +23 -66
  51. package/types/dcolumnsheet.d.tlua +5 -12
  52. package/types/dcombobox.d.tlua +17 -48
  53. package/types/ddragbase.d.tlua +13 -36
  54. package/types/ddrawer.d.tlua +8 -21
  55. package/types/debug.d.tlua +44 -76
  56. package/types/debugoverlay.d.tlua +11 -33
  57. package/types/dentityproperties.d.tlua +5 -12
  58. package/types/derma.d.tlua +10 -30
  59. package/types/dexpandbutton.d.tlua +3 -6
  60. package/types/dfilebrowser.d.tlua +20 -60
  61. package/types/dform.d.tlua +18 -51
  62. package/types/dframe.d.tlua +24 -72
  63. package/types/dgrid.d.tlua +11 -30
  64. package/types/dhorizontaldivider.d.tlua +20 -57
  65. package/types/dhorizontalscroller.d.tlua +11 -30
  66. package/types/dhscrollbar.d.tlua +11 -30
  67. package/types/dhtml.d.tlua +8 -21
  68. package/types/dhtmlcontrols.d.tlua +5 -15
  69. package/types/diconbrowser.d.tlua +11 -30
  70. package/types/diconlayout.d.tlua +18 -51
  71. package/types/dimage.d.tlua +20 -55
  72. package/types/dimagebutton.d.tlua +9 -27
  73. package/types/dlabel.d.tlua +33 -96
  74. package/types/dlabeleditable.d.tlua +5 -12
  75. package/types/dlabelurl.d.tlua +10 -27
  76. package/types/dlistbox.d.tlua +8 -21
  77. package/types/dlistboxitem.d.tlua +4 -9
  78. package/types/dlistview.d.tlua +34 -99
  79. package/types/dlistview_column.d.tlua +14 -39
  80. package/types/dlistview_line.d.tlua +13 -36
  81. package/types/dmenu.d.tlua +28 -75
  82. package/types/dmenubar.d.tlua +6 -11
  83. package/types/dmenuoption.d.tlua +13 -36
  84. package/types/dmenuoptioncvar.d.tlua +6 -15
  85. package/types/dmodelpanel.d.tlua +22 -63
  86. package/types/dmodelselect.d.tlua +2 -3
  87. package/types/dmodelselectmulti.d.tlua +2 -3
  88. package/types/dnotify.d.tlua +10 -27
  89. package/types/dnumberscratch.d.tlua +26 -75
  90. package/types/dnumberwang.d.tlua +16 -45
  91. package/types/dnumslider.d.tlua +17 -51
  92. package/types/dpanel.d.tlua +14 -39
  93. package/types/dpanellist.d.tlua +11 -33
  94. package/types/dpaneloverlay.d.tlua +7 -18
  95. package/types/dpanpanel.d.tlua +6 -15
  96. package/types/dprogress.d.tlua +3 -6
  97. package/types/dproperties.d.tlua +4 -9
  98. package/types/dproperty_combo.d.tlua +3 -6
  99. package/types/dproperty_generic.d.tlua +5 -12
  100. package/types/dpropertysheet.d.tlua +26 -56
  101. package/types/dragndrop.d.tlua +10 -30
  102. package/types/draw.d.tlua +11 -31
  103. package/types/drgbpicker.d.tlua +4 -9
  104. package/types/drive.d.tlua +18 -41
  105. package/types/dscrollpanel.d.tlua +10 -30
  106. package/types/dshape.d.tlua +7 -18
  107. package/types/dsizetocontents.d.tlua +5 -12
  108. package/types/dslider.d.tlua +28 -81
  109. package/types/dsprite.d.tlua +9 -24
  110. package/types/dtab.d.tlua +8 -21
  111. package/types/dtextentry.d.tlua +43 -126
  112. package/types/dtilelayout.d.tlua +21 -60
  113. package/types/dtooltip.d.tlua +6 -15
  114. package/types/dtree.d.tlua +16 -45
  115. package/types/dtree_node.d.tlua +68 -201
  116. package/types/duplicator.d.tlua +30 -88
  117. package/types/dverticaldivider.d.tlua +23 -66
  118. package/types/dvscrollbar.d.tlua +11 -30
  119. package/types/effect.d.tlua +4 -9
  120. package/types/effects.d.tlua +6 -18
  121. package/types/engine.d.tlua +21 -63
  122. package/types/entity.d.tlua +676 -1962
  123. package/types/ents.d.tlua +23 -61
  124. package/types/file.d.tlua +39 -117
  125. package/types/frame_blend.d.tlua +7 -21
  126. package/types/game.d.tlua +39 -117
  127. package/types/gameevent.d.tlua +4 -8
  128. package/types/gamemode.d.tlua +3 -7
  129. package/types/gm.d.tlua +267 -800
  130. package/types/gmsave.d.tlua +4 -12
  131. package/types/gui.d.tlua +21 -63
  132. package/types/gwen.d.tlua +3 -9
  133. package/types/halo.d.tlua +2 -6
  134. package/types/hook.d.tlua +4 -12
  135. package/types/http.d.tlua +1 -3
  136. package/types/iconeditor.d.tlua +11 -30
  137. package/types/igmodaudiochannel.d.tlua +41 -122
  138. package/types/imagecheckbox.d.tlua +4 -9
  139. package/types/imaterial.d.tlua +26 -77
  140. package/types/imesh.d.tlua +5 -14
  141. package/types/input.d.tlua +24 -68
  142. package/types/irestore.d.tlua +9 -26
  143. package/types/isave.d.tlua +9 -26
  144. package/types/itexture.d.tlua +10 -29
  145. package/types/ivideowriter.d.tlua +5 -14
  146. package/types/jit.d.tlua +21 -53
  147. package/types/killicon.d.tlua +7 -21
  148. package/types/language.d.tlua +1 -3
  149. package/types/list.d.tlua +8 -24
  150. package/types/markup.d.tlua +2 -6
  151. package/types/markupobject.d.tlua +5 -14
  152. package/types/math.d.tlua +277 -447
  153. package/types/matproxy.d.tlua +3 -9
  154. package/types/matselect.d.tlua +11 -30
  155. package/types/menubar.d.tlua +2 -6
  156. package/types/mesh.d.tlua +19 -57
  157. package/types/motionsensor.d.tlua +10 -30
  158. package/types/navmesh.d.tlua +26 -78
  159. package/types/net.d.tlua +52 -154
  160. package/types/nextbot.d.tlua +46 -116
  161. package/types/notification.d.tlua +2 -6
  162. package/types/npc.d.tlua +182 -543
  163. package/types/numpad.d.tlua +7 -21
  164. package/types/os.d.tlua +4 -10
  165. package/types/panel.d.tlua +333 -991
  166. package/types/pathfollower.d.tlua +31 -92
  167. package/types/permissions.d.tlua +6 -18
  168. package/types/physcollide.d.tlua +3 -8
  169. package/types/physenv.d.tlua +11 -33
  170. package/types/physobj.d.tlua +78 -233
  171. package/types/player.d.tlua +302 -880
  172. package/types/player_manager.d.tlua +13 -39
  173. package/types/presets.d.tlua +6 -18
  174. package/types/projectedtexture.d.tlua +48 -143
  175. package/types/properties.d.tlua +5 -15
  176. package/types/propselect.d.tlua +5 -12
  177. package/types/render.d.tlua +142 -426
  178. package/types/resource.d.tlua +2 -6
  179. package/types/sandbox.d.tlua +54 -159
  180. package/types/saverestore.d.tlua +12 -36
  181. package/types/schedule.d.tlua +6 -17
  182. package/types/scripted_ents.d.tlua +11 -29
  183. package/types/search.d.tlua +1 -3
  184. package/types/serverlist.d.tlua +7 -21
  185. package/types/sound.d.tlua +10 -30
  186. package/types/spawnicon.d.tlua +8 -21
  187. package/types/spawnmenu.d.tlua +24 -70
  188. package/types/spawnmenucontentpanel.d.tlua +5 -12
  189. package/types/sql.d.tlua +9 -27
  190. package/types/stack.d.tlua +5 -14
  191. package/types/steamworks.d.tlua +18 -54
  192. package/types/string.d.tlua +49 -141
  193. package/types/surface.d.tlua +34 -102
  194. package/types/surfaceinfo.d.tlua +5 -14
  195. package/types/system.d.tlua +10 -30
  196. package/types/table.d.tlua +47 -137
  197. package/types/task.d.tlua +9 -26
  198. package/types/team.d.tlua +19 -57
  199. package/types/timer.d.tlua +14 -42
  200. package/types/tool.d.tlua +46 -131
  201. package/types/ugcpublishwindow.d.tlua +9 -24
  202. package/types/umsg.d.tlua +12 -36
  203. package/types/undo.d.tlua +10 -30
  204. package/types/usermessage.d.tlua +2 -6
  205. package/types/utf8.d.tlua +7 -21
  206. package/types/util.d.tlua +94 -274
  207. package/types/vector.d.tlua +36 -108
  208. package/types/vehicle.d.tlua +52 -149
  209. package/types/vgui.d.tlua +18 -46
  210. package/types/vmatrix.d.tlua +35 -105
  211. package/types/weapon.d.tlua +85 -248
  212. package/types/weapons.d.tlua +6 -16
  213. package/types/widgets.d.tlua +1 -3
  214. package/types/workshopfilebase.d.tlua +5 -14
@@ -7,37 +7,25 @@
7
7
  *
8
8
  * @source https://wiki.facepunch.com/gmod/Weapon
9
9
  */
10
- interface Weapon extends Entity {}
11
- interface WEAPON extends Weapon {}
12
-
13
- interface Weapon {
10
+ interface Weapon extends Entity {
14
11
  /**
15
12
  * Allows you to adjust the weapon's mouse sensitivity. This hook only works if you haven't overridden [GM:AdjustMouseSensitivity](https://wiki.facepunch.com/gmod/GM:AdjustMouseSensitivity).
16
13
  * @realm client
17
14
  * @source https://wiki.facepunch.com/gmod/WEAPON:AdjustMouseSensitivity
18
15
  */
19
16
  AdjustMouseSensitivity(self: Weapon, defaultSensitivity: number, localFOV: number, defaultFOV: number): number;
20
- }
21
-
22
- interface Weapon {
23
17
  /**
24
18
  * Returns how much of primary ammo the player has.
25
19
  * @realm shared
26
20
  * @source https://wiki.facepunch.com/gmod/WEAPON:Ammo1
27
21
  */
28
22
  Ammo1(self: Weapon): number;
29
- }
30
-
31
- interface Weapon {
32
23
  /**
33
24
  * Returns how much of secondary ammo the player has.
34
25
  * @realm shared
35
26
  * @source https://wiki.facepunch.com/gmod/WEAPON:Ammo2
36
27
  */
37
28
  Ammo2(self: Weapon): number;
38
- }
39
-
40
- interface Weapon {
41
29
  /**
42
30
  * Allows you to adjust player view while this weapon in use.
43
31
  *
@@ -47,45 +35,30 @@ interface Weapon {
47
35
  * @source https://wiki.facepunch.com/gmod/WEAPON:CalcView
48
36
  */
49
37
  CalcView(self: Weapon, ply: Player, pos: Vector, ang: Angle, fov: number): (Vector, Angle, number);
50
- }
51
-
52
- interface Weapon {
53
38
  /**
54
39
  * Allows overriding the position and angle of the viewmodel. This hook only works if you haven't overridden [GM:CalcViewModelView](https://wiki.facepunch.com/gmod/GM:CalcViewModelView).
55
40
  * @realm client
56
41
  * @source https://wiki.facepunch.com/gmod/WEAPON:CalcViewModelView
57
42
  */
58
43
  CalcViewModelView(self: Weapon, ViewModel: Entity, OldEyePos: Vector, OldEyeAng: Angle, EyePos: Vector, EyeAng: Angle): (Vector, Angle);
59
- }
60
-
61
- interface Weapon {
62
44
  /**
63
45
  * Called when a Citizen NPC is looking around to a (better) weapon to pickup.
64
46
  * @realm server
65
47
  * @source https://wiki.facepunch.com/gmod/WEAPON:CanBePickedUpByNPCs
66
48
  */
67
49
  CanBePickedUpByNPCs(self: Weapon): boolean;
68
- }
69
-
70
- interface Weapon {
71
50
  /**
72
51
  * Helper function for checking for no ammo.
73
52
  * @realm shared
74
53
  * @source https://wiki.facepunch.com/gmod/WEAPON:CanPrimaryAttack
75
54
  */
76
55
  CanPrimaryAttack(self: Weapon): boolean;
77
- }
78
-
79
- interface Weapon {
80
56
  /**
81
57
  * Helper function for checking for no ammo.
82
58
  * @realm shared
83
59
  * @source https://wiki.facepunch.com/gmod/WEAPON:CanSecondaryAttack
84
60
  */
85
61
  CanSecondaryAttack(self: Weapon): boolean;
86
- }
87
-
88
- interface Weapon {
89
62
  /**
90
63
  * Allows you to use any numbers you want for the ammo display on the HUD.
91
64
  *
@@ -95,9 +68,6 @@ interface Weapon {
95
68
  * @source https://wiki.facepunch.com/gmod/WEAPON:CustomAmmoDisplay
96
69
  */
97
70
  CustomAmmoDisplay(self: Weapon): table;
98
- }
99
-
100
- interface Weapon {
101
71
  /**
102
72
  * Called when player has just switched to this weapon.
103
73
  *
@@ -108,9 +78,6 @@ interface Weapon {
108
78
  * @source https://wiki.facepunch.com/gmod/WEAPON:Deploy
109
79
  */
110
80
  Deploy(self: Weapon): boolean;
111
- }
112
-
113
- interface Weapon {
114
81
  /**
115
82
  * Called when the crosshair is about to get drawn, and allows you to override it.
116
83
  *
@@ -120,9 +87,6 @@ interface Weapon {
120
87
  * @source https://wiki.facepunch.com/gmod/WEAPON:DoDrawCrosshair
121
88
  */
122
89
  DoDrawCrosshair(self: Weapon, x: number, y: number): boolean;
123
- }
124
-
125
- interface Weapon {
126
90
  /**
127
91
  * This hook allows you to draw on screen while this weapon is in use.
128
92
  *
@@ -132,27 +96,18 @@ interface Weapon {
132
96
  * @source https://wiki.facepunch.com/gmod/WEAPON:DrawHUD
133
97
  */
134
98
  DrawHUD(self: Weapon): void;
135
- }
136
-
137
- interface Weapon {
138
99
  /**
139
100
  * This hook allows you to draw on screen while this weapon is in use. This hook is called **before** [WEAPON:DrawHUD](https://wiki.facepunch.com/gmod/WEAPON:DrawHUD) and is equivalent of [GM:HUDPaintBackground](https://wiki.facepunch.com/gmod/GM:HUDPaintBackground).
140
101
  * @realm client
141
102
  * @source https://wiki.facepunch.com/gmod/WEAPON:DrawHUDBackground
142
103
  */
143
104
  DrawHUDBackground(self: Weapon): void;
144
- }
145
-
146
- interface Weapon {
147
105
  /**
148
106
  * This hook draws the selection icon in the weapon selection menu.
149
107
  * @realm client
150
108
  * @source https://wiki.facepunch.com/gmod/WEAPON:DrawWeaponSelection
151
109
  */
152
110
  DrawWeaponSelection(self: Weapon, x: number, y: number, width: number, height: number, alpha: number): void;
153
- }
154
-
155
- interface Weapon {
156
111
  /**
157
112
  * Called when we are about to draw the opaque parts of the weapon's world model.
158
113
  *
@@ -165,9 +120,6 @@ interface Weapon {
165
120
  * @source https://wiki.facepunch.com/gmod/WEAPON:DrawWorldModel
166
121
  */
167
122
  DrawWorldModel(self: Weapon, flags: number): void;
168
- }
169
-
170
- interface Weapon {
171
123
  /**
172
124
  * Called when we are about to draw the translucent parts of the weapon's world model.
173
125
  *
@@ -180,18 +132,12 @@ interface Weapon {
180
132
  * @source https://wiki.facepunch.com/gmod/WEAPON:DrawWorldModelTranslucent
181
133
  */
182
134
  DrawWorldModelTranslucent(self: Weapon, flags: number): void;
183
- }
184
-
185
- interface Weapon {
186
135
  /**
187
136
  * Called when a player or NPC has picked the weapon up.
188
137
  * @realm server
189
138
  * @source https://wiki.facepunch.com/gmod/WEAPON:Equip
190
139
  */
191
140
  Equip(self: Weapon, NewOwner: Entity): void;
192
- }
193
-
194
- interface Weapon {
195
141
  /**
196
142
  * The player has picked up the weapon and has taken the ammo from it.
197
143
  * The weapon will be removed immediately after this call.
@@ -200,9 +146,6 @@ interface Weapon {
200
146
  * @source https://wiki.facepunch.com/gmod/WEAPON:EquipAmmo
201
147
  */
202
148
  EquipAmmo(self: Weapon, ply: Player): void;
203
- }
204
-
205
- interface Weapon {
206
149
  /**
207
150
  * This hook allows you to freeze players screen.
208
151
  * **NOTE**: Player will still be able to move or shoot
@@ -212,9 +155,6 @@ interface Weapon {
212
155
  * @source https://wiki.facepunch.com/gmod/WEAPON:FreezeMovement
213
156
  */
214
157
  FreezeMovement(self: Weapon): boolean;
215
- }
216
-
217
- interface Weapon {
218
158
  /**
219
159
  * This hook is for NPCs, you return what they should try to do with it.
220
160
  * **WARNING**: Calling [NPC:CapabilitiesGet](https://wiki.facepunch.com/gmod/NPC:CapabilitiesGet) in this hook on the same entity can cause infinite loops since that function adds the result of [WEAPON:GetCapabilities](https://wiki.facepunch.com/gmod/WEAPON:GetCapabilities) on top of the return value.
@@ -224,9 +164,6 @@ interface Weapon {
224
164
  * @source https://wiki.facepunch.com/gmod/WEAPON:GetCapabilities
225
165
  */
226
166
  GetCapabilities(self: Weapon): CAP;
227
- }
228
-
229
- interface Weapon {
230
167
  /**
231
168
  * Called when the weapon is used by NPCs to determine how accurate the bullets fired should be.
232
169
  *
@@ -236,54 +173,36 @@ interface Weapon {
236
173
  * @source https://wiki.facepunch.com/gmod/WEAPON:GetNPCBulletSpread
237
174
  */
238
175
  GetNPCBulletSpread(self: Weapon, proficiency: number): number;
239
- }
240
-
241
- interface Weapon {
242
176
  /**
243
177
  * Called when the weapon is used by NPCs to tell the NPC how to use this weapon. Controls how long the NPC can or should shoot continuously.
244
178
  * @realm server
245
179
  * @source https://wiki.facepunch.com/gmod/WEAPON:GetNPCBurstSettings
246
180
  */
247
181
  GetNPCBurstSettings(self: Weapon): (number, number, number);
248
- }
249
-
250
- interface Weapon {
251
182
  /**
252
183
  * Called when the weapon is used by NPCs to tell the NPC how to use this weapon. Controls amount of time the NPC can rest (not shoot) between bursts.
253
184
  * @realm server
254
185
  * @source https://wiki.facepunch.com/gmod/WEAPON:GetNPCRestTimes
255
186
  */
256
187
  GetNPCRestTimes(self: Weapon): (number, number);
257
- }
258
-
259
- interface Weapon {
260
188
  /**
261
189
  * Allows you to override where the tracer effect comes from. ( Visual bullets )
262
190
  * @realm client
263
191
  * @source https://wiki.facepunch.com/gmod/WEAPON:GetTracerOrigin
264
192
  */
265
193
  GetTracerOrigin(self: Weapon): Vector;
266
- }
267
-
268
- interface Weapon {
269
194
  /**
270
195
  * This hook allows you to adjust view model position and angles.
271
196
  * @realm client
272
197
  * @source https://wiki.facepunch.com/gmod/WEAPON:GetViewModelPosition
273
198
  */
274
199
  GetViewModelPosition(self: Weapon, EyePos: Vector, EyeAng: Angle): (Vector, Angle);
275
- }
276
-
277
- interface Weapon {
278
200
  /**
279
201
  * This hook determines which parts of the HUD to draw.
280
202
  * @realm client
281
203
  * @source https://wiki.facepunch.com/gmod/WEAPON:HUDShouldDraw
282
204
  */
283
205
  HUDShouldDraw(self: Weapon, element: string): boolean;
284
- }
285
-
286
- interface Weapon {
287
206
  /**
288
207
  * Called when the weapon tries to holster. Return true to allow the weapon to
289
208
  * holster. This has no effect if the weapon was switched away from using
@@ -293,10 +212,6 @@ interface Weapon {
293
212
  * @source https://wiki.facepunch.com/gmod/WEAPON:Holster
294
213
  */
295
214
  Holster(self: Weapon, weapon?: Weapon): boolean;
296
- }
297
-
298
-
299
- interface Weapon {
300
215
  /**
301
216
  * Called internally during `TASK_RANGE_ATTACK1 --> OnRangeAttack1`. This allows you to separate your SWEPs primary firing function from players and NPCs.
302
217
  *
@@ -309,9 +224,6 @@ interface Weapon {
309
224
  * @source https://wiki.facepunch.com/gmod/WEAPON:NPCShoot_Primary
310
225
  */
311
226
  NPCShoot_Primary(self: Weapon, shootPos?: Vector, shootDir?: Vector): void;
312
- }
313
-
314
- interface Weapon {
315
227
  /**
316
228
  * A utility function to seperate your SWEPs secondary firing from players.
317
229
  *
@@ -322,9 +234,6 @@ interface Weapon {
322
234
  * @source https://wiki.facepunch.com/gmod/WEAPON:NPCShoot_Secondary
323
235
  */
324
236
  NPCShoot_Secondary(self: Weapon, shootPos?: Vector, shootDir?: Vector): void;
325
- }
326
-
327
- interface Weapon {
328
237
  /**
329
238
  * Called when weapon is dropped by [Player:DropWeapon](https://wiki.facepunch.com/gmod/Player:DropWeapon).
330
239
  *
@@ -334,9 +243,6 @@ interface Weapon {
334
243
  * @source https://wiki.facepunch.com/gmod/WEAPON:OnDrop
335
244
  */
336
245
  OnDrop(self: Weapon, owner: Entity): void;
337
- }
338
-
339
- interface Weapon {
340
246
  /**
341
247
  * Called when weapon is dropped or picked up by a new player. This can be called clientside for all players on the server if the weapon has no owner and is picked up.
342
248
  *
@@ -346,9 +252,6 @@ interface Weapon {
346
252
  * @source https://wiki.facepunch.com/gmod/WEAPON:OwnerChanged
347
253
  */
348
254
  OwnerChanged(self: Weapon): void;
349
- }
350
-
351
- interface Weapon {
352
255
  /**
353
256
  * Called after the view model has been drawn while the weapon in use.
354
257
  *
@@ -365,9 +268,6 @@ interface Weapon {
365
268
  * @source https://wiki.facepunch.com/gmod/WEAPON:PostDrawViewModel
366
269
  */
367
270
  PostDrawViewModel(self: Weapon, vm: Entity, weapon: Weapon, ply: Player, flags: number): void;
368
- }
369
-
370
- interface Weapon {
371
271
  /**
372
272
  * Allows you to modify viewmodel while the weapon in use before it is drawn.
373
273
  *
@@ -381,9 +281,6 @@ interface Weapon {
381
281
  * @source https://wiki.facepunch.com/gmod/WEAPON:PreDrawViewModel
382
282
  */
383
283
  PreDrawViewModel(self: Weapon, vm: Entity, weapon: Weapon, ply: Player, flags: number): boolean;
384
- }
385
-
386
- interface Weapon {
387
284
  /**
388
285
  * Called when primary attack button ( +attack ) is pressed.
389
286
  *
@@ -402,27 +299,18 @@ interface Weapon {
402
299
  * @source https://wiki.facepunch.com/gmod/WEAPON:PrimaryAttack
403
300
  */
404
301
  PrimaryAttack(self: Weapon): void;
405
- }
406
-
407
- interface Weapon {
408
302
  /**
409
303
  * A convenience function that draws the weapon info box, used in [WEAPON:DrawWeaponSelection](https://wiki.facepunch.com/gmod/WEAPON:DrawWeaponSelection).
410
304
  * @realm client
411
305
  * @source https://wiki.facepunch.com/gmod/WEAPON:PrintWeaponInfo
412
306
  */
413
307
  PrintWeaponInfo(self: Weapon, x: number, y: number, alpha: number): void;
414
- }
415
-
416
- interface Weapon {
417
308
  /**
418
309
  * Called when the reload key ( +reload ) is pressed.
419
310
  * @realm shared
420
311
  * @source https://wiki.facepunch.com/gmod/WEAPON:Reload
421
312
  */
422
313
  Reload(self: Weapon): void;
423
- }
424
-
425
- interface Weapon {
426
314
  /**
427
315
  * Called every frame just before [GM:RenderScene](https://wiki.facepunch.com/gmod/GM:RenderScene).
428
316
  *
@@ -436,9 +324,6 @@ interface Weapon {
436
324
  * @source https://wiki.facepunch.com/gmod/WEAPON:RenderScreen
437
325
  */
438
326
  RenderScreen(self: Weapon): void;
439
- }
440
-
441
- interface Weapon {
442
327
  /**
443
328
  * Called when secondary attack button ( +attack2 ) is pressed.
444
329
  *
@@ -448,18 +333,12 @@ interface Weapon {
448
333
  * @source https://wiki.facepunch.com/gmod/WEAPON:SecondaryAttack
449
334
  */
450
335
  SecondaryAttack(self: Weapon): void;
451
- }
452
-
453
- interface Weapon {
454
336
  /**
455
337
  * Sets the weapon deploy speed. This value needs to match on client and server.
456
338
  * @realm shared
457
339
  * @source https://wiki.facepunch.com/gmod/WEAPON:SetDeploySpeed
458
340
  */
459
341
  SetDeploySpeed(self: Weapon, speed: number): void;
460
- }
461
-
462
- interface Weapon {
463
342
  /**
464
343
  * Sets the hold type of the weapon. This must be called on **both** the server and the client to work properly.
465
344
  *
@@ -470,36 +349,24 @@ interface Weapon {
470
349
  * @source https://wiki.facepunch.com/gmod/WEAPON:SetWeaponHoldType
471
350
  */
472
351
  SetWeaponHoldType(self: Weapon, name: string): void;
473
- }
474
-
475
- interface Weapon {
476
352
  /**
477
353
  * A convenient function to shoot bullets.
478
354
  * @realm shared
479
355
  * @source https://wiki.facepunch.com/gmod/WEAPON:ShootBullet
480
356
  */
481
357
  ShootBullet(self: Weapon, damage: number, num_bullets: number, aimcone: number, ammo_type?: string, force?: number, tracer?: number): void;
482
- }
483
-
484
- interface Weapon {
485
358
  /**
486
359
  * A convenience function to create shoot effects.
487
360
  * @realm shared
488
361
  * @source https://wiki.facepunch.com/gmod/WEAPON:ShootEffects
489
362
  */
490
363
  ShootEffects(self: Weapon): void;
491
- }
492
-
493
- interface Weapon {
494
364
  /**
495
365
  * Called to determine if the view model should be drawn or not.
496
366
  * @realm client
497
367
  * @source https://wiki.facepunch.com/gmod/WEAPON:ShouldDrawViewModel
498
368
  */
499
369
  ShouldDrawViewModel(self: Weapon): boolean;
500
- }
501
-
502
- interface Weapon {
503
370
  /**
504
371
  * Should this weapon be dropped when its owner dies?
505
372
  *
@@ -509,27 +376,18 @@ interface Weapon {
509
376
  * @source https://wiki.facepunch.com/gmod/WEAPON:ShouldDropOnDie
510
377
  */
511
378
  ShouldDropOnDie(self: Weapon): boolean;
512
- }
513
-
514
- interface Weapon {
515
379
  /**
516
380
  * A convenience function to remove primary ammo from clip.
517
381
  * @realm shared
518
382
  * @source https://wiki.facepunch.com/gmod/WEAPON:TakePrimaryAmmo
519
383
  */
520
384
  TakePrimaryAmmo(self: Weapon, amount: number): void;
521
- }
522
-
523
- interface Weapon {
524
385
  /**
525
386
  * A convenience function to remove secondary ammo from clip.
526
387
  * @realm shared
527
388
  * @source https://wiki.facepunch.com/gmod/WEAPON:TakeSecondaryAmmo
528
389
  */
529
390
  TakeSecondaryAmmo(self: Weapon, amount: number): void;
530
- }
531
-
532
- interface Weapon {
533
391
  /**
534
392
  * Alias of [Weapon:Think](https://wiki.facepunch.com/gmod/Weapon:Think).
535
393
  *
@@ -538,9 +396,6 @@ interface Weapon {
538
396
  * @deprecated Use Weapon:Think instead.
539
397
  */
540
398
  Tick(self: Weapon): void;
541
- }
542
-
543
- interface Weapon {
544
399
  /**
545
400
  * Allows to change players field of view while player holds the weapon.
546
401
  *
@@ -551,9 +406,6 @@ interface Weapon {
551
406
  * @source https://wiki.facepunch.com/gmod/WEAPON:TranslateFOV
552
407
  */
553
408
  TranslateFOV(self: Weapon, fov: number): number;
554
- }
555
-
556
- interface Weapon {
557
409
  /**
558
410
  * Called straight after the view model has been drawn. This is called before [GM:PostDrawViewModel](https://wiki.facepunch.com/gmod/GM:PostDrawViewModel) and [WEAPON:PostDrawViewModel](https://wiki.facepunch.com/gmod/WEAPON:PostDrawViewModel).
559
411
  *
@@ -567,27 +419,18 @@ interface Weapon {
567
419
  * @source https://wiki.facepunch.com/gmod/WEAPON:ViewModelDrawn
568
420
  */
569
421
  ViewModelDrawn(self: Weapon, ViewModel: Entity, flags: number): void;
570
- }
571
-
572
- interface Weapon {
573
422
  /**
574
423
  * Returns whether the weapon allows to being switched from when a better ( [Weapon:GetWeight](https://wiki.facepunch.com/gmod/Weapon:GetWeight) ) weapon is being picked up.
575
424
  * @realm shared
576
425
  * @source https://wiki.facepunch.com/gmod/Weapon:AllowsAutoSwitchFrom
577
426
  */
578
427
  AllowsAutoSwitchFrom(self: Weapon): boolean;
579
- }
580
-
581
- interface Weapon {
582
428
  /**
583
429
  * Returns whether the weapon allows to being switched to when a better ([Weapon:GetWeight](https://wiki.facepunch.com/gmod/Weapon:GetWeight)) weapon is being picked up.
584
430
  * @realm shared
585
431
  * @source https://wiki.facepunch.com/gmod/Weapon:AllowsAutoSwitchTo
586
432
  */
587
433
  AllowsAutoSwitchTo(self: Weapon): boolean;
588
- }
589
-
590
- interface Weapon {
591
434
  /**
592
435
  * Calls a SWEP function on client. Does nothing on client.
593
436
  *
@@ -598,9 +441,6 @@ interface Weapon {
598
441
  * @source https://wiki.facepunch.com/gmod/Weapon:CallOnClient
599
442
  */
600
443
  CallOnClient(self: Weapon, functionName: string, data?: string): void;
601
- }
602
-
603
- interface Weapon {
604
444
  /**
605
445
  * Returns how much primary ammo is in the magazine.
606
446
  * **NOTE**: This is not shared between clients and will instead return the maximum primary clip size.
@@ -610,9 +450,6 @@ interface Weapon {
610
450
  * @source https://wiki.facepunch.com/gmod/Weapon:Clip1
611
451
  */
612
452
  Clip1(self: Weapon): number;
613
- }
614
-
615
- interface Weapon {
616
453
  /**
617
454
  * Returns how much secondary ammo is in the magazine.
618
455
  * **NOTE**: This is not shared between clients and will instead return the maximum secondary clip size.
@@ -622,9 +459,6 @@ interface Weapon {
622
459
  * @source https://wiki.facepunch.com/gmod/Weapon:Clip2
623
460
  */
624
461
  Clip2(self: Weapon): number;
625
- }
626
-
627
- interface Weapon {
628
462
  /**
629
463
  * Forces the weapon to reload while playing given animation.
630
464
  * **NOTE**: This will stop the [Weapon:Think](https://wiki.facepunch.com/gmod/Weapon:Think) function from getting called while the weapon is reloading!
@@ -634,9 +468,6 @@ interface Weapon {
634
468
  * @source https://wiki.facepunch.com/gmod/Weapon:DefaultReload
635
469
  */
636
470
  DefaultReload(self: Weapon, act: number): boolean;
637
- }
638
-
639
- interface Weapon {
640
471
  /**
641
472
  * Returns the sequence enumeration number that the weapon is playing.
642
473
  *
@@ -646,72 +477,48 @@ interface Weapon {
646
477
  * @source https://wiki.facepunch.com/gmod/Weapon:GetActivity
647
478
  */
648
479
  GetActivity(self: Weapon): number;
649
- }
650
-
651
- interface Weapon {
652
480
  /**
653
481
  * Returns the weapon deploy speed, as set by [Weapon:SetDeploySpeed](https://wiki.facepunch.com/gmod/Weapon:SetDeploySpeed). If not previously set, the value will be polled from the `sv_defaultdeployspeed` [ConVar](https://wiki.facepunch.com/gmod/ConVar).
654
482
  * @realm shared
655
483
  * @source https://wiki.facepunch.com/gmod/Weapon:GetDeploySpeed
656
484
  */
657
485
  GetDeploySpeed(self: Weapon): number;
658
- }
659
-
660
- interface Weapon {
661
486
  /**
662
487
  * Returns the hold type of the weapon.
663
488
  * @realm shared
664
489
  * @source https://wiki.facepunch.com/gmod/Weapon:GetHoldType
665
490
  */
666
491
  GetHoldType(self: Weapon): string;
667
- }
668
-
669
- interface Weapon {
670
492
  /**
671
493
  * Returns maximum primary clip size
672
494
  * @realm shared
673
495
  * @source https://wiki.facepunch.com/gmod/Weapon:GetMaxClip1
674
496
  */
675
497
  GetMaxClip1(self: Weapon): number;
676
- }
677
-
678
- interface Weapon {
679
498
  /**
680
499
  * Returns maximum secondary clip size
681
500
  * @realm shared
682
501
  * @source https://wiki.facepunch.com/gmod/Weapon:GetMaxClip2
683
502
  */
684
503
  GetMaxClip2(self: Weapon): number;
685
- }
686
-
687
- interface Weapon {
688
504
  /**
689
505
  * Gets the next time the weapon can primary fire. ( Can call [WEAPON:PrimaryAttack](https://wiki.facepunch.com/gmod/WEAPON:PrimaryAttack) )
690
506
  * @realm shared
691
507
  * @source https://wiki.facepunch.com/gmod/Weapon:GetNextPrimaryFire
692
508
  */
693
509
  GetNextPrimaryFire(self: Weapon): number;
694
- }
695
-
696
- interface Weapon {
697
510
  /**
698
511
  * Gets the next time the weapon can secondary fire. ( Can call [WEAPON:SecondaryAttack](https://wiki.facepunch.com/gmod/WEAPON:SecondaryAttack) )
699
512
  * @realm shared
700
513
  * @source https://wiki.facepunch.com/gmod/Weapon:GetNextSecondaryFire
701
514
  */
702
515
  GetNextSecondaryFire(self: Weapon): number;
703
- }
704
-
705
- interface Weapon {
706
516
  /**
707
517
  * Gets the primary ammo type of the given weapon.
708
518
  * @realm shared
709
519
  * @source https://wiki.facepunch.com/gmod/Weapon:GetPrimaryAmmoType
710
520
  */
711
521
  GetPrimaryAmmoType(self: Weapon): number;
712
- }
713
-
714
- interface Weapon {
715
522
  /**
716
523
  * Returns the non-internal name of the weapon, that should be for displaying.
717
524
  *
@@ -724,18 +531,12 @@ interface Weapon {
724
531
  * @source https://wiki.facepunch.com/gmod/Weapon:GetPrintName
725
532
  */
726
533
  GetPrintName(self: Weapon): string;
727
- }
728
-
729
- interface Weapon {
730
534
  /**
731
535
  * Gets the ammo type of the given weapons secondary fire.
732
536
  * @realm shared
733
537
  * @source https://wiki.facepunch.com/gmod/Weapon:GetSecondaryAmmoType
734
538
  */
735
539
  GetSecondaryAmmoType(self: Weapon): number;
736
- }
737
-
738
- interface Weapon {
739
540
  /**
740
541
  * Returns the slot of the weapon.
741
542
  * **NOTE**: The slot numbers start from 0.
@@ -744,45 +545,30 @@ interface Weapon {
744
545
  * @source https://wiki.facepunch.com/gmod/Weapon:GetSlot
745
546
  */
746
547
  GetSlot(self: Weapon): number;
747
- }
748
-
749
- interface Weapon {
750
548
  /**
751
549
  * Returns slot position of the weapon
752
550
  * @realm shared
753
551
  * @source https://wiki.facepunch.com/gmod/Weapon:GetSlotPos
754
552
  */
755
553
  GetSlotPos(self: Weapon): number;
756
- }
757
-
758
- interface Weapon {
759
554
  /**
760
555
  * Returns the view model of the weapon.
761
556
  * @realm shared
762
557
  * @source https://wiki.facepunch.com/gmod/Weapon:GetWeaponViewModel
763
558
  */
764
559
  GetWeaponViewModel(self: Weapon): string;
765
- }
766
-
767
- interface Weapon {
768
560
  /**
769
561
  * Returns the world model of the weapon.
770
562
  * @realm shared
771
563
  * @source https://wiki.facepunch.com/gmod/Weapon:GetWeaponWorldModel
772
564
  */
773
565
  GetWeaponWorldModel(self: Weapon): string;
774
- }
775
-
776
- interface Weapon {
777
566
  /**
778
567
  * Returns the "weight" of the weapon, which is used when deciding which [Weapon](https://wiki.facepunch.com/gmod/Weapon) is better by the engine.
779
568
  * @realm shared
780
569
  * @source https://wiki.facepunch.com/gmod/Weapon:GetWeight
781
570
  */
782
571
  GetWeight(self: Weapon): number;
783
- }
784
-
785
- interface Weapon {
786
572
  /**
787
573
  * Returns whether the weapon has ammo left or not. It will return false when there's no ammo left in the magazine **and** when there's no reserve ammo left.
788
574
  *
@@ -793,45 +579,30 @@ interface Weapon {
793
579
  * @source https://wiki.facepunch.com/gmod/Weapon:HasAmmo
794
580
  */
795
581
  HasAmmo(self: Weapon): boolean;
796
- }
797
-
798
- interface Weapon {
799
582
  /**
800
583
  * Returns whenever the weapon is carried by the local player.
801
584
  * @realm client
802
585
  * @source https://wiki.facepunch.com/gmod/Weapon:IsCarriedByLocalPlayer
803
586
  */
804
587
  IsCarriedByLocalPlayer(self: Weapon): boolean;
805
- }
806
-
807
- interface Weapon {
808
588
  /**
809
589
  * Returns whether the weapon is visible. The term visibility is not exactly what gets checked here, first it checks if the owner is a player, then checks if the active view model has EF_NODRAW flag NOT set.
810
590
  * @realm shared
811
591
  * @source https://wiki.facepunch.com/gmod/Weapon:IsWeaponVisible
812
592
  */
813
593
  IsWeaponVisible(self: Weapon): boolean;
814
- }
815
-
816
- interface Weapon {
817
594
  /**
818
595
  * Returns the time since this weapon last fired a bullet with [Entity:FireBullets](https://wiki.facepunch.com/gmod/Entity:FireBullets) in seconds. It is not networked.
819
596
  * @realm shared
820
597
  * @source https://wiki.facepunch.com/gmod/Weapon:LastShootTime
821
598
  */
822
599
  LastShootTime(self: Weapon): number;
823
- }
824
-
825
- interface Weapon {
826
600
  /**
827
601
  * Forces weapon to play activity/animation.
828
602
  * @realm shared
829
603
  * @source https://wiki.facepunch.com/gmod/Weapon:SendWeaponAnim
830
604
  */
831
605
  SendWeaponAnim(self: Weapon, act: number): void;
832
- }
833
-
834
- interface Weapon {
835
606
  /**
836
607
  * Sets the activity the weapon is playing.
837
608
  *
@@ -841,27 +612,18 @@ interface Weapon {
841
612
  * @source https://wiki.facepunch.com/gmod/Weapon:SetActivity
842
613
  */
843
614
  SetActivity(self: Weapon, act: number): void;
844
- }
845
-
846
- interface Weapon {
847
615
  /**
848
616
  * Lets you change the number of bullets in the given weapons primary clip.
849
617
  * @realm shared
850
618
  * @source https://wiki.facepunch.com/gmod/Weapon:SetClip1
851
619
  */
852
620
  SetClip1(self: Weapon, ammo: number): void;
853
- }
854
-
855
- interface Weapon {
856
621
  /**
857
622
  * Lets you change the number of bullets in the given weapons secondary clip.
858
623
  * @realm shared
859
624
  * @source https://wiki.facepunch.com/gmod/Weapon:SetClip2
860
625
  */
861
626
  SetClip2(self: Weapon, ammo: number): void;
862
- }
863
-
864
- interface Weapon {
865
627
  /**
866
628
  * Sets the hold type of the weapon. This function also calls [WEAPON:SetWeaponHoldType](https://wiki.facepunch.com/gmod/WEAPON:SetWeaponHoldType) and properly networks it to all clients.
867
629
  *
@@ -874,9 +636,6 @@ interface Weapon {
874
636
  * @source https://wiki.facepunch.com/gmod/Weapon:SetHoldType
875
637
  */
876
638
  SetHoldType(self: Weapon, name: string): void;
877
- }
878
-
879
- interface Weapon {
880
639
  /**
881
640
  * Sets the time since this weapon last fired in seconds. Used in conjunction with [Weapon:LastShootTime](https://wiki.facepunch.com/gmod/Weapon:LastShootTime).
882
641
  *
@@ -886,9 +645,6 @@ interface Weapon {
886
645
  * @source https://wiki.facepunch.com/gmod/Weapon:SetLastShootTime
887
646
  */
888
647
  SetLastShootTime(self: Weapon, time?: number): void;
889
- }
890
-
891
- interface Weapon {
892
648
  /**
893
649
  * Sets when the weapon can fire again. Time should be based on [Global.CurTime](https://wiki.facepunch.com/gmod/Global.CurTime).
894
650
  *
@@ -900,9 +656,6 @@ interface Weapon {
900
656
  * @source https://wiki.facepunch.com/gmod/Weapon:SetNextPrimaryFire
901
657
  */
902
658
  SetNextPrimaryFire(self: Weapon, time: number): void;
903
- }
904
-
905
- interface Weapon {
906
659
  /**
907
660
  * Sets when the weapon can alt-fire again. Time should be based on [Global.CurTime](https://wiki.facepunch.com/gmod/Global.CurTime).
908
661
  * @realm shared
@@ -910,4 +663,88 @@ interface Weapon {
910
663
  */
911
664
  SetNextSecondaryFire(self: Weapon, time: number): void;
912
665
  }
666
+ interface WEAPON extends Weapon {}
667
+
668
+
669
+
670
+
671
+
672
+
673
+
674
+
675
+
676
+
677
+
678
+
679
+
680
+
681
+
682
+
683
+
684
+
685
+
686
+
687
+
688
+
689
+
690
+
691
+
692
+
693
+
694
+
695
+
696
+
697
+
698
+
699
+
700
+
701
+
702
+
703
+
704
+
705
+
706
+
707
+
708
+
709
+
710
+
711
+
712
+
713
+
714
+
715
+
716
+
717
+
718
+
719
+
720
+
721
+
722
+
723
+
724
+
725
+
726
+
727
+
728
+
729
+
730
+
731
+
732
+
733
+
734
+
735
+
736
+
737
+
738
+
739
+
740
+
741
+
742
+
743
+
744
+
745
+
746
+
747
+
748
+
749
+
913
750