@tlua/gmod 1.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +28 -0
- package/__metadata.json +4 -0
- package/_globals.d.tlua +178 -0
- package/_gmod-std.d.tlua +35 -0
- package/achievementicon.d.tlua +12 -0
- package/achievements.d.tlua +162 -0
- package/ai.d.tlua +65 -0
- package/ai_schedule.d.tlua +17 -0
- package/ai_task.d.tlua +17 -0
- package/angle.d.tlua +197 -0
- package/avatarimage.d.tlua +10 -0
- package/awesomium.d.tlua +14 -0
- package/baseclass.d.tlua +42 -0
- package/bf_read.d.tlua +110 -0
- package/bit.d.tlua +121 -0
- package/button.d.tlua +13 -0
- package/cam.d.tlua +220 -0
- package/ceffectdata.d.tlua +337 -0
- package/chat.d.tlua +62 -0
- package/checkbutton.d.tlua +14 -0
- package/cleanup.d.tlua +88 -0
- package/cluaemitter.d.tlua +119 -0
- package/clualocomotion.d.tlua +383 -0
- package/cluaparticle.d.tlua +426 -0
- package/cmovedata.d.tlua +476 -0
- package/cnavarea.d.tlua +845 -0
- package/cnavladder.d.tlua +209 -0
- package/cnewparticleeffect.d.tlua +259 -0
- package/color.d.tlua +339 -0
- package/concommand.d.tlua +69 -0
- package/constraint.d.tlua +311 -0
- package/construct.d.tlua +26 -0
- package/contentheader.d.tlua +32 -0
- package/contenticon.d.tlua +86 -0
- package/contentsidebar.d.tlua +45 -0
- package/contentsidebartoolbox.d.tlua +13 -0
- package/contextbase.d.tlua +37 -0
- package/controlpanel.d.tlua +140 -0
- package/controlpresets.d.tlua +118 -0
- package/convar.d.tlua +162 -0
- package/cookie.d.tlua +60 -0
- package/coroutine.d.tlua +90 -0
- package/crecipientfilter.d.tlua +152 -0
- package/csent.d.tlua +10 -0
- package/csoundpatch.d.tlua +150 -0
- package/ctakedamageinfo.d.tlua +366 -0
- package/ctrllistbox.d.tlua +12 -0
- package/ctrlnumpad.d.tlua +73 -0
- package/cusercmd.d.tlua +320 -0
- package/custom_classes.d.tlua +65 -0
- package/custom_entity_fields.d.tlua +96 -0
- package/cvars.d.tlua +80 -0
- package/dadjustablemodelpanel.d.tlua +81 -0
- package/dalphabar.d.tlua +27 -0
- package/dbinder.d.tlua +37 -0
- package/dbubblecontainer.d.tlua +18 -0
- package/dbutton.d.tlua +88 -0
- package/dcategoryheader.d.tlua +13 -0
- package/dcategorylist.d.tlua +11 -0
- package/dcheckbox.d.tlua +46 -0
- package/dcheckboxlabel.d.tlua +90 -0
- package/dcollapsiblecategory.d.tlua +240 -0
- package/dcolorbutton.d.tlua +73 -0
- package/dcolorcombo.d.tlua +54 -0
- package/dcolorcube.d.tlua +137 -0
- package/dcolormixer.d.tlua +303 -0
- package/dcolorpalette.d.tlua +294 -0
- package/dcolumnsheet.d.tlua +49 -0
- package/dcombobox.d.tlua +161 -0
- package/ddragbase.d.tlua +151 -0
- package/ddrawer.d.tlua +72 -0
- package/debug.d.tlua +236 -0
- package/debugoverlay.d.tlua +193 -0
- package/dentityproperties.d.tlua +63 -0
- package/derma.d.tlua +119 -0
- package/dexpandbutton.d.tlua +30 -0
- package/dfilebrowser.d.tlua +228 -0
- package/dform.d.tlua +176 -0
- package/dframe.d.tlua +261 -0
- package/dgrid.d.tlua +113 -0
- package/dhorizontaldivider.d.tlua +196 -0
- package/dhorizontalscroller.d.tlua +104 -0
- package/dhscrollbar.d.tlua +109 -0
- package/dhtml.d.tlua +91 -0
- package/dhtmlcontrols.d.tlua +62 -0
- package/diconbrowser.d.tlua +113 -0
- package/diconlayout.d.tlua +190 -0
- package/dimage.d.tlua +221 -0
- package/dimagebutton.d.tlua +103 -0
- package/dkillicon.d.tlua +9 -0
- package/dlabel.d.tlua +385 -0
- package/dlabeleditable.d.tlua +51 -0
- package/dlabelurl.d.tlua +100 -0
- package/dlistbox.d.tlua +82 -0
- package/dlistboxitem.d.tlua +42 -0
- package/dlistlayout.d.tlua +14 -0
- package/dlistview.d.tlua +360 -0
- package/dlistview_column.d.tlua +135 -0
- package/dlistview_columnplain.d.tlua +11 -0
- package/dlistview_draggerbar.d.tlua +11 -0
- package/dlistview_line.d.tlua +140 -0
- package/dlistviewheaderlabel.d.tlua +11 -0
- package/dlistviewlabel.d.tlua +11 -0
- package/dlistviewline.d.tlua +11 -0
- package/dmenu.d.tlua +266 -0
- package/dmenubar.d.tlua +42 -0
- package/dmenuoption.d.tlua +135 -0
- package/dmenuoptioncvar.d.tlua +64 -0
- package/dmodelpanel.d.tlua +207 -0
- package/dmodelselect.d.tlua +20 -0
- package/dmodelselectmulti.d.tlua +19 -0
- package/dnotify.d.tlua +93 -0
- package/dnumberscratch.d.tlua +284 -0
- package/dnumberwang.d.tlua +147 -0
- package/dnumpad.d.tlua +11 -0
- package/dnumslider.d.tlua +182 -0
- package/dpanel.d.tlua +152 -0
- package/dpanellist.d.tlua +109 -0
- package/dpaneloverlay.d.tlua +65 -0
- package/dpanelselect.d.tlua +13 -0
- package/dpanpanel.d.tlua +64 -0
- package/dprogress.d.tlua +27 -0
- package/dproperties.d.tlua +52 -0
- package/dproperty_boolean.d.tlua +12 -0
- package/dproperty_combo.d.tlua +31 -0
- package/dproperty_entity.d.tlua +12 -0
- package/dproperty_float.d.tlua +12 -0
- package/dproperty_generic.d.tlua +50 -0
- package/dproperty_int.d.tlua +12 -0
- package/dproperty_vectorcolor.d.tlua +14 -0
- package/dpropertysheet.d.tlua +167 -0
- package/dragndrop.d.tlua +123 -0
- package/draw.d.tlua +162 -0
- package/drgbpicker.d.tlua +49 -0
- package/drive.d.tlua +159 -0
- package/dscrollbargrip.d.tlua +13 -0
- package/dscrollpanel.d.tlua +110 -0
- package/dshape.d.tlua +72 -0
- package/dsizetocontents.d.tlua +46 -0
- package/dslider.d.tlua +302 -0
- package/dsprite.d.tlua +84 -0
- package/dtab.d.tlua +81 -0
- package/dtextentry.d.tlua +442 -0
- package/dtilelayout.d.tlua +218 -0
- package/dtooltip.d.tlua +76 -0
- package/dtree.d.tlua +185 -0
- package/dtree_node.d.tlua +793 -0
- package/dtree_node_button.d.tlua +13 -0
- package/duplicator.d.tlua +338 -0
- package/dverticaldivider.d.tlua +223 -0
- package/dvscrollbar.d.tlua +109 -0
- package/editablepanel.d.tlua +10 -0
- package/effect.d.tlua +121 -0
- package/effects.d.tlua +77 -0
- package/engine.d.tlua +248 -0
- package/entity.d.tlua +8295 -0
- package/ents.d.tlua +267 -0
- package/enums.d.tlua +7082 -0
- package/file.d.tlua +419 -0
- package/file_class.d.tlua +7 -0
- package/fingerposer.d.tlua +12 -0
- package/fingervar.d.tlua +13 -0
- package/frame.d.tlua +11 -0
- package/frame_blend.d.tlua +105 -0
- package/game.d.tlua +482 -0
- package/gameevent.d.tlua +968 -0
- package/gamemode.d.tlua +48 -0
- package/global.d.tlua +3156 -0
- package/gm.d.tlua +3218 -0
- package/gmod.d.tlua +20 -0
- package/gmsave.d.tlua +53 -0
- package/gui.d.tlua +232 -0
- package/gwen.d.tlua +55 -0
- package/halo.d.tlua +42 -0
- package/hammer.d.tlua +17 -0
- package/hook.d.tlua +64 -0
- package/html.d.tlua +22 -0
- package/http.d.tlua +72 -0
- package/iconeditor.d.tlua +130 -0
- package/igmodaudiochannel.d.tlua +419 -0
- package/imagecheckbox.d.tlua +48 -0
- package/imaterial.d.tlua +288 -0
- package/imesh.d.tlua +70 -0
- package/index.d.tlua +277 -0
- package/input.d.tlua +252 -0
- package/invalidateinternalentitycache.d.tlua +13 -0
- package/irestore.d.tlua +94 -0
- package/isave.d.tlua +94 -0
- package/itexture.d.tlua +108 -0
- package/ivideowriter.d.tlua +53 -0
- package/jit.d.tlua +243 -0
- package/killicon.d.tlua +84 -0
- package/label.d.tlua +20 -0
- package/language.d.tlua +26 -0
- package/list.d.tlua +112 -0
- package/makeballoon.d.tlua +15 -0
- package/markup.d.tlua +38 -0
- package/markupobject.d.tlua +53 -0
- package/material.d.tlua +9 -0
- package/math.d.tlua +899 -0
- package/matproxy.d.tlua +60 -0
- package/matselect.d.tlua +106 -0
- package/menu.d.tlua +20 -0
- package/menubar.d.tlua +39 -0
- package/mesh.d.tlua +183 -0
- package/modelimage.d.tlua +12 -0
- package/motionsensor.d.tlua +115 -0
- package/navmesh.d.tlua +274 -0
- package/net.d.tlua +639 -0
- package/nextbot.d.tlua +380 -0
- package/notification.d.tlua +35 -0
- package/npc.d.tlua +1787 -0
- package/numpad.d.tlua +89 -0
- package/os.d.tlua +56 -0
- package/package.d.tlua +15 -0
- package/package.json +18 -0
- package/panel.d.tlua +3650 -0
- package/panellist.d.tlua +13 -0
- package/pathfollower.d.tlua +301 -0
- package/permissions.d.tlua +77 -0
- package/physcollide.d.tlua +40 -0
- package/physenv.d.tlua +136 -0
- package/physobj.d.tlua +799 -0
- package/pixelvis_handle_t.d.tlua +9 -0
- package/player.d.tlua +3320 -0
- package/player_manager.d.tlua +147 -0
- package/preseteditor.d.tlua +13 -0
- package/presets.d.tlua +79 -0
- package/projectedtexture.d.tlua +553 -0
- package/properties.d.tlua +65 -0
- package/propselect.d.tlua +50 -0
- package/radiobutton.d.tlua +13 -0
- package/render.d.tlua +1700 -0
- package/resource.d.tlua +73 -0
- package/richtext.d.tlua +17 -0
- package/sandbox.d.tlua +576 -0
- package/saverestore.d.tlua +148 -0
- package/schedule.d.tlua +69 -0
- package/scripted_ents.d.tlua +124 -0
- package/search.d.tlua +26 -0
- package/serverlist.d.tlua +85 -0
- package/slidebar.d.tlua +12 -0
- package/slider.d.tlua +11 -0
- package/sound.d.tlua +140 -0
- package/spawnicon.d.tlua +95 -0
- package/spawnmenu.d.tlua +286 -0
- package/spawnmenucontentpanel.d.tlua +52 -0
- package/sql.d.tlua +154 -0
- package/stack.d.tlua +57 -0
- package/steamworks.d.tlua +208 -0
- package/string.d.tlua +535 -0
- package/structures.d.tlua +4442 -0
- package/surface.d.tlua +463 -0
- package/surfaceinfo.d.tlua +70 -0
- package/system.d.tlua +134 -0
- package/table.d.tlua +533 -0
- package/task.d.tlua +92 -0
- package/team.d.tlua +195 -0
- package/textentry.d.tlua +12 -0
- package/tgaimage.d.tlua +11 -0
- package/timer.d.tlua +198 -0
- package/tool.d.tlua +466 -0
- package/ugcpublishwindow.d.tlua +83 -0
- package/umsg.d.tlua +147 -0
- package/undo.d.tlua +122 -0
- package/urllabel.d.tlua +13 -0
- package/usermessage.d.tlua +48 -0
- package/utf8.d.tlua +89 -0
- package/util.d.tlua +1087 -0
- package/vector.d.tlua +413 -0
- package/vehicle.d.tlua +472 -0
- package/vgui.d.tlua +201 -0
- package/video.d.tlua +17 -0
- package/vmatrix.d.tlua +392 -0
- package/weapon.d.tlua +913 -0
- package/weapons.d.tlua +90 -0
- package/widgets.d.tlua +29 -0
- package/workshopfilebase.d.tlua +68 -0
|
@@ -0,0 +1,152 @@
|
|
|
1
|
+
// AUTO-GENERATED tlua declarations. Do not edit by hand.
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* List of all possible functions to manipulate Recipient Filters. Can be created with [Global.RecipientFilter](https://wiki.facepunch.com/gmod/Global.RecipientFilter).
|
|
5
|
+
* @source https://wiki.facepunch.com/gmod/CRecipientFilter
|
|
6
|
+
*/
|
|
7
|
+
interface CRecipientFilter {}
|
|
8
|
+
|
|
9
|
+
interface CRecipientFilter {
|
|
10
|
+
/**
|
|
11
|
+
* Adds all players to the recipient filter.
|
|
12
|
+
* @realm server
|
|
13
|
+
* @source https://wiki.facepunch.com/gmod/CRecipientFilter:AddAllPlayers
|
|
14
|
+
*/
|
|
15
|
+
AddAllPlayers(self: CRecipientFilter): void;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
interface CRecipientFilter {
|
|
19
|
+
/**
|
|
20
|
+
* Adds all players that are in the same [PAS (Potentially Audible Set)](https://developer.valvesoftware.com/wiki/PAS "PAS - Valve Developer Community") as this position.
|
|
21
|
+
* @realm server
|
|
22
|
+
* @source https://wiki.facepunch.com/gmod/CRecipientFilter:AddPAS
|
|
23
|
+
*/
|
|
24
|
+
AddPAS(self: CRecipientFilter, pos: Vector): void;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
interface CRecipientFilter {
|
|
28
|
+
/**
|
|
29
|
+
* Adds all players that are in the same [PVS (Potential Visibility Set)](https://developer.valvesoftware.com/wiki/PVS "PVS - Valve Developer Community") as this position.
|
|
30
|
+
* @realm server
|
|
31
|
+
* @source https://wiki.facepunch.com/gmod/CRecipientFilter:AddPVS
|
|
32
|
+
*/
|
|
33
|
+
AddPVS(self: CRecipientFilter, Position: Vector): void;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
interface CRecipientFilter {
|
|
37
|
+
/**
|
|
38
|
+
* Adds a player to the recipient filter
|
|
39
|
+
* @realm server
|
|
40
|
+
* @source https://wiki.facepunch.com/gmod/CRecipientFilter:AddPlayer
|
|
41
|
+
*/
|
|
42
|
+
AddPlayer(self: CRecipientFilter, Player: Player): void;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
interface CRecipientFilter {
|
|
46
|
+
/**
|
|
47
|
+
* Adds players to the recipient filter from a given table or another recipient filter.
|
|
48
|
+
* @realm server
|
|
49
|
+
* @source https://wiki.facepunch.com/gmod/CRecipientFilter:AddPlayers
|
|
50
|
+
*/
|
|
51
|
+
AddPlayers(self: CRecipientFilter, input: CRecipientFilter | Player[]): void;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
interface CRecipientFilter {
|
|
55
|
+
/**
|
|
56
|
+
* Adds all players that are on the given team to the filter.
|
|
57
|
+
* @realm server
|
|
58
|
+
* @source https://wiki.facepunch.com/gmod/CRecipientFilter:AddRecipientsByTeam
|
|
59
|
+
*/
|
|
60
|
+
AddRecipientsByTeam(self: CRecipientFilter, teamid: number): void;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
interface CRecipientFilter {
|
|
64
|
+
/**
|
|
65
|
+
* Returns the number of valid players in the recipient filter.
|
|
66
|
+
* @realm server
|
|
67
|
+
* @source https://wiki.facepunch.com/gmod/CRecipientFilter:GetCount
|
|
68
|
+
*/
|
|
69
|
+
GetCount(self: CRecipientFilter): number;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
interface CRecipientFilter {
|
|
73
|
+
/**
|
|
74
|
+
* Returns a table of all valid players currently in the recipient filter.
|
|
75
|
+
* @realm server
|
|
76
|
+
* @source https://wiki.facepunch.com/gmod/CRecipientFilter:GetPlayers
|
|
77
|
+
*/
|
|
78
|
+
GetPlayers(self: CRecipientFilter): Player[];
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
interface CRecipientFilter {
|
|
82
|
+
/**
|
|
83
|
+
* Removes all players from the recipient filter.
|
|
84
|
+
* @realm server
|
|
85
|
+
* @source https://wiki.facepunch.com/gmod/CRecipientFilter:RemoveAllPlayers
|
|
86
|
+
*/
|
|
87
|
+
RemoveAllPlayers(self: CRecipientFilter): void;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
interface CRecipientFilter {
|
|
91
|
+
/**
|
|
92
|
+
* Remove players from this recipient filter that are **NOT** present in a given table or recipient filter.
|
|
93
|
+
* @realm server
|
|
94
|
+
* @source https://wiki.facepunch.com/gmod/CRecipientFilter:RemoveMismatchedPlayers
|
|
95
|
+
*/
|
|
96
|
+
RemoveMismatchedPlayers(self: CRecipientFilter, input: CRecipientFilter): void;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
interface CRecipientFilter {
|
|
100
|
+
/**
|
|
101
|
+
* Removes all players from the filter that are in [PAS (Potentially Audible Set)](https://developer.valvesoftware.com/wiki/PAS "PAS - Valve Developer Community") for given position.
|
|
102
|
+
* @realm server
|
|
103
|
+
* @source https://wiki.facepunch.com/gmod/CRecipientFilter:RemovePAS
|
|
104
|
+
*/
|
|
105
|
+
RemovePAS(self: CRecipientFilter, position: Vector): void;
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
interface CRecipientFilter {
|
|
109
|
+
/**
|
|
110
|
+
* Removes all players that can see this [PVS (Potential Visibility Set)](https://developer.valvesoftware.com/wiki/PVS "PVS - Valve Developer Community") from the recipient filter.
|
|
111
|
+
* @realm server
|
|
112
|
+
* @source https://wiki.facepunch.com/gmod/CRecipientFilter:RemovePVS
|
|
113
|
+
*/
|
|
114
|
+
RemovePVS(self: CRecipientFilter, pos: Vector): void;
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
interface CRecipientFilter {
|
|
118
|
+
/**
|
|
119
|
+
* Removes the player from the recipient filter.
|
|
120
|
+
* @realm server
|
|
121
|
+
* @source https://wiki.facepunch.com/gmod/CRecipientFilter:RemovePlayer
|
|
122
|
+
*/
|
|
123
|
+
RemovePlayer(self: CRecipientFilter, Player: Player): void;
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
interface CRecipientFilter {
|
|
127
|
+
/**
|
|
128
|
+
* Remove players from this recipient filter that are present in a given table or recipient filter.
|
|
129
|
+
* @realm server
|
|
130
|
+
* @source https://wiki.facepunch.com/gmod/CRecipientFilter:RemovePlayers
|
|
131
|
+
*/
|
|
132
|
+
RemovePlayers(self: CRecipientFilter, input: CRecipientFilter): void;
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
interface CRecipientFilter {
|
|
136
|
+
/**
|
|
137
|
+
* Removes all players that are on the given team from the filter.
|
|
138
|
+
* @realm server
|
|
139
|
+
* @source https://wiki.facepunch.com/gmod/CRecipientFilter:RemoveRecipientsByTeam
|
|
140
|
+
*/
|
|
141
|
+
RemoveRecipientsByTeam(self: CRecipientFilter, teamid: number): void;
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
interface CRecipientFilter {
|
|
145
|
+
/**
|
|
146
|
+
* Removes all players that are not on the given team from the filter.
|
|
147
|
+
* @realm server
|
|
148
|
+
* @source https://wiki.facepunch.com/gmod/CRecipientFilter:RemoveRecipientsNotOnTeam
|
|
149
|
+
*/
|
|
150
|
+
RemoveRecipientsNotOnTeam(self: CRecipientFilter, teamid: number): void;
|
|
151
|
+
}
|
|
152
|
+
|
package/csent.d.tlua
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
// AUTO-GENERATED tlua declarations. Do not edit by hand.
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* CSEnt is a client-side only entity which can be created with [Global.ClientsideModel](https://wiki.facepunch.com/gmod/Global.ClientsideModel), [Global.ClientsideRagdoll](https://wiki.facepunch.com/gmod/Global.ClientsideRagdoll) and [Global.ClientsideScene](https://wiki.facepunch.com/gmod/Global.ClientsideScene).
|
|
5
|
+
*
|
|
6
|
+
* Its base class is [Entity](https://wiki.facepunch.com/gmod/Entity) so it inherits all of the client and shared functions used by [Entity](https://wiki.facepunch.com/gmod/Entity).
|
|
7
|
+
* @source https://wiki.facepunch.com/gmod/CSEnt
|
|
8
|
+
*/
|
|
9
|
+
interface CSEnt extends Entity {}
|
|
10
|
+
|
|
@@ -0,0 +1,150 @@
|
|
|
1
|
+
// AUTO-GENERATED tlua declarations. Do not edit by hand.
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* CSoundPatch class.
|
|
5
|
+
*
|
|
6
|
+
* Created with [Global.CreateSound](https://wiki.facepunch.com/gmod/Global.CreateSound)
|
|
7
|
+
* @source https://wiki.facepunch.com/gmod/CSoundPatch
|
|
8
|
+
*/
|
|
9
|
+
interface CSoundPatch {}
|
|
10
|
+
|
|
11
|
+
interface CSoundPatch {
|
|
12
|
+
/**
|
|
13
|
+
* Adjust the pitch, also known as the speed at which the sound is being played.
|
|
14
|
+
*
|
|
15
|
+
* Appears to only work while the sound is being played. See also [CSoundPatch:PlayEx](https://wiki.facepunch.com/gmod/CSoundPatch:PlayEx).
|
|
16
|
+
*
|
|
17
|
+
* This invokes [GM:EntityEmitSound](https://wiki.facepunch.com/gmod/GM:EntityEmitSound).
|
|
18
|
+
*
|
|
19
|
+
* @realm shared
|
|
20
|
+
* @source https://wiki.facepunch.com/gmod/CSoundPatch:ChangePitch
|
|
21
|
+
*/
|
|
22
|
+
ChangePitch(self: CSoundPatch, pitch: number, deltaTime?: number): void;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
interface CSoundPatch {
|
|
26
|
+
/**
|
|
27
|
+
* Adjusts the volume of the sound played.
|
|
28
|
+
*
|
|
29
|
+
* Appears to only work while the sound is being played. See also [CSoundPatch:PlayEx](https://wiki.facepunch.com/gmod/CSoundPatch:PlayEx).
|
|
30
|
+
*
|
|
31
|
+
* @realm shared
|
|
32
|
+
* @source https://wiki.facepunch.com/gmod/CSoundPatch:ChangeVolume
|
|
33
|
+
*/
|
|
34
|
+
ChangeVolume(self: CSoundPatch, volume: number, deltaTime?: number): void;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
interface CSoundPatch {
|
|
38
|
+
/**
|
|
39
|
+
* Fades out the volume of the sound from the current volume to 0 in the given amount of seconds.
|
|
40
|
+
* @realm shared
|
|
41
|
+
* @source https://wiki.facepunch.com/gmod/CSoundPatch:FadeOut
|
|
42
|
+
*/
|
|
43
|
+
FadeOut(self: CSoundPatch, seconds: number): void;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
interface CSoundPatch {
|
|
47
|
+
/**
|
|
48
|
+
* Returns the DSP (Digital Signal Processor) effect ID for the sound.
|
|
49
|
+
* @realm shared
|
|
50
|
+
* @source https://wiki.facepunch.com/gmod/CSoundPatch:GetDSP
|
|
51
|
+
*/
|
|
52
|
+
GetDSP(self: CSoundPatch): number;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
interface CSoundPatch {
|
|
56
|
+
/**
|
|
57
|
+
* Returns the current pitch.
|
|
58
|
+
* @realm shared
|
|
59
|
+
* @source https://wiki.facepunch.com/gmod/CSoundPatch:GetPitch
|
|
60
|
+
*/
|
|
61
|
+
GetPitch(self: CSoundPatch): number;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
interface CSoundPatch {
|
|
65
|
+
/**
|
|
66
|
+
* Returns the current sound level.
|
|
67
|
+
* @realm shared
|
|
68
|
+
* @source https://wiki.facepunch.com/gmod/CSoundPatch:GetSoundLevel
|
|
69
|
+
*/
|
|
70
|
+
GetSoundLevel(self: CSoundPatch): number;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
interface CSoundPatch {
|
|
74
|
+
/**
|
|
75
|
+
* Returns the sound name of this sound patch. This may be name of a sound script ([sound.Add](https://wiki.facepunch.com/gmod/sound.Add)) or a file path.
|
|
76
|
+
* @realm shared
|
|
77
|
+
* @source https://wiki.facepunch.com/gmod/CSoundPatch:GetSoundName
|
|
78
|
+
*/
|
|
79
|
+
GetSoundName(self: CSoundPatch): string;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
interface CSoundPatch {
|
|
83
|
+
/**
|
|
84
|
+
* Returns the current volume.
|
|
85
|
+
* @realm shared
|
|
86
|
+
* @source https://wiki.facepunch.com/gmod/CSoundPatch:GetVolume
|
|
87
|
+
*/
|
|
88
|
+
GetVolume(self: CSoundPatch): number;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
interface CSoundPatch {
|
|
92
|
+
/**
|
|
93
|
+
* Returns whenever the sound is being played.
|
|
94
|
+
* @realm shared
|
|
95
|
+
* @source https://wiki.facepunch.com/gmod/CSoundPatch:IsPlaying
|
|
96
|
+
*/
|
|
97
|
+
IsPlaying(self: CSoundPatch): boolean;
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
interface CSoundPatch {
|
|
101
|
+
/**
|
|
102
|
+
* Starts to play the sound. This will reset the sound's volume and pitch to their default values. See [CSoundPatch:PlayEx](https://wiki.facepunch.com/gmod/CSoundPatch:PlayEx)
|
|
103
|
+
* @realm shared
|
|
104
|
+
* @source https://wiki.facepunch.com/gmod/CSoundPatch:Play
|
|
105
|
+
*/
|
|
106
|
+
Play(self: CSoundPatch): void;
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
interface CSoundPatch {
|
|
110
|
+
/**
|
|
111
|
+
* Same as [CSoundPatch:Play](https://wiki.facepunch.com/gmod/CSoundPatch:Play) but with 2 extra arguments allowing to set volume and pitch directly.
|
|
112
|
+
* @realm shared
|
|
113
|
+
* @source https://wiki.facepunch.com/gmod/CSoundPatch:PlayEx
|
|
114
|
+
*/
|
|
115
|
+
PlayEx(self: CSoundPatch, volume: number, pitch: number): void;
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
interface CSoundPatch {
|
|
119
|
+
/**
|
|
120
|
+
* Sets the DSP (Digital Signal Processor) effect for the sound.
|
|
121
|
+
*
|
|
122
|
+
* Similar to [Player:SetDSP](https://wiki.facepunch.com/gmod/Player:SetDSP) but for individual sounds.
|
|
123
|
+
*
|
|
124
|
+
* @realm shared
|
|
125
|
+
* @source https://wiki.facepunch.com/gmod/CSoundPatch:SetDSP
|
|
126
|
+
*/
|
|
127
|
+
SetDSP(self: CSoundPatch, dspEffectId: number): void;
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
interface CSoundPatch {
|
|
131
|
+
/**
|
|
132
|
+
* Sets the sound level in decibel.
|
|
133
|
+
* @realm shared
|
|
134
|
+
* @source https://wiki.facepunch.com/gmod/CSoundPatch:SetSoundLevel
|
|
135
|
+
*/
|
|
136
|
+
SetSoundLevel(self: CSoundPatch, level: number): void;
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
interface CSoundPatch {
|
|
140
|
+
/**
|
|
141
|
+
* Stops the sound from being played.
|
|
142
|
+
*
|
|
143
|
+
* This will not work if the entity attached to this sound patch (specified by [Global.CreateSound](https://wiki.facepunch.com/gmod/Global.CreateSound)) is invalid.
|
|
144
|
+
*
|
|
145
|
+
* @realm shared
|
|
146
|
+
* @source https://wiki.facepunch.com/gmod/CSoundPatch:Stop
|
|
147
|
+
*/
|
|
148
|
+
Stop(self: CSoundPatch): void;
|
|
149
|
+
}
|
|
150
|
+
|
|
@@ -0,0 +1,366 @@
|
|
|
1
|
+
// AUTO-GENERATED tlua declarations. Do not edit by hand.
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* A class used to store and modify all the data concerning a damage event.
|
|
5
|
+
* An empty CTakeDamageInfo object can be created with [Global.DamageInfo](https://wiki.facepunch.com/gmod/Global.DamageInfo)
|
|
6
|
+
*
|
|
7
|
+
* List of hooks that this object is passed to:
|
|
8
|
+
* * [ENTITY:OnTakeDamage](https://wiki.facepunch.com/gmod/ENTITY:OnTakeDamage)
|
|
9
|
+
* * [GM:DoPlayerDeath](https://wiki.facepunch.com/gmod/GM:DoPlayerDeath)
|
|
10
|
+
* * [GM:EntityTakeDamage](https://wiki.facepunch.com/gmod/GM:EntityTakeDamage)
|
|
11
|
+
* * [GM:PostEntityTakeDamage](https://wiki.facepunch.com/gmod/GM:PostEntityTakeDamage)
|
|
12
|
+
* * [GM:OnDamagedByExplosion](https://wiki.facepunch.com/gmod/GM:OnDamagedByExplosion)
|
|
13
|
+
* * [GM:ScaleNPCDamage](https://wiki.facepunch.com/gmod/GM:ScaleNPCDamage)
|
|
14
|
+
* * [GM:ScalePlayerDamage](https://wiki.facepunch.com/gmod/GM:ScalePlayerDamage)
|
|
15
|
+
* * [NEXTBOT:OnInjured](https://wiki.facepunch.com/gmod/NEXTBOT:OnInjured)
|
|
16
|
+
* * [NEXTBOT:OnKilled](https://wiki.facepunch.com/gmod/NEXTBOT:OnKilled)
|
|
17
|
+
* * [NEXTBOT:OnOtherKilled](https://wiki.facepunch.com/gmod/NEXTBOT:OnOtherKilled)
|
|
18
|
+
*
|
|
19
|
+
* List of functions that use this object:
|
|
20
|
+
* * [util.BlastDamageInfo](https://wiki.facepunch.com/gmod/util.BlastDamageInfo)
|
|
21
|
+
* * [Entity:TakeDamageInfo](https://wiki.facepunch.com/gmod/Entity:TakeDamageInfo)
|
|
22
|
+
* * [Entity:TakePhysicsDamage](https://wiki.facepunch.com/gmod/Entity:TakePhysicsDamage)
|
|
23
|
+
* * [Entity:DispatchTraceAttack](https://wiki.facepunch.com/gmod/Entity:DispatchTraceAttack)
|
|
24
|
+
* @source https://wiki.facepunch.com/gmod/CTakeDamageInfo
|
|
25
|
+
*/
|
|
26
|
+
interface CTakeDamageInfo {}
|
|
27
|
+
|
|
28
|
+
interface CTakeDamageInfo {
|
|
29
|
+
/**
|
|
30
|
+
* Increases the damage by damageIncrease.
|
|
31
|
+
* @realm shared
|
|
32
|
+
* @source https://wiki.facepunch.com/gmod/CTakeDamageInfo:AddDamage
|
|
33
|
+
*/
|
|
34
|
+
AddDamage(self: CTakeDamageInfo, damageIncrease: number): void;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
interface CTakeDamageInfo {
|
|
38
|
+
/**
|
|
39
|
+
* Returns the ammo type used by the weapon that inflicted the damage.
|
|
40
|
+
* @realm shared
|
|
41
|
+
* @source https://wiki.facepunch.com/gmod/CTakeDamageInfo:GetAmmoType
|
|
42
|
+
*/
|
|
43
|
+
GetAmmoType(self: CTakeDamageInfo): number;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
interface CTakeDamageInfo {
|
|
47
|
+
/**
|
|
48
|
+
* Returns the attacker ( character who originated the attack ), for example a player or an NPC that shot the weapon.
|
|
49
|
+
* @realm shared
|
|
50
|
+
* @source https://wiki.facepunch.com/gmod/CTakeDamageInfo:GetAttacker
|
|
51
|
+
*/
|
|
52
|
+
GetAttacker(self: CTakeDamageInfo): Entity;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
interface CTakeDamageInfo {
|
|
56
|
+
/**
|
|
57
|
+
* Returns the initial unmodified by skill level ( [game.GetSkillLevel](https://wiki.facepunch.com/gmod/game.GetSkillLevel) ) damage.
|
|
58
|
+
* @realm shared
|
|
59
|
+
* @source https://wiki.facepunch.com/gmod/CTakeDamageInfo:GetBaseDamage
|
|
60
|
+
*/
|
|
61
|
+
GetBaseDamage(self: CTakeDamageInfo): number;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
interface CTakeDamageInfo {
|
|
65
|
+
/**
|
|
66
|
+
* Returns the total damage.
|
|
67
|
+
* @realm shared
|
|
68
|
+
* @source https://wiki.facepunch.com/gmod/CTakeDamageInfo:GetDamage
|
|
69
|
+
*/
|
|
70
|
+
GetDamage(self: CTakeDamageInfo): number;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
interface CTakeDamageInfo {
|
|
74
|
+
/**
|
|
75
|
+
* Gets the current bonus damage.
|
|
76
|
+
* @realm shared
|
|
77
|
+
* @source https://wiki.facepunch.com/gmod/CTakeDamageInfo:GetDamageBonus
|
|
78
|
+
*/
|
|
79
|
+
GetDamageBonus(self: CTakeDamageInfo): number;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
interface CTakeDamageInfo {
|
|
83
|
+
/**
|
|
84
|
+
* Gets the custom damage type. This is used by Day of Defeat: Source and Team Fortress 2 for extended damage info, but isn't used in Garry's Mod by default.
|
|
85
|
+
* @realm shared
|
|
86
|
+
* @source https://wiki.facepunch.com/gmod/CTakeDamageInfo:GetDamageCustom
|
|
87
|
+
*/
|
|
88
|
+
GetDamageCustom(self: CTakeDamageInfo): number;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
interface CTakeDamageInfo {
|
|
92
|
+
/**
|
|
93
|
+
* Returns a vector representing the damage force.
|
|
94
|
+
*
|
|
95
|
+
* Can be set with [CTakeDamageInfo:SetDamageForce](https://wiki.facepunch.com/gmod/CTakeDamageInfo:SetDamageForce).
|
|
96
|
+
*
|
|
97
|
+
* @realm shared
|
|
98
|
+
* @source https://wiki.facepunch.com/gmod/CTakeDamageInfo:GetDamageForce
|
|
99
|
+
*/
|
|
100
|
+
GetDamageForce(self: CTakeDamageInfo): Vector;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
interface CTakeDamageInfo {
|
|
104
|
+
/**
|
|
105
|
+
* Returns the position where the damage was or is going to be applied to.
|
|
106
|
+
*
|
|
107
|
+
* Can be set using [CTakeDamageInfo:SetDamagePosition](https://wiki.facepunch.com/gmod/CTakeDamageInfo:SetDamagePosition).
|
|
108
|
+
*
|
|
109
|
+
* @realm shared
|
|
110
|
+
* @source https://wiki.facepunch.com/gmod/CTakeDamageInfo:GetDamagePosition
|
|
111
|
+
*/
|
|
112
|
+
GetDamagePosition(self: CTakeDamageInfo): Vector;
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
interface CTakeDamageInfo {
|
|
116
|
+
/**
|
|
117
|
+
* Returns a bitflag which indicates the damage type(s) of the damage.
|
|
118
|
+
*
|
|
119
|
+
* Consider using [CTakeDamageInfo:IsDamageType](https://wiki.facepunch.com/gmod/CTakeDamageInfo:IsDamageType) instead. Value returned by this function can contain multiple damage types.
|
|
120
|
+
*
|
|
121
|
+
* @realm shared
|
|
122
|
+
* @source https://wiki.facepunch.com/gmod/CTakeDamageInfo:GetDamageType
|
|
123
|
+
*/
|
|
124
|
+
GetDamageType(self: CTakeDamageInfo): DMG;
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
interface CTakeDamageInfo {
|
|
128
|
+
/**
|
|
129
|
+
* Returns the inflictor of the damage. This is not necessarily a weapon.
|
|
130
|
+
*
|
|
131
|
+
* For hitscan weapons this is the weapon.
|
|
132
|
+
*
|
|
133
|
+
* For projectile weapons this is the projectile.
|
|
134
|
+
*
|
|
135
|
+
* For a more reliable method of getting the weapon that damaged an entity, use [CTakeDamageInfo:GetWeapon](https://wiki.facepunch.com/gmod/CTakeDamageInfo:GetWeapon) or [GetAttacker](https://wiki.facepunch.com/gmod/CTakeDamageInfo:GetAttacker) with [GetActiveWeapon](https://wiki.facepunch.com/gmod/Player:GetActiveWeapon).
|
|
136
|
+
*
|
|
137
|
+
* @realm shared
|
|
138
|
+
* @source https://wiki.facepunch.com/gmod/CTakeDamageInfo:GetInflictor
|
|
139
|
+
*/
|
|
140
|
+
GetInflictor(self: CTakeDamageInfo): Entity;
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
interface CTakeDamageInfo {
|
|
144
|
+
/**
|
|
145
|
+
* Returns the maximum damage. See [CTakeDamageInfo:SetMaxDamage](https://wiki.facepunch.com/gmod/CTakeDamageInfo:SetMaxDamage).
|
|
146
|
+
*
|
|
147
|
+
* This is only set by "multi damage" instances in the engine, and is only checked by the strider NPC when receiving explosive damage.
|
|
148
|
+
* @realm shared
|
|
149
|
+
* @source https://wiki.facepunch.com/gmod/CTakeDamageInfo:GetMaxDamage
|
|
150
|
+
*/
|
|
151
|
+
GetMaxDamage(self: CTakeDamageInfo): number;
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
interface CTakeDamageInfo {
|
|
155
|
+
/**
|
|
156
|
+
* Returns the initial, unmodified position where the damage occured.
|
|
157
|
+
* @realm shared
|
|
158
|
+
* @source https://wiki.facepunch.com/gmod/CTakeDamageInfo:GetReportedPosition
|
|
159
|
+
*/
|
|
160
|
+
GetReportedPosition(self: CTakeDamageInfo): Vector;
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
interface CTakeDamageInfo {
|
|
164
|
+
/**
|
|
165
|
+
* Returns the inflicting weapon of the damage event, if there is any.
|
|
166
|
+
*
|
|
167
|
+
* This is not necessarily a [Weapon](https://wiki.facepunch.com/gmod/Weapon) entity, but it is very likely to be one.
|
|
168
|
+
*
|
|
169
|
+
* See [CTakeDamageInfo:GetInflictor](https://wiki.facepunch.com/gmod/CTakeDamageInfo:GetInflictor) for the actual entity that did the damage.
|
|
170
|
+
*
|
|
171
|
+
* @realm shared
|
|
172
|
+
* @source https://wiki.facepunch.com/gmod/CTakeDamageInfo:GetWeapon
|
|
173
|
+
*/
|
|
174
|
+
GetWeapon(self: CTakeDamageInfo): Entity;
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
interface CTakeDamageInfo {
|
|
178
|
+
/**
|
|
179
|
+
* Returns true if the damage was caused by a bullet.
|
|
180
|
+
* @realm shared
|
|
181
|
+
* @source https://wiki.facepunch.com/gmod/CTakeDamageInfo:IsBulletDamage
|
|
182
|
+
*/
|
|
183
|
+
IsBulletDamage(self: CTakeDamageInfo): boolean;
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
interface CTakeDamageInfo {
|
|
187
|
+
/**
|
|
188
|
+
* Returns whenever the damageinfo contains the damage type specified.
|
|
189
|
+
* @realm shared
|
|
190
|
+
* @source https://wiki.facepunch.com/gmod/CTakeDamageInfo:IsDamageType
|
|
191
|
+
*/
|
|
192
|
+
IsDamageType(self: CTakeDamageInfo, dmgType: DMG): boolean;
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
interface CTakeDamageInfo {
|
|
196
|
+
/**
|
|
197
|
+
* Returns whenever the damageinfo contains explosion damage.
|
|
198
|
+
* @realm shared
|
|
199
|
+
* @source https://wiki.facepunch.com/gmod/CTakeDamageInfo:IsExplosionDamage
|
|
200
|
+
*/
|
|
201
|
+
IsExplosionDamage(self: CTakeDamageInfo): boolean;
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
interface CTakeDamageInfo {
|
|
205
|
+
/**
|
|
206
|
+
* Returns whenever the damageinfo contains fall damage.
|
|
207
|
+
* @realm shared
|
|
208
|
+
* @source https://wiki.facepunch.com/gmod/CTakeDamageInfo:IsFallDamage
|
|
209
|
+
*/
|
|
210
|
+
IsFallDamage(self: CTakeDamageInfo): boolean;
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
interface CTakeDamageInfo {
|
|
214
|
+
/**
|
|
215
|
+
* Scales the damage by the given value.
|
|
216
|
+
* @realm shared
|
|
217
|
+
* @source https://wiki.facepunch.com/gmod/CTakeDamageInfo:ScaleDamage
|
|
218
|
+
*/
|
|
219
|
+
ScaleDamage(self: CTakeDamageInfo, scale: number): void;
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
interface CTakeDamageInfo {
|
|
223
|
+
/**
|
|
224
|
+
* Changes the ammo type used by the weapon that inflicted the damage.
|
|
225
|
+
* @realm shared
|
|
226
|
+
* @source https://wiki.facepunch.com/gmod/CTakeDamageInfo:SetAmmoType
|
|
227
|
+
*/
|
|
228
|
+
SetAmmoType(self: CTakeDamageInfo, ammoType: number): void;
|
|
229
|
+
}
|
|
230
|
+
|
|
231
|
+
interface CTakeDamageInfo {
|
|
232
|
+
/**
|
|
233
|
+
* Sets the attacker ( character who originated the attack ) of the damage, for example a player or an NPC.
|
|
234
|
+
* @realm shared
|
|
235
|
+
* @source https://wiki.facepunch.com/gmod/CTakeDamageInfo:SetAttacker
|
|
236
|
+
*/
|
|
237
|
+
SetAttacker(self: CTakeDamageInfo, ent: Entity): void;
|
|
238
|
+
}
|
|
239
|
+
|
|
240
|
+
interface CTakeDamageInfo {
|
|
241
|
+
/**
|
|
242
|
+
* Sets the initial damage, unmodified by the current skill level ([game.GetSkillLevel](https://wiki.facepunch.com/gmod/game.GetSkillLevel)). This is usually set automatically by the game when dealing damage.
|
|
243
|
+
*
|
|
244
|
+
* This function will not modify the real damage that will be dealt ([CTakeDamageInfo:GetDamage](https://wiki.facepunch.com/gmod/CTakeDamageInfo:GetDamage)).
|
|
245
|
+
*
|
|
246
|
+
* Use this only if you know what you are doing. Otherwise use [CTakeDamageInfo:SetDamage](https://wiki.facepunch.com/gmod/CTakeDamageInfo:SetDamage).
|
|
247
|
+
* @realm shared
|
|
248
|
+
* @source https://wiki.facepunch.com/gmod/CTakeDamageInfo:SetBaseDamage
|
|
249
|
+
*/
|
|
250
|
+
SetBaseDamage(self: CTakeDamageInfo, arg0: number): void;
|
|
251
|
+
}
|
|
252
|
+
|
|
253
|
+
interface CTakeDamageInfo {
|
|
254
|
+
/**
|
|
255
|
+
* Sets the amount of damage.
|
|
256
|
+
* @realm shared
|
|
257
|
+
* @source https://wiki.facepunch.com/gmod/CTakeDamageInfo:SetDamage
|
|
258
|
+
*/
|
|
259
|
+
SetDamage(self: CTakeDamageInfo, damage: number): void;
|
|
260
|
+
}
|
|
261
|
+
|
|
262
|
+
interface CTakeDamageInfo {
|
|
263
|
+
/**
|
|
264
|
+
* Sets the bonus damage. Bonus damage isn't automatically applied, so this will have no outer effect by default.
|
|
265
|
+
* @realm shared
|
|
266
|
+
* @source https://wiki.facepunch.com/gmod/CTakeDamageInfo:SetDamageBonus
|
|
267
|
+
*/
|
|
268
|
+
SetDamageBonus(self: CTakeDamageInfo, damage: number): void;
|
|
269
|
+
}
|
|
270
|
+
|
|
271
|
+
interface CTakeDamageInfo {
|
|
272
|
+
/**
|
|
273
|
+
* Sets the custom damage type. This is used by Day of Defeat: Source and Team Fortress 2 for extended damage info, but isn't used in Garry's Mod by default.
|
|
274
|
+
* @realm shared
|
|
275
|
+
* @source https://wiki.facepunch.com/gmod/CTakeDamageInfo:SetDamageCustom
|
|
276
|
+
*/
|
|
277
|
+
SetDamageCustom(self: CTakeDamageInfo, DamageType: number): void;
|
|
278
|
+
}
|
|
279
|
+
|
|
280
|
+
interface CTakeDamageInfo {
|
|
281
|
+
/**
|
|
282
|
+
* Sets the directional force of the damage.
|
|
283
|
+
* **NOTE**: This function only affects entities using the VPHYSICS movetype. This means players and most NPCs won't receive the force vector you provide as knockback.
|
|
284
|
+
*
|
|
285
|
+
* If the entity taking damage is using the WALK or STEP movetypes, the damage force is instead automatically calculated. It will push the entity away from the inflictor's [Entity:WorldSpaceCenter](https://wiki.facepunch.com/gmod/Entity:WorldSpaceCenter), scaling the push by a calculated value involving the total amount of damage and the size of the entity. [Source](https://github.com/ValveSoftware/source-sdk-2013/blob/0565403b153dfcde602f6f58d8f4d13483696a13/src/game/server/baseentity.cpp#L1525)
|
|
286
|
+
*
|
|
287
|
+
* To disable knockback entirely, see [EFL_NO_DAMAGE_FORCES](https://wiki.facepunch.com/gmod/Enums/EFL#EFL_NO_DAMAGE_FORCES) or use the workaround example below.
|
|
288
|
+
*
|
|
289
|
+
*
|
|
290
|
+
* @realm shared
|
|
291
|
+
* @source https://wiki.facepunch.com/gmod/CTakeDamageInfo:SetDamageForce
|
|
292
|
+
*/
|
|
293
|
+
SetDamageForce(self: CTakeDamageInfo, force: Vector): void;
|
|
294
|
+
}
|
|
295
|
+
|
|
296
|
+
interface CTakeDamageInfo {
|
|
297
|
+
/**
|
|
298
|
+
* Sets the position of where the damage gets applied to.
|
|
299
|
+
* @realm shared
|
|
300
|
+
* @source https://wiki.facepunch.com/gmod/CTakeDamageInfo:SetDamagePosition
|
|
301
|
+
*/
|
|
302
|
+
SetDamagePosition(self: CTakeDamageInfo, pos: Vector): void;
|
|
303
|
+
}
|
|
304
|
+
|
|
305
|
+
interface CTakeDamageInfo {
|
|
306
|
+
/**
|
|
307
|
+
* Sets the damage type.
|
|
308
|
+
* @realm shared
|
|
309
|
+
* @source https://wiki.facepunch.com/gmod/CTakeDamageInfo:SetDamageType
|
|
310
|
+
*/
|
|
311
|
+
SetDamageType(self: CTakeDamageInfo, type: DMG): void;
|
|
312
|
+
}
|
|
313
|
+
|
|
314
|
+
interface CTakeDamageInfo {
|
|
315
|
+
/**
|
|
316
|
+
* Sets the inflictor of the damage for example a weapon.
|
|
317
|
+
*
|
|
318
|
+
* For hitscan/bullet weapons this should the weapon.
|
|
319
|
+
*
|
|
320
|
+
* For projectile (rocket launchers, grenades, etc) weapons this should be the projectile and [CTakeDamageInfo:SetWeapon](https://wiki.facepunch.com/gmod/CTakeDamageInfo:SetWeapon) should be the weapon.
|
|
321
|
+
*
|
|
322
|
+
* @realm shared
|
|
323
|
+
* @source https://wiki.facepunch.com/gmod/CTakeDamageInfo:SetInflictor
|
|
324
|
+
*/
|
|
325
|
+
SetInflictor(self: CTakeDamageInfo, inflictor: Entity): void;
|
|
326
|
+
}
|
|
327
|
+
|
|
328
|
+
interface CTakeDamageInfo {
|
|
329
|
+
/**
|
|
330
|
+
* Sets the "maximum damage" for this damage event. See [CTakeDamageInfo:GetMaxDamage](https://wiki.facepunch.com/gmod/CTakeDamageInfo:GetMaxDamage) for details.
|
|
331
|
+
* @realm shared
|
|
332
|
+
* @source https://wiki.facepunch.com/gmod/CTakeDamageInfo:SetMaxDamage
|
|
333
|
+
*/
|
|
334
|
+
SetMaxDamage(self: CTakeDamageInfo, maxDamage: number): void;
|
|
335
|
+
}
|
|
336
|
+
|
|
337
|
+
interface CTakeDamageInfo {
|
|
338
|
+
/**
|
|
339
|
+
* Sets the origin of the damage.
|
|
340
|
+
* @realm shared
|
|
341
|
+
* @source https://wiki.facepunch.com/gmod/CTakeDamageInfo:SetReportedPosition
|
|
342
|
+
*/
|
|
343
|
+
SetReportedPosition(self: CTakeDamageInfo, pos: Vector): void;
|
|
344
|
+
}
|
|
345
|
+
|
|
346
|
+
interface CTakeDamageInfo {
|
|
347
|
+
/**
|
|
348
|
+
* Sets the damage-inflicting weapon of the damage event.
|
|
349
|
+
*
|
|
350
|
+
* This should be a [Weapon](https://wiki.facepunch.com/gmod/Weapon) entity, not a projectile. See also [CTakeDamageInfo:SetInflictor](https://wiki.facepunch.com/gmod/CTakeDamageInfo:SetInflictor).
|
|
351
|
+
*
|
|
352
|
+
* @realm shared
|
|
353
|
+
* @source https://wiki.facepunch.com/gmod/CTakeDamageInfo:SetWeapon
|
|
354
|
+
*/
|
|
355
|
+
SetWeapon(self: CTakeDamageInfo, arg0: Entity): void;
|
|
356
|
+
}
|
|
357
|
+
|
|
358
|
+
interface CTakeDamageInfo {
|
|
359
|
+
/**
|
|
360
|
+
* Subtracts the specified amount from the damage.
|
|
361
|
+
* @realm shared
|
|
362
|
+
* @source https://wiki.facepunch.com/gmod/CTakeDamageInfo:SubtractDamage
|
|
363
|
+
*/
|
|
364
|
+
SubtractDamage(self: CTakeDamageInfo, damage: number): void;
|
|
365
|
+
}
|
|
366
|
+
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
// AUTO-GENERATED tlua declarations. Do not edit by hand.
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* A [DComboBox](https://wiki.facepunch.com/gmod/DComboBox) based dropdown menu with build in easy [ConVar](https://wiki.facepunch.com/gmod/ConVar) support.
|
|
5
|
+
*
|
|
6
|
+
* This control only exists in Sandbox derived gamemodes.
|
|
7
|
+
*
|
|
8
|
+
* @realm client
|
|
9
|
+
* @source https://wiki.facepunch.com/gmod/CtrlListBox
|
|
10
|
+
*/
|
|
11
|
+
interface CtrlListBox extends DComboBox {}
|
|
12
|
+
|