Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Documentation cleanup, stage 1 #321

Merged
merged 1 commit into from
May 1, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion addons/ai/fnc_taskDefend.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,10 @@
Function: CBA_fnc_taskDefend

Description:
A function for a group to defend a parsed location. Groups will mount nearby static machine guns, and bunker in nearby buildings. They may also patrol the radius unless otherwise specified.
A function for a group to defend a parsed location.

Groups will mount nearby static machine guns and bunker in nearby buildings.
They may also patrol the radius unless otherwise specified.

Parameters:
- Group (Group or Object)
Expand Down
1 change: 1 addition & 0 deletions addons/ai/fnc_taskSearchArea.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ Function: CBA_fnc_taskSearchArea

Description:
Given group will indefinitely randomly search the given marker/trigger area.

Will also perform random building searches.

Parameters:
Expand Down
2 changes: 1 addition & 1 deletion addons/arrays/fnc_findTypeName.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
Function: CBA_fnc_findTypeName

Description:
A function that returns the index of the first entry of the given type in an array.
Returns the index of the first entry of the given type in an array.

Parameters:
0: Array
Expand Down
4 changes: 3 additions & 1 deletion addons/arrays/fnc_findTypeOf.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@
Function: CBA_fnc_findTypeOf

Description:
A function that returns the index of the first entry (either object or class name string) of the given type in an array.
Returns the index of the first entry of a given type in an array.

The type argument is either an object or a class name string.

Parameters:
0: Array
Expand Down
5 changes: 3 additions & 2 deletions addons/arrays/fnc_join.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,9 @@ Function: CBA_fnc_join
DEPRECATED - Please use <joinString at https://community.bistudio.com/wiki/joinString> added in Arma 3 1.50

Description:
Joins an array of values into a single string, joining each fragment around
a separator string. Inverse of <CBA_fnc_split>.
Joins an array of values into a single string.

Eeach value is joined around a separator string. Inverse of <CBA_fnc_split>.

Parameters:
_array - Array to join together as a string [Array]
Expand Down
4 changes: 3 additions & 1 deletion addons/arrays/fnc_sortNestedArray.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@
Function: CBA_fnc_sortNestedArray

Description:
Used to sort a nested array from lowest to highest using quick sort based on the specified column, which must have numerical data.
Used to sort a nested array from lowest to highest using quick sort.

Sorting is based on the specified column, which must have numerical data.

Parameters:
_array: array - Nested array to be sorted
Expand Down
5 changes: 3 additions & 2 deletions addons/common/fnc_addPlayerAction.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,9 @@
Function: CBA_fnc_addPlayerAction

Description:
Adds persistent action to player (which will also be available in vehicles
and after respawn or teamswitch).
Adds persistent action to the player.

The action will be available in vehicles and after respawn or teamswitch.

Remove action with <CBA_fnc_removePlayerAction>. *Do not* use standard
removeAction command with these player-action indices!
Expand Down
1 change: 1 addition & 0 deletions addons/common/fnc_createNamespace.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ Function: CBA_fnc_createNamespace

Description:
Creates a namespace. Used to store and read variables via setVariable and getVariable.

The Namespace is destroyed after the mission ends. getVariable ARRAY is not supported.

Parameters:
Expand Down
1 change: 1 addition & 0 deletions addons/common/fnc_getFirer.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ Function: CBA_fnc_getFirer

Description:
A function used to find out which unit exactly fired.

Replacement for gunner, on multi-turret vehicles.

Parameters:
Expand Down
4 changes: 3 additions & 1 deletion addons/common/fnc_getNearest.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@
Function: CBA_fnc_getNearest

Description:
A function used to find out the nearest entity parsed in an array to a position. Compares the distance between entity's in the parsed array.
Find out the nearest entity parsed in an array to a position.

Compares the distance between entity's in the parsed array.

Parameters:
_position - <MARKER, OBJECT, LOCATION, GROUP, TASK or POSITION>
Expand Down
2 changes: 1 addition & 1 deletion addons/common/fnc_getNearestBuilding.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
Function: CBA_fnc_getNearestBuilding

Description:
A function used to find out the nearest building and appropriate building positions available.
Find the nearest building and number of building positions available.

Parameters:
_position - <OBJECT, POSITION>
Expand Down
5 changes: 3 additions & 2 deletions addons/common/fnc_mapRelPos.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,9 @@
Function: CBA_fnc_mapRelPos

Description:
Find a position relative to a known position on the map. Passing strings
in for the Northing and Easting is the preferred way.
Find a position relative to a known position on the map.

Passing strings in for the Northing and Easting is the preferred way.

Parameters:
_pos - Position in 10 digit grid format [Easting, Northing] [Array]
Expand Down
1 change: 1 addition & 0 deletions addons/common/fnc_removeBackpackCargo.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ Function: CBA_fnc_removeBackpackCargo

Description:
Removes specific backpack(s) from local cargo space.

Warning: Backpack's inventory information is lost.

* Use <CBA_fnc_removeBackpackCargoGlobal> if you want to remove the backpack(s) in
Expand Down
1 change: 1 addition & 0 deletions addons/common/fnc_removeMagazineCargo.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ Function: CBA_fnc_removeMagazineCargo

Description:
Removes specific magazine(s) from local cargo space.

Warning: Magazine's ammo count is lost and becomes full.

* Use <CBA_fnc_removeMagazineCargoGlobal> if you want to remove the magazine(s) in
Expand Down
1 change: 1 addition & 0 deletions addons/common/fnc_removeWeaponCargo.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ Function: CBA_fnc_removeWeaponCargo

Description:
Removes specific weapon(s) from local cargo space.

Warning: Weapon's attachments are lost.

* Use <CBA_fnc_removeWeaponCargoGlobal> if you want to remove the weapon(s) in
Expand Down
1 change: 1 addition & 0 deletions addons/common/fnc_selectWeapon.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ Function: CBA_fnc_selectWeapon

Description:
Selects a weapon including correctly selecting a weapon mode of specified.

Has to be executed on the machine where the unit is local.

Parameters:
Expand Down
3 changes: 2 additions & 1 deletion addons/common/fnc_turretPath.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
Function: CBA_fnc_turretPath

Description:
A function used to report the soldiers turret path in the current vehicle.
Get a unit's turret path in the current vehicle.

Reverse version of the turretUnit scripting command.

Parameters:
Expand Down
3 changes: 2 additions & 1 deletion addons/common/fnc_turretPathWeapon.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
Function: CBA_fnc_turretPathWeapon

Description:
A function used to report the turret path belonging to a weapon of given vehicle.
Get the turret path belonging to a weapon of given vehicle.

Reverse version of the weaponsTurret scripting command.

Parameters:
Expand Down
3 changes: 2 additions & 1 deletion addons/common/fnc_vehicleRole.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
Function: CBA_fnc_vehicleRole

Description:
A function used to report the soldiers role in his current vehicle.
Get a unit's role in its current vehicle.

Used because assignedVehicleRole reports the role assigned by the group leader instead of the current position.

Parameters:
Expand Down
1 change: 1 addition & 0 deletions addons/common/fnc_weaponComponents.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ Function: CBA_fnc_weaponComponents

Description:
Reports class name of base weapon without attachments and all attachments belonging to a pre equipped weapon.

Base weapon and attachments are reported in lower case capitalization.
Fixed version of BIS_fnc_weaponComponents.

Expand Down
3 changes: 2 additions & 1 deletion addons/diagnostic/fnc_peek.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
Function: CBA_fnc_peek

Description:
Peek at variable on the server
Peek at variable on the server.

To receive the variable content back, you will have to
["cba_diagnostics_receive_peak", {_this call myFunction}] call CBA_fnc_addEventHandler;

Expand Down
1 change: 1 addition & 0 deletions addons/events/fnc_addBISEventHandler.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ Function: CBA_fnc_addBISEventHandler

Description:
Adds an event handler with arguments.

Additional arguments are passed as _thisArgs. The ID is passed as _thisID.

Parameters:
Expand Down
4 changes: 3 additions & 1 deletion addons/events/fnc_addDisplayHandler.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@ Function: CBA_fnc_addDisplayHandler

Description:
Adds an action to the main display.
They are reapplied after loading a save game. Actions only persist for the mission and are removed after restart.

They are reapplied after loading a save game. Actions only persist for the
mission and are removed after restart.

Parameters:
_type - Display handler type to attach. <STRING>
Expand Down
5 changes: 4 additions & 1 deletion addons/events/fnc_globalEventJIP.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,10 @@
Function: CBA_fnc_globalEventJIP

Description:
Raises a CBA event on all machines. Event is put on a stack that is executed on every future JIP machine. Stack can be overwritten by using the same JIP-Stack-ID.
Raises a CBA event on all machines.

Event is put on a stack that is executed on every future JIP machine.
Stack can be overwritten by using the same JIP-Stack-ID.

Parameters:
_eventName - Type of event to publish. <STRING>
Expand Down
3 changes: 2 additions & 1 deletion addons/help/fnc_setCreditsLine.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
Function: CBA_help_fnc_setCreditsLine

Description:
Picks a random CfgPatches entry with an "author" entry and displays author, version and url in the main menu and ingame in the pause menu.
Picks a random CfgPatches entry with an "author" entry and displays author,
version and URL in the main menu and ingame in the pause menu.

Parameters:
0: _display - Either Main menu or Pause menu display or a control of these displays. <DISPLAY, CONTROL>
Expand Down
4 changes: 3 additions & 1 deletion addons/help/fnc_setVersionLine.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@
Function: CBA_help_fnc_setVersionLine

Description:
Displays all CfgPatches with a "versionDesc" entry in the main menu. Mods are cycled automatically every 3 seconds or can be browsed using LMB and RMB.
Displays all CfgPatches with a "versionDesc" entry in the main menu.

Mods are cycled automatically every 3 seconds or can be browsed using LMB and RMB.
Double clicking executes the script in "versionAct".

Parameters:
Expand Down
1 change: 1 addition & 0 deletions addons/network/fnc_publicVariable.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ Function: CBA_fnc_publicVariable

Description:
CBA_fnc_publicVariable does only broadcast the new value if it doesn't exist in missionNamespace or the new value is different to the one in missionNamespace.

Checks also for different types. Nil as value gets always broadcasted.

Should reduce network traffic.
Expand Down
1 change: 1 addition & 0 deletions addons/network/fnc_setVarNet.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ Function: CBA_fnc_setVarNet

Description:
Same as setVariable ["name",var, true] but only broadcasts when the value of var is different to the one which is already saved in the variable space.

Checks also for different types. Nil as value gets always broadcasted.

Should reduce network traffic.
Expand Down
6 changes: 4 additions & 2 deletions addons/strings/fnc_floatToString.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,10 @@ Function: CBA_fnc_floatToString

Description:
Returns a higher precision string representation of a IEEE 754 floating point
number than the str function. This function is as barebones as possible. Inline
macro version of this function can be used with FLOAT_TO_STRING(num).
number than the str function.

This function is as barebones as possible. Inline macro version of this
function can be used with FLOAT_TO_STRING(num).

Limitations:

Expand Down
5 changes: 3 additions & 2 deletions addons/strings/fnc_formatElapsedTime.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,9 @@
Function: CBA_fnc_formatElapsedTime

Description:
Formats time in seconds according to a format. Intended to show time elapsed,
rather than time-of-day.
Formats time in seconds according to a format.

Intended to show time elapsed, rather than time-of-day.

Parameters:
_seconds - Number of seconds to format, for example from 'time' command [number]
Expand Down
4 changes: 3 additions & 1 deletion addons/strings/fnc_formatNumber.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@ Function: CBA_fnc_formatNumber

Description:
Formats a number to a minimum integer width and to a specific number of
decimal places (including padding with 0s and correct rounding). Numbers
decimal places.

The formatting includes padding with 0s and correct rounding. Numbers
are always displayed fully, never being condensed using an exponent (e.g.
the number 1.234e9 would be given as "1234000000").

Expand Down
4 changes: 3 additions & 1 deletion addons/strings/fnc_substr.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@
Function: CBA_fnc_substr

Description:
Retrieves a substring of this instance. The substring starts at a specified character position and has a specified length.
Retrieves a substring of this instance.

The substring starts at a specified character position and has a specified length.

Parameters:
_string - String to extract from [String]
Expand Down
1 change: 1 addition & 0 deletions addons/vectors/fnc_simplifyAngle.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ Function: CBA_fnc_simplifyAngle

Description:
Returns an equivalent angle to the specified angle in the range 0 to 360.

If the input angle is in the range 0 to 360, it will be returned unchanged.

Parameters:
Expand Down
1 change: 1 addition & 0 deletions addons/vectors/fnc_simplifyAngle180.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ Function: CBA_fnc_simplifyAngle180

Description:
Returns an equivalent angle to the specified angle in the range -180 to 180.

If the input angle is in the range -180 to 180, it will be returned unchanged.

Parameters:
Expand Down
10 changes: 6 additions & 4 deletions addons/vectors/fnc_vectCross.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,16 @@
Function: CBA_fnc_vectCross

Description:
Returns the cross product vector of two vectors. Vectors must both be three dimensional.
Returns the cross product vector of two vectors.

Vectors must both be three dimensional.

Parameters:
_u the first vector.
_v the second vector.
_u the first vector.
_v the second vector.

Returns:
the cross product (vector) of the two vectors.
The cross product (vector) of the two vectors.

Examples:
(begin example)
Expand Down
11 changes: 7 additions & 4 deletions addons/vectors/fnc_vectCross2D.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,17 @@
Function: CBA_fnc_vectCross2D

Description:
Returns the cross product vector of two 2D vectors. The result is an integer value (positive or negative), representing the magnitude of the height component.
Returns the cross product vector of two 2D vectors.

The result is an integer value (positive or negative), representing the
magnitude of the height component.

Parameters:
_u the first vector.
_v the second vector.
_u the first vector.
_v the second vector.

Returns:
the cross product (scalar magnitude) of the two vectors.
The cross product (scalar magnitude) of the two vectors.

Examples:
(begin example)
Expand Down
9 changes: 5 additions & 4 deletions addons/vectors/fnc_vectDot.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,15 @@
Function: CBA_fnc_vectDot

Description:
Returns the dot product of two vectors. Vectors can be either two or three dimesions, but they must be the same dimension.
Returns the dot product of two vectors.
Vectors can be either two or three dimesions, but they must be the same dimension.

Parameters:
_u the first vector.
_v the second vector.
_u the first vector.
_v the second vector.

Returns:
the dot product (scalar) of the two vectors.
The dot product (scalar) of the two vectors.

Examples:
(begin example)
Expand Down
Loading