@tlua/gmod 1.0.5 → 1.0.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/types/achievementicon.d.tlua +0 -1
- package/types/achievements.d.tlua +15 -16
- package/types/ai.d.tlua +5 -6
- package/types/ai_schedule.d.tlua +0 -1
- package/types/ai_task.d.tlua +0 -1
- package/types/angle.d.tlua +18 -19
- package/types/avatarimage.d.tlua +0 -1
- package/types/awesomium.d.tlua +0 -1
- package/types/baseclass.d.tlua +1 -3
- package/types/bf_read.d.tlua +10 -12
- package/types/bit.d.tlua +11 -12
- package/types/button.d.tlua +0 -1
- package/types/cam.d.tlua +16 -17
- package/types/ceffectdata.d.tlua +31 -33
- package/types/chat.d.tlua +5 -6
- package/types/checkbutton.d.tlua +0 -1
- package/types/cleanup.d.tlua +7 -8
- package/types/cluaemitter.d.tlua +11 -13
- package/types/clualocomotion.d.tlua +39 -41
- package/types/cluaparticle.d.tlua +43 -45
- package/types/cmovedata.d.tlua +46 -48
- package/types/cnavarea.d.tlua +76 -78
- package/types/cnavladder.d.tlua +21 -23
- package/types/cnewparticleeffect.d.tlua +25 -27
- package/types/color.d.tlua +28 -29
- package/types/concommand.d.tlua +4 -5
- package/types/constraint.d.tlua +28 -29
- package/types/construct.d.tlua +1 -2
- package/types/contentheader.d.tlua +1 -3
- package/types/contenticon.d.tlua +7 -9
- package/types/contentsidebar.d.tlua +2 -4
- package/types/contentsidebartoolbox.d.tlua +0 -1
- package/types/contextbase.d.tlua +2 -4
- package/types/controlpanel.d.tlua +11 -14
- package/types/controlpresets.d.tlua +11 -13
- package/types/convar.d.tlua +15 -17
- package/types/cookie.d.tlua +3 -4
- package/types/coroutine.d.tlua +7 -8
- package/types/crecipientfilter.d.tlua +15 -17
- package/types/csent.d.tlua +0 -1
- package/types/csoundpatch.d.tlua +13 -15
- package/types/ctakedamageinfo.d.tlua +32 -34
- package/types/ctrllistbox.d.tlua +0 -1
- package/types/ctrlnumpad.d.tlua +5 -7
- package/types/cusercmd.d.tlua +26 -28
- package/types/custom_entity_fields.d.tlua +0 -1
- package/types/cvars.d.tlua +6 -7
- package/types/dadjustablemodelpanel.d.tlua +5 -7
- package/types/dalphabar.d.tlua +1 -3
- package/types/dbinder.d.tlua +2 -4
- package/types/dbubblecontainer.d.tlua +0 -2
- package/types/dbutton.d.tlua +6 -8
- package/types/dcategoryheader.d.tlua +0 -1
- package/types/dcategorylist.d.tlua +0 -1
- package/types/dcheckbox.d.tlua +3 -5
- package/types/dcheckboxlabel.d.tlua +9 -10
- package/types/dcollapsiblecategory.d.tlua +21 -23
- package/types/dcolorbutton.d.tlua +5 -7
- package/types/dcolorcombo.d.tlua +3 -5
- package/types/dcolorcube.d.tlua +11 -13
- package/types/dcolormixer.d.tlua +25 -27
- package/types/dcolorpalette.d.tlua +21 -23
- package/types/dcolumnsheet.d.tlua +3 -5
- package/types/dcombobox.d.tlua +15 -17
- package/types/ddragbase.d.tlua +11 -13
- package/types/ddrawer.d.tlua +6 -8
- package/types/debug.d.tlua +16 -19
- package/types/debugoverlay.d.tlua +11 -12
- package/types/dentityproperties.d.tlua +3 -5
- package/types/derma.d.tlua +10 -11
- package/types/dexpandbutton.d.tlua +1 -3
- package/types/dfilebrowser.d.tlua +20 -21
- package/types/dform.d.tlua +16 -18
- package/types/dframe.d.tlua +24 -25
- package/types/dgrid.d.tlua +9 -11
- package/types/dhorizontaldivider.d.tlua +18 -20
- package/types/dhorizontalscroller.d.tlua +9 -11
- package/types/dhscrollbar.d.tlua +9 -11
- package/types/dhtml.d.tlua +6 -8
- package/types/dhtmlcontrols.d.tlua +5 -6
- package/types/diconbrowser.d.tlua +9 -11
- package/types/diconlayout.d.tlua +16 -18
- package/types/dimage.d.tlua +17 -20
- package/types/dimagebutton.d.tlua +9 -10
- package/types/dkillicon.d.tlua +0 -1
- package/types/dlabel.d.tlua +31 -33
- package/types/dlabeleditable.d.tlua +3 -5
- package/types/dlabelurl.d.tlua +8 -10
- package/types/dlistbox.d.tlua +6 -8
- package/types/dlistboxitem.d.tlua +2 -4
- package/types/dlistlayout.d.tlua +0 -1
- package/types/dlistview.d.tlua +32 -34
- package/types/dlistview_column.d.tlua +12 -14
- package/types/dlistview_columnplain.d.tlua +0 -1
- package/types/dlistview_draggerbar.d.tlua +0 -1
- package/types/dlistview_line.d.tlua +11 -13
- package/types/dlistviewheaderlabel.d.tlua +0 -1
- package/types/dlistviewlabel.d.tlua +0 -1
- package/types/dlistviewline.d.tlua +0 -1
- package/types/dmenu.d.tlua +23 -28
- package/types/dmenubar.d.tlua +2 -7
- package/types/dmenuoption.d.tlua +11 -13
- package/types/dmenuoptioncvar.d.tlua +4 -6
- package/types/dmodelpanel.d.tlua +20 -22
- package/types/dmodelselect.d.tlua +0 -2
- package/types/dmodelselectmulti.d.tlua +0 -2
- package/types/dnotify.d.tlua +8 -10
- package/types/dnumberscratch.d.tlua +24 -26
- package/types/dnumberwang.d.tlua +14 -16
- package/types/dnumpad.d.tlua +0 -1
- package/types/dnumslider.d.tlua +17 -18
- package/types/dpanel.d.tlua +12 -14
- package/types/dpanellist.d.tlua +11 -12
- package/types/dpaneloverlay.d.tlua +5 -7
- package/types/dpanelselect.d.tlua +0 -1
- package/types/dpanpanel.d.tlua +4 -6
- package/types/dprogress.d.tlua +1 -3
- package/types/dproperties.d.tlua +2 -4
- package/types/dproperty_boolean.d.tlua +0 -1
- package/types/dproperty_combo.d.tlua +1 -3
- package/types/dproperty_entity.d.tlua +0 -1
- package/types/dproperty_float.d.tlua +0 -1
- package/types/dproperty_generic.d.tlua +3 -5
- package/types/dproperty_int.d.tlua +0 -1
- package/types/dproperty_vectorcolor.d.tlua +0 -1
- package/types/dpropertysheet.d.tlua +15 -17
- package/types/dragndrop.d.tlua +10 -11
- package/types/draw.d.tlua +10 -12
- package/types/drgbpicker.d.tlua +2 -4
- package/types/drive.d.tlua +11 -13
- package/types/dscrollbargrip.d.tlua +0 -1
- package/types/dscrollpanel.d.tlua +10 -11
- package/types/dshape.d.tlua +5 -7
- package/types/dsizetocontents.d.tlua +3 -5
- package/types/dslider.d.tlua +26 -28
- package/types/dsprite.d.tlua +7 -9
- package/types/dtab.d.tlua +6 -8
- package/types/dtextentry.d.tlua +41 -43
- package/types/dtilelayout.d.tlua +19 -21
- package/types/dtooltip.d.tlua +4 -6
- package/types/dtree.d.tlua +14 -16
- package/types/dtree_node.d.tlua +66 -68
- package/types/dtree_node_button.d.tlua +0 -1
- package/types/duplicator.d.tlua +29 -31
- package/types/dverticaldivider.d.tlua +21 -23
- package/types/dvscrollbar.d.tlua +9 -11
- package/types/editablepanel.d.tlua +0 -1
- package/types/effect.d.tlua +2 -4
- package/types/effects.d.tlua +6 -7
- package/types/engine.d.tlua +21 -22
- package/types/entity.d.tlua +643 -674
- package/types/ents.d.tlua +19 -25
- package/types/enums.d.tlua +0 -1
- package/types/file.d.tlua +39 -40
- package/types/file_class.d.tlua +0 -1
- package/types/fingerposer.d.tlua +0 -1
- package/types/fingervar.d.tlua +0 -1
- package/types/frame.d.tlua +0 -1
- package/types/frame_blend.d.tlua +7 -8
- package/types/game.d.tlua +39 -40
- package/types/gameevent.d.tlua +0 -1
- package/types/gamemode.d.tlua +2 -4
- package/types/global.d.tlua +0 -18
- package/types/gm.d.tlua +266 -268
- package/types/gmod.d.tlua +0 -1
- package/types/gmsave.d.tlua +4 -5
- package/types/gui.d.tlua +21 -22
- package/types/gwen.d.tlua +3 -4
- package/types/halo.d.tlua +2 -3
- package/types/hammer.d.tlua +0 -1
- package/types/hook.d.tlua +4 -5
- package/types/html.d.tlua +0 -1
- package/types/http.d.tlua +1 -2
- package/types/iconeditor.d.tlua +9 -11
- package/types/igmodaudiochannel.d.tlua +40 -42
- package/types/imagecheckbox.d.tlua +2 -4
- package/types/imaterial.d.tlua +25 -27
- package/types/imesh.d.tlua +4 -6
- package/types/input.d.tlua +22 -25
- package/types/invalidateinternalentitycache.d.tlua +0 -1
- package/types/irestore.d.tlua +8 -10
- package/types/isave.d.tlua +8 -10
- package/types/itexture.d.tlua +9 -11
- package/types/ivideowriter.d.tlua +4 -6
- package/types/jit.d.tlua +16 -17
- package/types/killicon.d.tlua +7 -8
- package/types/label.d.tlua +0 -1
- package/types/language.d.tlua +1 -2
- package/types/list.d.tlua +8 -9
- package/types/makeballoon.d.tlua +0 -1
- package/types/markup.d.tlua +2 -3
- package/types/markupobject.d.tlua +4 -6
- package/types/material.d.tlua +0 -1
- package/types/math.d.tlua +83 -84
- package/types/matproxy.d.tlua +3 -4
- package/types/matselect.d.tlua +9 -11
- package/types/menu.d.tlua +0 -1
- package/types/menubar.d.tlua +2 -3
- package/types/mesh.d.tlua +19 -20
- package/types/modelimage.d.tlua +0 -1
- package/types/motionsensor.d.tlua +10 -11
- package/types/navmesh.d.tlua +26 -27
- package/types/net.d.tlua +51 -53
- package/types/nextbot.d.tlua +34 -37
- package/types/notification.d.tlua +2 -3
- package/types/npc.d.tlua +180 -182
- package/types/numpad.d.tlua +7 -8
- package/types/os.d.tlua +3 -5
- package/types/package.d.tlua +0 -1
- package/types/panel.d.tlua +329 -331
- package/types/panellist.d.tlua +0 -1
- package/types/pathfollower.d.tlua +30 -32
- package/types/permissions.d.tlua +6 -7
- package/types/physcollide.d.tlua +2 -4
- package/types/physenv.d.tlua +11 -12
- package/types/physobj.d.tlua +77 -79
- package/types/pixelvis_handle_t.d.tlua +0 -1
- package/types/player.d.tlua +288 -293
- package/types/player_manager.d.tlua +13 -14
- package/types/preseteditor.d.tlua +0 -1
- package/types/presets.d.tlua +6 -7
- package/types/projectedtexture.d.tlua +47 -49
- package/types/properties.d.tlua +5 -6
- package/types/propselect.d.tlua +3 -5
- package/types/radiobutton.d.tlua +0 -1
- package/types/render.d.tlua +142 -143
- package/types/resource.d.tlua +2 -3
- package/types/richtext.d.tlua +0 -1
- package/types/sandbox.d.tlua +52 -54
- package/types/saverestore.d.tlua +12 -13
- package/types/schedule.d.tlua +5 -7
- package/types/scripted_ents.d.tlua +9 -12
- package/types/search.d.tlua +1 -2
- package/types/serverlist.d.tlua +7 -8
- package/types/slidebar.d.tlua +0 -1
- package/types/slider.d.tlua +0 -1
- package/types/sound.d.tlua +10 -11
- package/types/spawnicon.d.tlua +6 -8
- package/types/spawnmenu.d.tlua +23 -25
- package/types/spawnmenucontentpanel.d.tlua +3 -5
- package/types/sql.d.tlua +9 -10
- package/types/stack.d.tlua +4 -6
- package/types/steamworks.d.tlua +18 -19
- package/types/string.d.tlua +46 -50
- package/types/structures.d.tlua +0 -7
- package/types/surface.d.tlua +34 -35
- package/types/surfaceinfo.d.tlua +4 -6
- package/types/system.d.tlua +10 -11
- package/types/table.d.tlua +45 -48
- package/types/task.d.tlua +8 -10
- package/types/team.d.tlua +19 -20
- package/types/textentry.d.tlua +0 -1
- package/types/tgaimage.d.tlua +0 -1
- package/types/timer.d.tlua +14 -15
- package/types/tool.d.tlua +42 -46
- package/types/ugcpublishwindow.d.tlua +7 -9
- package/types/umsg.d.tlua +12 -13
- package/types/undo.d.tlua +10 -11
- package/types/urllabel.d.tlua +0 -1
- package/types/usermessage.d.tlua +2 -3
- package/types/utf8.d.tlua +7 -8
- package/types/util.d.tlua +90 -95
- package/types/vector.d.tlua +36 -37
- package/types/vehicle.d.tlua +48 -51
- package/types/vgui.d.tlua +14 -19
- package/types/video.d.tlua +0 -1
- package/types/vmatrix.d.tlua +35 -36
- package/types/weapon.d.tlua +81 -84
- package/types/weapons.d.tlua +5 -7
- package/types/widgets.d.tlua +1 -2
- package/types/workshopfilebase.d.tlua +4 -6
package/types/ents.d.tlua
CHANGED
|
@@ -18,12 +18,14 @@ interface EntsLib {
|
|
|
18
18
|
* @source https://wiki.facepunch.com/gmod/ents.Create
|
|
19
19
|
*/
|
|
20
20
|
Create(class: string): Entity;
|
|
21
|
+
|
|
21
22
|
/**
|
|
22
23
|
* Creates a clientside only prop with optional physics.
|
|
23
24
|
* @realm client
|
|
24
25
|
* @source https://wiki.facepunch.com/gmod/ents.CreateClientProp
|
|
25
26
|
*/
|
|
26
27
|
CreateClientProp(model?: string): Entity;
|
|
28
|
+
|
|
27
29
|
/**
|
|
28
30
|
* Creates a clientside only rope, similar to those used by the Dog and Fast
|
|
29
31
|
* Zombie models from Half-Life 2. Created ropes are automatically cleaned up
|
|
@@ -35,6 +37,7 @@ interface EntsLib {
|
|
|
35
37
|
* @source https://wiki.facepunch.com/gmod/ents.CreateClientRope
|
|
36
38
|
*/
|
|
37
39
|
CreateClientRope(ent1: Entity, ent1attach: number | Vector, ent2: Entity, ent2attach: number | Vector, extra?: table): Entity;
|
|
40
|
+
|
|
38
41
|
/**
|
|
39
42
|
* Creates a clientside only scripted entity. The scripted entity must be of
|
|
40
43
|
* "anim" type.
|
|
@@ -46,6 +49,7 @@ interface EntsLib {
|
|
|
46
49
|
* @source https://wiki.facepunch.com/gmod/ents.CreateClientside
|
|
47
50
|
*/
|
|
48
51
|
CreateClientside(class: string): Entity;
|
|
52
|
+
|
|
49
53
|
/**
|
|
50
54
|
* Returns a table of all entities along the ray. The ray does not stop on collisions, meaning it will go through walls/entities.
|
|
51
55
|
*
|
|
@@ -57,6 +61,7 @@ interface EntsLib {
|
|
|
57
61
|
* @source https://wiki.facepunch.com/gmod/ents.FindAlongRay
|
|
58
62
|
*/
|
|
59
63
|
FindAlongRay(start: Vector, _end: Vector, mins?: Vector, maxs?: Vector): Entity[];
|
|
64
|
+
|
|
60
65
|
/**
|
|
61
66
|
* Gets all entities with the given class, supports wildcards.
|
|
62
67
|
*
|
|
@@ -68,12 +73,14 @@ interface EntsLib {
|
|
|
68
73
|
* @source https://wiki.facepunch.com/gmod/ents.FindByClass
|
|
69
74
|
*/
|
|
70
75
|
FindByClass(_class: string): Entity[];
|
|
76
|
+
|
|
71
77
|
/**
|
|
72
78
|
* Finds all entities that are of given class and are children of given entity. This works internally by iterating over [ents.FindByClass](https://wiki.facepunch.com/gmod/ents.FindByClass).
|
|
73
79
|
* @realm shared
|
|
74
80
|
* @source https://wiki.facepunch.com/gmod/ents.FindByClassAndParent
|
|
75
81
|
*/
|
|
76
82
|
FindByClassAndParent(_class: string, parent: Entity): Entity[];
|
|
83
|
+
|
|
77
84
|
/**
|
|
78
85
|
* Gets all entities with the given model, supports wildcards.
|
|
79
86
|
*
|
|
@@ -83,6 +90,7 @@ interface EntsLib {
|
|
|
83
90
|
* @source https://wiki.facepunch.com/gmod/ents.FindByModel
|
|
84
91
|
*/
|
|
85
92
|
FindByModel(model: string): Entity[];
|
|
93
|
+
|
|
86
94
|
/**
|
|
87
95
|
* Gets all entities with the given hammer targetname. This works internally by iterating over [ents.GetAll](https://wiki.facepunch.com/gmod/ents.GetAll).
|
|
88
96
|
*
|
|
@@ -92,6 +100,7 @@ interface EntsLib {
|
|
|
92
100
|
* @source https://wiki.facepunch.com/gmod/ents.FindByName
|
|
93
101
|
*/
|
|
94
102
|
FindByName(name: string): Entity[];
|
|
103
|
+
|
|
95
104
|
/**
|
|
96
105
|
* Returns all entities within the specified box.
|
|
97
106
|
*
|
|
@@ -105,6 +114,7 @@ interface EntsLib {
|
|
|
105
114
|
* @source https://wiki.facepunch.com/gmod/ents.FindInBox
|
|
106
115
|
*/
|
|
107
116
|
FindInBox(boxMins: Vector, boxMaxs: Vector): Entity[];
|
|
117
|
+
|
|
108
118
|
/**
|
|
109
119
|
* Finds and returns all entities within the specified cone. Only entities whose [Entity:WorldSpaceCenter](https://wiki.facepunch.com/gmod/Entity:WorldSpaceCenter) is within the cone are considered to be in it.
|
|
110
120
|
*
|
|
@@ -118,6 +128,7 @@ interface EntsLib {
|
|
|
118
128
|
* @source https://wiki.facepunch.com/gmod/ents.FindInCone
|
|
119
129
|
*/
|
|
120
130
|
FindInCone(origin: Vector, normal: Vector, range: number, angle_cos: number): Entity[];
|
|
131
|
+
|
|
121
132
|
/**
|
|
122
133
|
* Finds all entities that lie within a [PVS (Potential Visibility Set)](https://developer.valvesoftware.com/wiki/PVS "PVS - Valve Developer Community").
|
|
123
134
|
*
|
|
@@ -128,6 +139,7 @@ interface EntsLib {
|
|
|
128
139
|
* @source https://wiki.facepunch.com/gmod/ents.FindInPVS
|
|
129
140
|
*/
|
|
130
141
|
FindInPVS(viewPoint: Entity | Vector): Entity[];
|
|
142
|
+
|
|
131
143
|
/**
|
|
132
144
|
* Gets all entities within the specified sphere.
|
|
133
145
|
*
|
|
@@ -137,12 +149,14 @@ interface EntsLib {
|
|
|
137
149
|
* @source https://wiki.facepunch.com/gmod/ents.FindInSphere
|
|
138
150
|
*/
|
|
139
151
|
FindInSphere(origin: Vector, radius: number): Entity[];
|
|
152
|
+
|
|
140
153
|
/**
|
|
141
154
|
* Fires a use event.
|
|
142
155
|
* @realm server
|
|
143
156
|
* @source https://wiki.facepunch.com/gmod/ents.FireTargets
|
|
144
157
|
*/
|
|
145
158
|
FireTargets(target: string, activator: Entity, caller: Entity, usetype: USE, value: number): void;
|
|
159
|
+
|
|
146
160
|
/**
|
|
147
161
|
* Returns a table of all existing entities.
|
|
148
162
|
*
|
|
@@ -153,12 +167,14 @@ interface EntsLib {
|
|
|
153
167
|
* @source https://wiki.facepunch.com/gmod/ents.GetAll
|
|
154
168
|
*/
|
|
155
169
|
GetAll(): Entity[];
|
|
170
|
+
|
|
156
171
|
/**
|
|
157
172
|
* Returns an entity by its index. Same as [Global.Entity](https://wiki.facepunch.com/gmod/Global.Entity).
|
|
158
173
|
* @realm shared
|
|
159
174
|
* @source https://wiki.facepunch.com/gmod/ents.GetByIndex
|
|
160
175
|
*/
|
|
161
176
|
GetByIndex(entIdx: number): Entity;
|
|
177
|
+
|
|
162
178
|
/**
|
|
163
179
|
* Gives you the amount of currently existing entities.
|
|
164
180
|
*
|
|
@@ -169,6 +185,7 @@ interface EntsLib {
|
|
|
169
185
|
* @source https://wiki.facepunch.com/gmod/ents.GetCount
|
|
170
186
|
*/
|
|
171
187
|
GetCount(IncludeKillMe?: boolean): number;
|
|
188
|
+
|
|
172
189
|
/**
|
|
173
190
|
* Returns the amount of networked entities, which is limited to 8192.
|
|
174
191
|
*
|
|
@@ -180,6 +197,7 @@ interface EntsLib {
|
|
|
180
197
|
* @source https://wiki.facepunch.com/gmod/ents.GetEdictCount
|
|
181
198
|
*/
|
|
182
199
|
GetEdictCount(): number;
|
|
200
|
+
|
|
183
201
|
/**
|
|
184
202
|
* Returns entity that has given [Entity:MapCreationID](https://wiki.facepunch.com/gmod/Entity:MapCreationID).
|
|
185
203
|
*
|
|
@@ -190,6 +208,7 @@ interface EntsLib {
|
|
|
190
208
|
* @source https://wiki.facepunch.com/gmod/ents.GetMapCreatedEntity
|
|
191
209
|
*/
|
|
192
210
|
GetMapCreatedEntity(id: number): Entity | nil;
|
|
211
|
+
|
|
193
212
|
/**
|
|
194
213
|
* Returns a Stateless Iterator for all entities, intended for use in generic
|
|
195
214
|
* for-loops. Internally uses cached values stored in Lua, making it more
|
|
@@ -202,28 +221,3 @@ interface EntsLib {
|
|
|
202
221
|
*/
|
|
203
222
|
Iterator(): ((tbl: any, prev?: number) => (number, Entity), Entity[], number);
|
|
204
223
|
}
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
package/types/enums.d.tlua
CHANGED
package/types/file.d.tlua
CHANGED
|
@@ -22,48 +22,56 @@ interface File {
|
|
|
22
22
|
* @source https://wiki.facepunch.com/gmod/File:Close
|
|
23
23
|
*/
|
|
24
24
|
Close(self: File): void;
|
|
25
|
+
|
|
25
26
|
/**
|
|
26
27
|
* Returns whether the [File](https://wiki.facepunch.com/gmod/File) object has reached the end of file or not.
|
|
27
28
|
* @realm shared and menu
|
|
28
29
|
* @source https://wiki.facepunch.com/gmod/File:EndOfFile
|
|
29
30
|
*/
|
|
30
31
|
EndOfFile(self: File): boolean;
|
|
32
|
+
|
|
31
33
|
/**
|
|
32
34
|
* Dumps the file changes to disk and saves the file.
|
|
33
35
|
* @realm shared and menu
|
|
34
36
|
* @source https://wiki.facepunch.com/gmod/File:Flush
|
|
35
37
|
*/
|
|
36
38
|
Flush(self: File): void;
|
|
39
|
+
|
|
37
40
|
/**
|
|
38
41
|
* Reads the specified amount of chars and returns them as a binary string.
|
|
39
42
|
* @realm shared and menu
|
|
40
43
|
* @source https://wiki.facepunch.com/gmod/File:Read
|
|
41
44
|
*/
|
|
42
45
|
Read(self: File, length?: number): string;
|
|
46
|
+
|
|
43
47
|
/**
|
|
44
48
|
* Reads one byte of the file and returns whether that byte was not 0.
|
|
45
49
|
* @realm shared and menu
|
|
46
50
|
* @source https://wiki.facepunch.com/gmod/File:ReadBool
|
|
47
51
|
*/
|
|
48
52
|
ReadBool(self: File): boolean;
|
|
53
|
+
|
|
49
54
|
/**
|
|
50
55
|
* Reads one unsigned 8-bit integer from the file.
|
|
51
56
|
* @realm shared and menu
|
|
52
57
|
* @source https://wiki.facepunch.com/gmod/File:ReadByte
|
|
53
58
|
*/
|
|
54
59
|
ReadByte(self: File): number;
|
|
60
|
+
|
|
55
61
|
/**
|
|
56
62
|
* Reads an 8-byte little-endian IEEE-754 floating point double from the file.
|
|
57
63
|
* @realm shared and menu
|
|
58
64
|
* @source https://wiki.facepunch.com/gmod/File:ReadDouble
|
|
59
65
|
*/
|
|
60
66
|
ReadDouble(self: File): number;
|
|
67
|
+
|
|
61
68
|
/**
|
|
62
69
|
* Reads an IEEE 754 little-endian 4-byte float from the file.
|
|
63
70
|
* @realm shared and menu
|
|
64
71
|
* @source https://wiki.facepunch.com/gmod/File:ReadFloat
|
|
65
72
|
*/
|
|
66
73
|
ReadFloat(self: File): number;
|
|
74
|
+
|
|
67
75
|
/**
|
|
68
76
|
* Returns the contents of the file from the current position up until the end of the current line.
|
|
69
77
|
*
|
|
@@ -78,114 +86,133 @@ interface File {
|
|
|
78
86
|
* @source https://wiki.facepunch.com/gmod/File:ReadLine
|
|
79
87
|
*/
|
|
80
88
|
ReadLine(self: File): string;
|
|
89
|
+
|
|
81
90
|
/**
|
|
82
91
|
* Reads a signed little-endian 32-bit integer from the file.
|
|
83
92
|
* @realm shared and menu
|
|
84
93
|
* @source https://wiki.facepunch.com/gmod/File:ReadLong
|
|
85
94
|
*/
|
|
86
95
|
ReadLong(self: File): number;
|
|
96
|
+
|
|
87
97
|
/**
|
|
88
98
|
* Reads a signed little-endian 16-bit integer from the file.
|
|
89
99
|
* @realm shared and menu
|
|
90
100
|
* @source https://wiki.facepunch.com/gmod/File:ReadShort
|
|
91
101
|
*/
|
|
92
102
|
ReadShort(self: File): number;
|
|
103
|
+
|
|
93
104
|
/**
|
|
94
105
|
* Reads an unsigned 64-bit integer from the file.
|
|
95
106
|
* @realm shared and menu
|
|
96
107
|
* @source https://wiki.facepunch.com/gmod/File:ReadUInt64
|
|
97
108
|
*/
|
|
98
109
|
ReadUInt64(self: File): string;
|
|
110
|
+
|
|
99
111
|
/**
|
|
100
112
|
* Reads an unsigned little-endian 32-bit integer from the file.
|
|
101
113
|
* @realm shared and menu
|
|
102
114
|
* @source https://wiki.facepunch.com/gmod/File:ReadULong
|
|
103
115
|
*/
|
|
104
116
|
ReadULong(self: File): number;
|
|
117
|
+
|
|
105
118
|
/**
|
|
106
119
|
* Reads an unsigned little-endian 16-bit integer from the file.
|
|
107
120
|
* @realm shared and menu
|
|
108
121
|
* @source https://wiki.facepunch.com/gmod/File:ReadUShort
|
|
109
122
|
*/
|
|
110
123
|
ReadUShort(self: File): number;
|
|
124
|
+
|
|
111
125
|
/**
|
|
112
126
|
* Sets the file pointer to the specified position.
|
|
113
127
|
* @realm shared and menu
|
|
114
128
|
* @source https://wiki.facepunch.com/gmod/File:Seek
|
|
115
129
|
*/
|
|
116
130
|
Seek(self: File, pos: number): void;
|
|
131
|
+
|
|
117
132
|
/**
|
|
118
133
|
* Returns the size of the file in bytes.
|
|
119
134
|
* @realm shared and menu
|
|
120
135
|
* @source https://wiki.facepunch.com/gmod/File:Size
|
|
121
136
|
*/
|
|
122
137
|
Size(self: File): number;
|
|
138
|
+
|
|
123
139
|
/**
|
|
124
140
|
* Moves the file pointer by the specified amount of chars.
|
|
125
141
|
* @realm shared and menu
|
|
126
142
|
* @source https://wiki.facepunch.com/gmod/File:Skip
|
|
127
143
|
*/
|
|
128
144
|
Skip(self: File, amount: number): number;
|
|
145
|
+
|
|
129
146
|
/**
|
|
130
147
|
* Returns the current position of the file pointer.
|
|
131
148
|
* @realm shared and menu
|
|
132
149
|
* @source https://wiki.facepunch.com/gmod/File:Tell
|
|
133
150
|
*/
|
|
134
151
|
Tell(self: File): number;
|
|
152
|
+
|
|
135
153
|
/**
|
|
136
154
|
* Writes the given string into the file.
|
|
137
155
|
* @realm shared and menu
|
|
138
156
|
* @source https://wiki.facepunch.com/gmod/File:Write
|
|
139
157
|
*/
|
|
140
158
|
Write(self: File, data: string): void;
|
|
159
|
+
|
|
141
160
|
/**
|
|
142
161
|
* Writes a boolean value to the file as one **byte**.
|
|
143
162
|
* @realm shared and menu
|
|
144
163
|
* @source https://wiki.facepunch.com/gmod/File:WriteBool
|
|
145
164
|
*/
|
|
146
165
|
WriteBool(self: File, bool: boolean): void;
|
|
166
|
+
|
|
147
167
|
/**
|
|
148
168
|
* Write an 8-bit unsigned integer to the file.
|
|
149
169
|
* @realm shared and menu
|
|
150
170
|
* @source https://wiki.facepunch.com/gmod/File:WriteByte
|
|
151
171
|
*/
|
|
152
172
|
WriteByte(self: File, uint8: number): void;
|
|
173
|
+
|
|
153
174
|
/**
|
|
154
175
|
* Writes an 8-byte little-endian IEEE-754 floating point double to the file.
|
|
155
176
|
* @realm shared and menu
|
|
156
177
|
* @source https://wiki.facepunch.com/gmod/File:WriteDouble
|
|
157
178
|
*/
|
|
158
179
|
WriteDouble(self: File, double: number): void;
|
|
180
|
+
|
|
159
181
|
/**
|
|
160
182
|
* Writes an IEEE 754 little-endian 4-byte float to the file.
|
|
161
183
|
* @realm shared and menu
|
|
162
184
|
* @source https://wiki.facepunch.com/gmod/File:WriteFloat
|
|
163
185
|
*/
|
|
164
186
|
WriteFloat(self: File, float: number): void;
|
|
187
|
+
|
|
165
188
|
/**
|
|
166
189
|
* Writes a signed little-endian 32-bit integer to the file.
|
|
167
190
|
* @realm shared and menu
|
|
168
191
|
* @source https://wiki.facepunch.com/gmod/File:WriteLong
|
|
169
192
|
*/
|
|
170
193
|
WriteLong(self: File, int32: number): void;
|
|
194
|
+
|
|
171
195
|
/**
|
|
172
196
|
* Writes a signed little-endian 16-bit integer to the file.
|
|
173
197
|
* @realm shared and menu
|
|
174
198
|
* @source https://wiki.facepunch.com/gmod/File:WriteShort
|
|
175
199
|
*/
|
|
176
200
|
WriteShort(self: File, int16: number): void;
|
|
201
|
+
|
|
177
202
|
/**
|
|
178
203
|
* Writes an unsigned 64-bit integer to the file.
|
|
179
204
|
* @realm shared and menu
|
|
180
205
|
* @source https://wiki.facepunch.com/gmod/File:WriteUInt64
|
|
181
206
|
*/
|
|
182
207
|
WriteUInt64(self: File, uint64: string): void;
|
|
208
|
+
|
|
183
209
|
/**
|
|
184
210
|
* Writes an unsigned little-endian 32-bit integer to the file.
|
|
185
211
|
* @realm shared and menu
|
|
186
212
|
* @source https://wiki.facepunch.com/gmod/File:WriteULong
|
|
187
213
|
*/
|
|
188
214
|
WriteULong(self: File, uint32: number): void;
|
|
215
|
+
|
|
189
216
|
/**
|
|
190
217
|
* Writes an unsigned little-endian 16-bit integer to the file.
|
|
191
218
|
* @realm shared and menu
|
|
@@ -194,33 +221,6 @@ interface File {
|
|
|
194
221
|
WriteUShort(self: File, uint16: number): void;
|
|
195
222
|
}
|
|
196
223
|
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
224
|
interface FileLib {
|
|
225
225
|
/**
|
|
226
226
|
* Appends data to a file in the `data/` folder.
|
|
@@ -228,6 +228,7 @@ interface FileLib {
|
|
|
228
228
|
* @source https://wiki.facepunch.com/gmod/file.Append
|
|
229
229
|
*/
|
|
230
230
|
Append(name: string, content: string): boolean;
|
|
231
|
+
|
|
231
232
|
/**
|
|
232
233
|
* Returns the content of a file asynchronously.
|
|
233
234
|
*
|
|
@@ -237,12 +238,14 @@ interface FileLib {
|
|
|
237
238
|
* @source https://wiki.facepunch.com/gmod/file.AsyncRead
|
|
238
239
|
*/
|
|
239
240
|
AsyncRead(fileName: string, gamePath: string, callback: (fileName: string, gamePath: string, status: number, data: string) => void, sync?: boolean): FSASYNC;
|
|
241
|
+
|
|
240
242
|
/**
|
|
241
243
|
* Creates a directory that is relative to the `data` folder.
|
|
242
244
|
* @realm shared and menu
|
|
243
245
|
* @source https://wiki.facepunch.com/gmod/file.CreateDir
|
|
244
246
|
*/
|
|
245
247
|
CreateDir(name: string): void;
|
|
248
|
+
|
|
246
249
|
/**
|
|
247
250
|
* Deletes a file or `empty` folder that is relative to the **data** folder. You can't remove any files outside of **data** folder.
|
|
248
251
|
* **NOTE**: You are able to delete **any** file in the Menu state.
|
|
@@ -252,6 +255,7 @@ interface FileLib {
|
|
|
252
255
|
* @source https://wiki.facepunch.com/gmod/file.Delete
|
|
253
256
|
*/
|
|
254
257
|
Delete(name: string, path?: string): boolean;
|
|
258
|
+
|
|
255
259
|
/**
|
|
256
260
|
* Returns a boolean of whether the file or directory exists or not.
|
|
257
261
|
* If you want to check for a directory, [file.IsDir](https://wiki.facepunch.com/gmod/file.IsDir) will be faster since it won't check for files.
|
|
@@ -260,6 +264,7 @@ interface FileLib {
|
|
|
260
264
|
* @source https://wiki.facepunch.com/gmod/file.Exists
|
|
261
265
|
*/
|
|
262
266
|
Exists(name: string, gamePath: string): boolean;
|
|
267
|
+
|
|
263
268
|
/**
|
|
264
269
|
* Returns a list of files and directories inside a single folder.
|
|
265
270
|
* **WARNING**: It seems that paths with capital letters (e.g. lua/MyFolder/*) don't work as expected on Linux.
|
|
@@ -269,6 +274,7 @@ interface FileLib {
|
|
|
269
274
|
* @source https://wiki.facepunch.com/gmod/file.Find
|
|
270
275
|
*/
|
|
271
276
|
Find(name: string, path: string, sorting?: string): (table, table);
|
|
277
|
+
|
|
272
278
|
/**
|
|
273
279
|
* Returns whether the given file is a directory or not.
|
|
274
280
|
*
|
|
@@ -276,6 +282,7 @@ interface FileLib {
|
|
|
276
282
|
* @source https://wiki.facepunch.com/gmod/file.IsDir
|
|
277
283
|
*/
|
|
278
284
|
IsDir(fileName: string, gamePath: string): boolean;
|
|
285
|
+
|
|
279
286
|
/**
|
|
280
287
|
* Attempts to open a file with the given mode.
|
|
281
288
|
* **WARNING**: When trying to open files with the following characteristics, it returns nil:
|
|
@@ -288,6 +295,7 @@ interface FileLib {
|
|
|
288
295
|
* @source https://wiki.facepunch.com/gmod/file.Open
|
|
289
296
|
*/
|
|
290
297
|
Open(fileName: string, fileMode: string, gamePath: string): file_class;
|
|
298
|
+
|
|
291
299
|
/**
|
|
292
300
|
* Returns the content of a file.
|
|
293
301
|
*
|
|
@@ -298,6 +306,7 @@ interface FileLib {
|
|
|
298
306
|
* @source https://wiki.facepunch.com/gmod/file.Read
|
|
299
307
|
*/
|
|
300
308
|
Read(fileName: string, gamePath?: string): string;
|
|
309
|
+
|
|
301
310
|
/**
|
|
302
311
|
* Attempts to rename a file with the given name to another given name.
|
|
303
312
|
*
|
|
@@ -307,18 +316,21 @@ interface FileLib {
|
|
|
307
316
|
* @source https://wiki.facepunch.com/gmod/file.Rename
|
|
308
317
|
*/
|
|
309
318
|
Rename(orignalFileName: string, targetFileName: string): boolean;
|
|
319
|
+
|
|
310
320
|
/**
|
|
311
321
|
* Returns the file's size in bytes.
|
|
312
322
|
* @realm shared and menu
|
|
313
323
|
* @source https://wiki.facepunch.com/gmod/file.Size
|
|
314
324
|
*/
|
|
315
325
|
Size(fileName: string, gamePath: string): number;
|
|
326
|
+
|
|
316
327
|
/**
|
|
317
328
|
* Returns when the file or folder was last modified in Unix time.
|
|
318
329
|
* @realm shared and menu
|
|
319
330
|
* @source https://wiki.facepunch.com/gmod/file.Time
|
|
320
331
|
*/
|
|
321
332
|
Time(path: string, gamePath: string): number;
|
|
333
|
+
|
|
322
334
|
/**
|
|
323
335
|
* Writes the given string to a file. Erases all previous data in the file. To add data without deleting previous data, use [file.Append](https://wiki.facepunch.com/gmod/file.Append).
|
|
324
336
|
* @realm shared and menu
|
|
@@ -326,16 +338,3 @@ interface FileLib {
|
|
|
326
338
|
*/
|
|
327
339
|
Write(fileName: string, content: string): boolean;
|
|
328
340
|
}
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
package/types/file_class.d.tlua
CHANGED
package/types/fingerposer.d.tlua
CHANGED
package/types/fingervar.d.tlua
CHANGED
package/types/frame.d.tlua
CHANGED
package/types/frame_blend.d.tlua
CHANGED
|
@@ -17,6 +17,7 @@ interface Frame_blendLib {
|
|
|
17
17
|
* @source https://wiki.facepunch.com/gmod/frame_blend.AddFrame
|
|
18
18
|
*/
|
|
19
19
|
AddFrame(): void;
|
|
20
|
+
|
|
20
21
|
/**
|
|
21
22
|
* **INTERNAL**: This is used internally - although you're able to use it you probably shouldn't.
|
|
22
23
|
*
|
|
@@ -27,6 +28,7 @@ interface Frame_blendLib {
|
|
|
27
28
|
* @source https://wiki.facepunch.com/gmod/frame_blend.BlendFrame
|
|
28
29
|
*/
|
|
29
30
|
BlendFrame(): void;
|
|
31
|
+
|
|
30
32
|
/**
|
|
31
33
|
* **INTERNAL**: This is used internally - although you're able to use it you probably shouldn't.
|
|
32
34
|
*
|
|
@@ -37,6 +39,7 @@ interface Frame_blendLib {
|
|
|
37
39
|
* @source https://wiki.facepunch.com/gmod/frame_blend.CompleteFrame
|
|
38
40
|
*/
|
|
39
41
|
CompleteFrame(): void;
|
|
42
|
+
|
|
40
43
|
/**
|
|
41
44
|
* **INTERNAL**: This is used internally - although you're able to use it you probably shouldn't.
|
|
42
45
|
*
|
|
@@ -47,12 +50,14 @@ interface Frame_blendLib {
|
|
|
47
50
|
* @source https://wiki.facepunch.com/gmod/frame_blend.DrawPreview
|
|
48
51
|
*/
|
|
49
52
|
DrawPreview(): void;
|
|
53
|
+
|
|
50
54
|
/**
|
|
51
55
|
* Returns whether frame blend post processing effect is enabled or not.
|
|
52
56
|
* @realm client
|
|
53
57
|
* @source https://wiki.facepunch.com/gmod/frame_blend.IsActive
|
|
54
58
|
*/
|
|
55
59
|
IsActive(): boolean;
|
|
60
|
+
|
|
56
61
|
/**
|
|
57
62
|
* **INTERNAL**: This is used internally - although you're able to use it you probably shouldn't.
|
|
58
63
|
*
|
|
@@ -64,6 +69,7 @@ interface Frame_blendLib {
|
|
|
64
69
|
* @source https://wiki.facepunch.com/gmod/frame_blend.IsLastFrame
|
|
65
70
|
*/
|
|
66
71
|
IsLastFrame(): boolean;
|
|
72
|
+
|
|
67
73
|
/**
|
|
68
74
|
* **INTERNAL**: This is used internally - although you're able to use it you probably shouldn't.
|
|
69
75
|
*
|
|
@@ -74,6 +80,7 @@ interface Frame_blendLib {
|
|
|
74
80
|
* @source https://wiki.facepunch.com/gmod/frame_blend.RenderableFrames
|
|
75
81
|
*/
|
|
76
82
|
RenderableFrames(): number;
|
|
83
|
+
|
|
77
84
|
/**
|
|
78
85
|
* Returns whether we should skip frame or not.
|
|
79
86
|
* @realm client
|
|
@@ -81,11 +88,3 @@ interface Frame_blendLib {
|
|
|
81
88
|
*/
|
|
82
89
|
ShouldSkipFrame(): boolean;
|
|
83
90
|
}
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|