Skip to content

Commit

Permalink
Added wiki changes since project starting point. Some bolding
Browse files Browse the repository at this point in the history
corrections. Corrected worldpicker in util module.
  • Loading branch information
LanetheGreat committed Nov 26, 2018
1 parent 848143c commit ec0cf16
Show file tree
Hide file tree
Showing 16 changed files with 145 additions and 99 deletions.
2 changes: 1 addition & 1 deletion api/duplicator.lua
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
-- someone attempts to duplicate your custom entity with the duplicator tool.
-- It can also be used by 3rd party duplicator tools to make use of the built
-- in system.
-- @module duplicator.lua
-- @module duplicator

-------------------------------------------------------------------------------
-- _Client_ | _Server_
Expand Down
3 changes: 2 additions & 1 deletion api/engine.lua
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,8 @@
-- clientside to refresh the lightmaps to this new color.
-- @function [parent=#engine] LightStyle
-- @param #number lightstyle The lightstyle to edit. 0 to 63. If you want to edit map lighting, you want to set this to 0.
-- @param #string pattern The pattern to change the lightstyle to. "a" is the darkest, "z" is the brightest. You can use stuff like "abcxyz" to make flashing patterns. The normal brightness for a map is "m". Values over "z" are allowed, "~" for instance.
-- @param #string pattern The pattern to change the lightstyle to. "a" is the darkest, "z" is the brightest.
-- You can use stuff like "abcxyz" to make flashing patterns. The normal brightness for a map is "m". Values over "z" are allowed, "~" for instance.

-------------------------------------------------------------------------------
-- _Client_
Expand Down
6 changes: 5 additions & 1 deletion api/game.lua
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,13 @@
-- _Client_ | _Server_
--
-- Registers a new decal.
--
-- **Warning**: _There's a rather low limit of around 256 for decals that may
-- be registered and they are not cleared on map load._
-- @function [parent=#game] AddDecal
-- @param #string decalName The name of the decal.
-- @param #string materialName The material to be used for the decal. May also be a list of material names, in which case a random material from that list will be chosen every time the decal is placed.
-- @param #string materialName The material to be used for the decal.
-- May also be a list of material names, in which case a random material from that list will be chosen every time the decal is placed.

-------------------------------------------------------------------------------
-- _Client_ | _Server_
Expand Down
65 changes: 38 additions & 27 deletions api/global.lua
Original file line number Diff line number Diff line change
Expand Up @@ -852,11 +852,6 @@
-- This is a global variable which holds the preloaded @{util} module.
-- @field[parent = #global] util#util util preloaded module

------------------------------------------------------------------------------
-- util.worldpicker is for picking an entity in the world while GUI is open.
-- This is a global variable which holds the preloaded @{util.worldpicker} module.
-- @field[parent = #global] util.worldpicker#util.worldpicker util.worldpicker preloaded module

------------------------------------------------------------------------------
-- The vgui library allows you to script and create your own panels using
-- Valve's GUI system.
Expand Down Expand Up @@ -1237,7 +1232,7 @@
-- @param #string default Default value of the ConVar.
-- @param #boolean shouldsave Should the ConVar be saved across sessions. _(Default: true)_
-- @param #boolean userinfo Should the **ConVar** and its containing data be sent to the server when it has changed. _(Default: false)_
-- This make the convar accessible from server using **Player:GetInfoNum** and similar functions.
-- This makes the convar accessible from server using **Player:GetInfoNum** and similar functions.
-- @param #string helptext Help text to display in the console. _(Default: "")_
-- @return #ConVar Created convar.

Expand Down Expand Up @@ -1422,10 +1417,10 @@
-- Makes the panel (usually an input of sorts) respond to changes in console
-- variables by adding next functions to the panel:
--
-- * Panel:SetConVar
-- * Panel:ConVarChanged
-- * Panel:ConVarStringThink
-- * Panel:ConVarNumberThink
-- * **Panel:SetConVar**
-- * **Panel:ConVarChanged**
-- * **Panel:ConVarStringThink**
-- * **Panel:ConVarNumberThink**
--
-- The console variable value is saved in the m_strConVar property of the panel.
--
Expand Down Expand Up @@ -5759,7 +5754,7 @@
-- @param #Entity ent The entity to attach the control point to.
-- @param #number partAttachment See **PATTACH\_ Enums**.
-- @param #number entAttachment The attachment ID on the entity to attach the particle system to. _(Default: 0)_
-- @param #Vector offset The offset from the Entity:GetPos of the entity we are attaching this CP to. _(Default: Vector(0, 0, 0))_
-- @param #Vector offset The offset from the **Entity:GetPos** of the entity we are attaching this CP to. _(Default: Vector(0, 0, 0))_

-------------------------------------------------------------------------------
-- _Client_
Expand Down Expand Up @@ -6653,6 +6648,7 @@
-- @function [parent=#CUserCmd] SetForwardMove
-- @param self
-- @param #number speed The new speed to request.
-- The client will not be able to move faster than their set walk/sprint speed.

-------------------------------------------------------------------------------
-- _Client_ | _Server_
Expand Down Expand Up @@ -6781,7 +6777,7 @@
-- @param self
-- @return #number The integer value of the console variable.
-- If it fails to convert to an integer, it will return 0.
-- All float/decimal values will be rounded down. (with math.floor)
-- All float/decimal values will be rounded down. (with **math.floor**)

-------------------------------------------------------------------------------
-- _Client_ | _Server_
Expand Down Expand Up @@ -7217,8 +7213,11 @@
-- Plays a sound on an entity. If run clientside, the sound will only be heard
-- locally. If used on a player or NPC character with the mouth rigged, the
-- character will "lip-sync". This does not work with all sound files. It is
-- recommended to use sound scripts (see sound.Add) over direct file paths.
-- recommended to use sound scripts (see **sound.Add**) over direct file paths.
-- This will allow you to use **Entity:StopSound** to stop the played sound scripts.
--
-- **Note**: _When using this function with weapons, use the Weapon itself as
-- the entity, not its owner!_
-- @function [parent=#Entity] EmitSound
-- @param self
-- @param #string soundName The name of the sound to be played.
Expand Down Expand Up @@ -7356,6 +7355,9 @@
--
-- **Note**: _If the entity vibrates, you probably need to run
-- **Entity:SetPredictable**(false) clientside._
--
-- **Warning**: _This function will not work if the target bone's parent bone
-- is invalid or if the bone is not used by VERTEX LOD0._
-- @function [parent=#Entity] FollowBone
-- @param self
-- @param #Entity parent The entity to follow the bone of. _(Default: NULL)_
Expand Down Expand Up @@ -7433,7 +7435,7 @@
-- nothing if the attachment does not exist.
--
-- **Note**: _The update rate of this function is limited by the setting of
-- ENT.AutomaticFrameAdvance for Scripted Entities!_
-- **ENT.AutomaticFrameAdvance** for Scripted Entities!_
-- @function [parent=#Entity] GetAttachment
-- @param self
-- @param #number attachmentId The internal ID of the attachment.
Expand Down Expand Up @@ -7604,7 +7606,7 @@
-- Gets the children of the entity - that is, every entity whose move parent is
-- this entity.
--
-- **Note**: _This function returns Entity:SetMoveParent children, NOT **Entity:SetParent**!_
-- **Note**: _This function returns **Entity:SetMoveParent** children, NOT **Entity:SetParent**!_
-- _**Entity:SetParent** however also calls **Entity:SetMoveParent**._
-- _This means that some entities in the returned list might have a NULL **Entity:GetParent**._
-- _This also means that using this function on players will return their weapons on the client but not the server._
Expand Down Expand Up @@ -7992,6 +7994,7 @@
--
-- An interface for accessing internal key values on entities. This function
-- returns variables created with **DEFINE\_KEYFIELD** in C++ entities.
-- See **Entity:GetSaveTable** for a more detailed explanation.
-- @function [parent=#Entity] GetInternalVariable
-- @param self
-- @param #string VariableName Name of variable corresponding to an entity save value.
Expand Down Expand Up @@ -9978,7 +9981,7 @@
--
-- Sets the collision bounds for the entity, which are used for triggers
-- (**Entity:SetTrigger**, **ENTITY:Touch**), determining if rendering is necessary
-- clientside, and collision (If Entity:SetSolid set as **SOLID\_BBOX**).
-- clientside, and collision (If **Entity:SetSolid** set as **SOLID\_BBOX**).
--
-- Input bounds are relative to **Entity:GetPos**! See also **Entity:SetCollisionBoundsWS**.
-- @function [parent=#Entity] SetCollisionBounds
Expand Down Expand Up @@ -10691,6 +10694,12 @@
-- _Client_ | _Server_
--
-- Sets the parent of this entity, making it move with its parent.
--
-- **Note**: _This does not work on the world._
--
-- **Warning**: _This can cause undefined physics behaviour when used on
-- entities that don't support parenting. See the Valve developer wiki for
-- more information._
-- @function [parent=#Entity] SetParent
-- @param self
-- @param #Entity parent The entity to parent to. Setting this to nil will clear the parent. _(Default: NULL)_
Expand Down Expand Up @@ -10940,7 +10949,7 @@
-- Sets the entity's model sequence. If the specified sequence is already
-- active, the animation will not be restarted. See **Entity:ResetSequence** for a
-- function that restarts the animation even if it is already playing. In some
-- cases you want to run Entity:ResetSequenceInfo to make this function run.
-- cases you want to run **Entity:ResetSequenceInfo** to make this function run.
--
-- **Note**: _This will not work properly if called directly after calling
-- **Entity:SetModel**. Consider waiting until the next Tick._
Expand Down Expand Up @@ -11096,7 +11105,7 @@
-------------------------------------------------------------------------------
-- _Client_ | _Server_
--
-- Allows to quickly set variable to entity's Entity:GetTable.
-- Allows to quickly set variable to entity's **Entity:GetTable**.
--
-- **Note**: _This will not network the variable to client(s). You want
-- **Entity:SetNWString** and similar functions for that._
Expand All @@ -11108,7 +11117,8 @@
-------------------------------------------------------------------------------
-- _Client_ | _Server_
--
-- Sets the entity's velocity.
-- Sets the entity's velocity. For entities with physics, consider using
-- **PhysObj:SetVelocity** on the PhysObj of the entity.
--
-- **Note**: _Actually binds to **CBaseEntity::SetBaseVelocity**() which sets the
-- entity's velocity due to forces applied by other entities._
Expand Down Expand Up @@ -11201,7 +11211,7 @@
-------------------------------------------------------------------------------
-- _Client_ | _Server_
--
-- Stops a sound created by Entity:StartLoopingSound.
-- Stops a sound created by **Entity:StartLoopingSound**.
-- @function [parent=#Entity] StopLoopingSound
-- @param self
-- @param #number id The sound ID returned by **Entity:StartLoopingSound**.
Expand Down Expand Up @@ -11376,7 +11386,7 @@
-- * If ai_ignoreplayers is turned on and target is a player, returns false
-- * Reacts to ai\_LOS\_mode:
-- * If 1, does a simple trace with COLLISION\_GROUP\_NONE and MASK\_BLOCKLOS
-- * If not, does a trace with MASK\_BLOCKLOS\_AND\_NPCS ( - CONTENTS\_BLOCKLOS is target is player ) and a custom LOS filter. (**CTraceFilterLOS**)
-- * If not, does a trace with MASK\_BLOCKLOS\_AND\_NPCS ( - CONTENTS\_BLOCKLOS is target is player) and a custom LOS filter. (**CTraceFilterLOS**)
-- * Returns true if hits a vehicle the target is driving
-- @function [parent=#Entity] Visible
-- @param self
Expand Down Expand Up @@ -11470,7 +11480,7 @@
-- _Client_ | _Server_
--
-- This is the file object. It used used primarily to read or write binary data
-- from files. The object is returned by file.Open.
-- from files. The object is returned by **file.Open**.
-- @type File

-------------------------------------------------------------------------------
Expand Down Expand Up @@ -15144,7 +15154,7 @@
-- **Note**: _This function does NOT evaluate expression (ex: allow you to
-- pass variables from JavaScript (JS) to Lua context). Because a return value
-- is nil/no value (a.k.a. void). If you wish to pass/return values from JS to
-- Lua, you may want to use DHTML.AddFunction function to accomplish that job._
-- Lua, you may want to use **DHTML.AddFunction** function to accomplish that job._
-- @function [parent=#Panel] RunJavascript
-- @param self
-- @param #string js Specify JavaScript code to be executed.
Expand Down Expand Up @@ -15565,7 +15575,8 @@
-- @param self
-- @param #string ModelPath The path of the model to set.
-- @param #number skin The skin to set. _(Default: 0)_
-- @param #string bodygroups The body groups to set. Each single-digit number in the string represents a separate bodygroup, up to 9 in total. _(Default: "")_
-- @param #string bodygroups The body groups to set. _(Default: "")_
-- Each single-digit number in the string represents a separate bodygroup, up to 9 in total.

-------------------------------------------------------------------------------
-- _Client_
Expand Down Expand Up @@ -15696,7 +15707,7 @@
-------------------------------------------------------------------------------
-- _Client_
--
-- Sets the size of the panel. Calls Panel:OnSizeChanged and marks this panel
-- Sets the size of the panel. Calls **Panel:OnSizeChanged** and marks this panel
-- for layout (**Panel:InvalidateLayout**). See also **Panel:SetWidth** and **Panel:SetHeight**.
--
-- **Note**: _If you wish to position and re-size panels without much guesswork and
Expand Down Expand Up @@ -20360,7 +20371,7 @@
-- _Client_
--
-- Returns where on the screen the specified position vector would appear. A
-- related function is gui.ScreenToVector, which converts a 2D coordinate to a
-- related function is **gui.ScreenToVector**, which converts a 2D coordinate to a
-- 3D direction.
--
-- **Note**: _Should be called from a 3D rendering environment or after
Expand Down Expand Up @@ -21068,7 +21079,7 @@
-- _Client_ | _Server_
--
-- Sets the hold type of the weapon. This function also calls
-- **WEAPON:SetWeaponHoldType** and properly networks it to all clients.
-- **Weapon:SetWeaponHoldType** and properly networks it to all clients.
--
-- **Note**: _This only works on scripted weapons._
-- @function [parent=#Weapon] SetHoldType
Expand Down
6 changes: 5 additions & 1 deletion api/halo.lua
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,16 @@
-- _Client_
--
-- Applies a "halo" glow effect to one or multiple entities.
--
-- **Warning**: _Using this function outside of the **GM:PreDrawHalos** hook can
-- cause instability or crashes._
-- @function [parent=#halo] Add
-- @param #table entities A table of entities to add the halo effect to.
-- @param #table color The desired color of the halo. See **Color structure**.
-- @param #number blurX The strength of the halo's blur on the x axis. _(Default: 2)_
-- @param #number blurY The strength of the halo's blur on the y axis. _(Default: 2)_
-- @param #number passes The number of times the halo should be drawn per frame. Increasing this may hinder player FPS. _(Default: 1)_
-- @param #number passes The number of times the halo should be drawn per frame. _(Default: 1)_
-- Increasing this may hinder player FPS.
-- @param #boolean additive Sets the render mode of the halo to additive. _(Default: true)_
-- @param #boolean ignoreZ Renders the halo through anything when set to true. _(Default: false)_

Expand Down
30 changes: 22 additions & 8 deletions api/input.lua
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,14 @@
-- @function [parent=#input] GetCursorPos
-- @return #number, #number The mouse's current x and y position.

-------------------------------------------------------------------------------
-- _Client_ | _Menu_
--
-- Gets the button code from a button name. This is opposite of **input.GetKeyName**.
-- @function [parent=#input] GetKeyCode
-- @param #string button The internal button name, such as "e" or "shift".
-- @return #number The button code, see **BUTTON\_CODE\_ Enums**.

-------------------------------------------------------------------------------
-- _Client_ | _Menu_
--
Expand Down Expand Up @@ -152,10 +160,8 @@
--
-- Returns whether a mouse key was double pressed in the same frame this
-- function was called. If this function returns true, **input.WasMousePressed**
-- will return false.
--
-- This function only works in Move hooks, and will detect mouse events even in
-- main menu or when a typing in a text field.
-- will return false. This function only works in Move hooks, and will detect
-- mouse events even in main menu or when a typing in a text field.
-- @function [parent=#input] WasMouseDoublePressed
-- @param #number button The mouse button to test, see **MOUSE\_ Enums**.
-- @return #boolean Whether the mouse key was double pressed or not.
Expand All @@ -165,12 +171,20 @@
--
-- Returns whether a mouse key was initially pressed in the same frame this
-- function was called. If **input.WasMouseDoublePressed** returns true, this
-- function will return false.
--
-- This function only works in Move hooks, and will detect mouse events even in
-- main menu or when a typing in a text field.
-- function will return false. This function only works in Move hooks, and will
-- detect mouse events even in main menu or when a typing in a text field.
-- @function [parent=#input] WasMousePressed
-- @param #number button The mouse button to test, see **MOUSE\_ Enums**.
-- @return #boolean True if the mouse key was initially pressed the same frame that this function was called, false otherwise.

-------------------------------------------------------------------------------
-- _Client_ | _Menu_
--
-- Returns whether a mouse key was released in the same frame this function was
-- called. This function only works in Move hooks, and will detect mouse events
-- even in main menu or when a typing in a text field.
-- @function [parent=#input] WasMouseReleased
-- @param #number key The key to test, see **MOUSE\_ Enums**.
-- @return #boolean True if the mouse key was released the same frame that this function was called, false otherwise.

return nil
6 changes: 5 additions & 1 deletion api/net.lua
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,11 @@
-------------------------------------------------------------------------------
-- _Client_ | _Server_
--
-- Reads a value from the net message with the specified type.
-- **This is an internal function or feature.**
-- _This means you will be able to use it, but you really shouldn't._
-- _Used internally by **net.ReadTable**._
--
-- Reads a value from the net message with the specified type, written by **net.WriteType**.
--
-- **Warning**: _You **must** read information in same order as you write it._
-- @function [parent=#net] ReadType
Expand Down
Loading

0 comments on commit ec0cf16

Please sign in to comment.