Merge pull request #2059 from MikeMatrix/documentationFixWeaponselect

Updated function documentation of Weaponselect
This commit is contained in:
Glowbal 2015-08-08 14:45:28 +02:00
commit 66f2dfa31e
16 changed files with 120 additions and 55 deletions

View File

@ -1,14 +1,19 @@
/*
* Author: esteldunedain
*
* Count how many grenade magazines the unit has on the uniform and vest.
*
* Argument:
* 0: Muzzle name
* Arguments:
* 0: Unit <OBJECT>
* 1: Muzzle Class <STRING>
*
* Return value:
* 0: Number of magazines
* 1: First magazine name
* Return Value:
* 0: Number of magazines <NUMBER>
* 1: First magazine name <STRING>
*
* Example:
* [player, currentMuzzle player] call ace_weaponselect_fnc_countMagazinesForGrenadeMuzzle
*
* Public: No
*/
#include "script_component.hpp"

View File

@ -1,14 +1,18 @@
/*
* Author: esteldunedain
*
* Display a grenade type and quantity.
*
* Argument:
* 0: magazine class
* 1: number of magazines
* Arguments:
* 0: magazine class <STRING>
* 1: number of magazines <NUMBER>
*
* Return value:
* Return Value:
* None
*
* Example:
* [currentMagazine player, 3] call ace_weaponselect_fnc_displayGrenadeTypeAndNumber
*
* Public: No
*/
#include "script_component.hpp"
@ -18,7 +22,7 @@ private ["_color", "_name", "_text", "_picture"];
params ["_magazine", "_numberofMagazines"];
_color = [[1,0,0], [1,1,1]] select (_numberofMagazines > 0);
_color = [[1, 0, 0], [1, 1, 1]] select (_numberofMagazines > 0);
_name = getText (configFile >> "CfgMagazines" >> _magazine >> "displayNameShort");
_text = [format["%1 x%2", _name, _numberofMagazines], _color] call EFUNC(common,stringToColoredText);

View File

@ -1,13 +1,17 @@
/*
* Author: commy2
*
* Find the next Grenade Magazine.
*
* Argument:
* Arguments:
* 0: Grenade Type ("All", "Frag", "NonFrag") <STRING>
*
* Return value:
* Return Value:
* Magazine classname <STRING>
*
* Example:
* ["All"] call ace_weaponselect_fnc_findNextGrenadeMagazine
*
* Public: No
*/
#include "script_component.hpp"

View File

@ -1,13 +1,17 @@
/*
* Author: commy2
*
* Find the next Grenade Muzzle.
*
* Argument:
* Arguments:
* 0: Grenade Type ("All", "Frag", "NonFrag") <STRING>
*
* Return value:
* Return Value:
* Class name of next throw muzzle <STRING>
*
* Example:
* ["All"] call ace_weaponselect_fnc_findNextGrenadeMuzzle
*
* Public: No
*/
#include "script_component.hpp"

View File

@ -1,13 +1,17 @@
/*
* Author: commy2
*
* Fire Vehicle Smoke Launcher.
*
* Argument:
* Arguments:
* 0: Vehicle <OBJECT>
*
* Return value:
* Return Value:
* None
*
* Example:
* [vehicle player] call ace_weaponselect_fnc_fireSmokeLauncher
*
* Public: No
*/
#include "script_component.hpp"

View File

@ -1,13 +1,17 @@
/*
* Author: commy2
*
* Returns the selected Grenade Muzzle.
*
* Argument:
* Arguments:
* None
*
* Return value:
* Class name of selected throw muzzle. <STRING>
* Return Value:
* Class name of selected throw muzzle <STRING>
*
* Example:
* [] call ace_weaponselect_fnc_getSelectedGrenade
*
* Public: No
*/
#include "script_component.hpp"

View File

@ -1,14 +1,18 @@
/*
* Author: commy2
*
* Play the change firemode sound for specified weapon at units position.
*
* Argument:
* Arguments:
* 0: Unit <OBJECT>
* 1: Weapon <STRING>
*
* Return value:
* Return Value:
* None
*
* Example:
* [player, currentWeapon player] call ace_weaponselect_fnc_playChangeFiremodeSound
*
* Public: No
*/
#include "script_component.hpp"

View File

@ -1,13 +1,17 @@
/*
* Author: commy2
*
* The unit will put its current weapon away.
*
* Argument:
* Arguments:
* 0: Unit <OBJECT>
*
* Return value:
* Return Value:
* None
*
* Example:
* [player] call ace_weaponselect_fnc_putWeaponAway
*
* Public: NO
*/
#include "script_component.hpp"

View File

@ -1,13 +1,17 @@
/*
* Author: esteldunedain, commy2
*
* Cycle through all grenades.
*
* Argument:
* Arguments:
* 0: Unit <OBJECT>
*
* Return value:
* Return Value:
* None
*
* Example:
* [player] call ace_weaponselect_fnc_selectGrenadeAll
*
* Public: No
*/
#include "script_component.hpp"

View File

@ -1,13 +1,17 @@
/*
* Author: esteldunedain, commy2
*
* Cycle through frags.
*
* Argument:
* Arguments:
* 0: Unit <OBJECT>
*
* Return value:
* Return Value:
* None
*
* Example:
* [player] call ace_weaponselect_fnc_selectGrenadeFrag
*
* Public: No
*/
#include "script_component.hpp"

View File

@ -1,13 +1,17 @@
/*
* Author: esteldunedain, commy2
*
* Cycle through non explosive grenades.
*
* Argument:
* Arguments:
* 0: Unit <OBJECT>
*
* Return value:
* Return Value:
* None
*
* Example:
* [player] call ace_weaponselect_fnc_selectGrenadeOther
*
* Public: No
*/
#include "script_component.hpp"

View File

@ -1,14 +1,18 @@
/*
* Author: commy2
*
* The player will select the specified weapon or will change to the next firing mode if the weapon was already selected.
*
* Argument:
* Arguments:
* 0: Unit <OBJECT>
* 1: Weapon <STRING>
*
* Return value:
* Return Value:
* None
*
* Example:
* [player, currentWeapon player] call ace_weaponselect_fnc_selectWeaponMode
*
* Public: No
*/
#include "script_component.hpp"

View File

@ -1,14 +1,18 @@
/*
* Author: commy2
*
* The player will select the specified weapon and change to the first additional muzzle. E.g. the grenade launcher of a assault rifle.
*
* Argument:
* Arguments:
* 0: Unit <OBJECT>
* 1: Weapon <STRING>
*
* Return value:
* Return Value:
* None
*
* Example:
* [player, currentWeapon player] call ace_weaponselect_fnc_selectWeaponMuzzle
*
* Public: No
*/
#include "script_component.hpp"

View File

@ -1,15 +1,19 @@
/*
* Author: commy2
*
* Select weapon for unit in vehicle.
*
* Argument:
* Arguments:
* 0: Unit <OBJECT>
* 1: Vehicle <OBJECT>
* 2: Weapon index <NUMBER>
*
* Return value:
* Return Value:
* None
*
* Example:
* [player, vehicle player, 1] call ace_weaponselect_fnc_selectWeaponVehicle
*
* Public: No
*/
#include "script_component.hpp"

View File

@ -1,14 +1,18 @@
/*
* Author: esteldunedain
*
* Select the next grenade muzzle to throw.
*
* Argument:
* Arguments:
* 0: Unit <OBJECT>
* 1: Muzzlename <STRING>
*
* Return value:
* Return Value:
* None
*
* Example:
* [player, currentMuzzle player] call ace_weaponselect_fnc_setNextGrenadeMuzzle
*
* Public: No
*/
#include "script_component.hpp"

View File

@ -1,9 +1,8 @@
/*
* Author: commy2
*
* Display Grenade information on grenade throw.
*
* Argument:
* Arguments:
* 0: unit - Object the event handler is assigned to <OBJECT>
* 1: weapon - Fired weapon <STRING>
* 2: muzzle - Muzzle that was used <STRING>
@ -12,8 +11,13 @@
* 5: magazine - magazine name which was used <STRING>
* 6: projectile - Object of the projectile that was shot <OBJECT>
*
* Return value:
* Return Value:
* None
*
* Example:
* [_unit, _weapon, _muzzle, _mode, _ammo, _magazine, _projectile] call ace_weaponselect_fnc_throwGrenade
*
* Public: No
*/
#include "script_component.hpp"