From e4a4a942d09e0b5386d92ff824e00fcacff86b9d Mon Sep 17 00:00:00 2001 From: Michael Braun Date: Sat, 8 Aug 2015 14:40:23 +0200 Subject: [PATCH] Updated function documentation of Weaponselect --- .../fnc_countMagazinesForGrenadeMuzzle.sqf | 17 +++++++++++------ .../fnc_displayGrenadeTypeAndNumber.sqf | 16 ++++++++++------ .../functions/fnc_findNextGrenadeMagazine.sqf | 10 +++++++--- .../functions/fnc_findNextGrenadeMuzzle.sqf | 10 +++++++--- .../functions/fnc_fireSmokeLauncher.sqf | 10 +++++++--- .../functions/fnc_getSelectedGrenade.sqf | 12 ++++++++---- .../functions/fnc_playChangeFiremodeSound.sqf | 10 +++++++--- .../functions/fnc_putWeaponAway.sqf | 10 +++++++--- .../functions/fnc_selectGrenadeAll.sqf | 10 +++++++--- .../functions/fnc_selectGrenadeFrag.sqf | 10 +++++++--- .../functions/fnc_selectGrenadeOther.sqf | 10 +++++++--- .../functions/fnc_selectWeaponMode.sqf | 10 +++++++--- .../functions/fnc_selectWeaponMuzzle.sqf | 10 +++++++--- .../functions/fnc_selectWeaponVehicle.sqf | 10 +++++++--- .../functions/fnc_setNextGrenadeMuzzle.sqf | 10 +++++++--- .../weaponselect/functions/fnc_throwGrenade.sqf | 10 +++++++--- 16 files changed, 120 insertions(+), 55 deletions(-) diff --git a/addons/weaponselect/functions/fnc_countMagazinesForGrenadeMuzzle.sqf b/addons/weaponselect/functions/fnc_countMagazinesForGrenadeMuzzle.sqf index 44a60b8f13..572a83edf1 100644 --- a/addons/weaponselect/functions/fnc_countMagazinesForGrenadeMuzzle.sqf +++ b/addons/weaponselect/functions/fnc_countMagazinesForGrenadeMuzzle.sqf @@ -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 + * 1: Muzzle Class * - * Return value: - * 0: Number of magazines - * 1: First magazine name + * Return Value: + * 0: Number of magazines + * 1: First magazine name + * + * Example: + * [player, currentMuzzle player] call ace_weaponselect_fnc_countMagazinesForGrenadeMuzzle + * + * Public: No */ #include "script_component.hpp" diff --git a/addons/weaponselect/functions/fnc_displayGrenadeTypeAndNumber.sqf b/addons/weaponselect/functions/fnc_displayGrenadeTypeAndNumber.sqf index 19120ce9cd..37956d2121 100644 --- a/addons/weaponselect/functions/fnc_displayGrenadeTypeAndNumber.sqf +++ b/addons/weaponselect/functions/fnc_displayGrenadeTypeAndNumber.sqf @@ -1,14 +1,18 @@ /* * Author: esteldunedain - * * Display a grenade type and quantity. * - * Argument: - * 0: magazine class - * 1: number of magazines + * Arguments: + * 0: magazine class + * 1: number of magazines * - * 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); diff --git a/addons/weaponselect/functions/fnc_findNextGrenadeMagazine.sqf b/addons/weaponselect/functions/fnc_findNextGrenadeMagazine.sqf index 244f85b5ab..2b2370260a 100644 --- a/addons/weaponselect/functions/fnc_findNextGrenadeMagazine.sqf +++ b/addons/weaponselect/functions/fnc_findNextGrenadeMagazine.sqf @@ -1,13 +1,17 @@ /* * Author: commy2 - * * Find the next Grenade Magazine. * - * Argument: + * Arguments: * 0: Grenade Type ("All", "Frag", "NonFrag") * - * Return value: + * Return Value: * Magazine classname + * + * Example: + * ["All"] call ace_weaponselect_fnc_findNextGrenadeMagazine + * + * Public: No */ #include "script_component.hpp" diff --git a/addons/weaponselect/functions/fnc_findNextGrenadeMuzzle.sqf b/addons/weaponselect/functions/fnc_findNextGrenadeMuzzle.sqf index 39c4e84d1c..5aa096f44e 100644 --- a/addons/weaponselect/functions/fnc_findNextGrenadeMuzzle.sqf +++ b/addons/weaponselect/functions/fnc_findNextGrenadeMuzzle.sqf @@ -1,13 +1,17 @@ /* * Author: commy2 - * * Find the next Grenade Muzzle. * - * Argument: + * Arguments: * 0: Grenade Type ("All", "Frag", "NonFrag") * - * Return value: + * Return Value: * Class name of next throw muzzle + * + * Example: + * ["All"] call ace_weaponselect_fnc_findNextGrenadeMuzzle + * + * Public: No */ #include "script_component.hpp" diff --git a/addons/weaponselect/functions/fnc_fireSmokeLauncher.sqf b/addons/weaponselect/functions/fnc_fireSmokeLauncher.sqf index 9e9369ce26..20ef674dae 100644 --- a/addons/weaponselect/functions/fnc_fireSmokeLauncher.sqf +++ b/addons/weaponselect/functions/fnc_fireSmokeLauncher.sqf @@ -1,13 +1,17 @@ /* * Author: commy2 - * * Fire Vehicle Smoke Launcher. * - * Argument: + * Arguments: * 0: Vehicle * - * Return value: + * Return Value: * None + * + * Example: + * [vehicle player] call ace_weaponselect_fnc_fireSmokeLauncher + * + * Public: No */ #include "script_component.hpp" diff --git a/addons/weaponselect/functions/fnc_getSelectedGrenade.sqf b/addons/weaponselect/functions/fnc_getSelectedGrenade.sqf index 53fabde032..aa89a13c98 100644 --- a/addons/weaponselect/functions/fnc_getSelectedGrenade.sqf +++ b/addons/weaponselect/functions/fnc_getSelectedGrenade.sqf @@ -1,13 +1,17 @@ /* * Author: commy2 - * * Returns the selected Grenade Muzzle. * - * Argument: + * Arguments: * None * - * Return value: - * Class name of selected throw muzzle. + * Return Value: + * Class name of selected throw muzzle + * + * Example: + * [] call ace_weaponselect_fnc_getSelectedGrenade + * + * Public: No */ #include "script_component.hpp" diff --git a/addons/weaponselect/functions/fnc_playChangeFiremodeSound.sqf b/addons/weaponselect/functions/fnc_playChangeFiremodeSound.sqf index a64203fda8..c79f03c6f2 100644 --- a/addons/weaponselect/functions/fnc_playChangeFiremodeSound.sqf +++ b/addons/weaponselect/functions/fnc_playChangeFiremodeSound.sqf @@ -1,14 +1,18 @@ /* * Author: commy2 - * * Play the change firemode sound for specified weapon at units position. * - * Argument: + * Arguments: * 0: Unit * 1: Weapon * - * Return value: + * Return Value: * None + * + * Example: + * [player, currentWeapon player] call ace_weaponselect_fnc_playChangeFiremodeSound + * + * Public: No */ #include "script_component.hpp" diff --git a/addons/weaponselect/functions/fnc_putWeaponAway.sqf b/addons/weaponselect/functions/fnc_putWeaponAway.sqf index 4c55bd04fc..faddb4d869 100644 --- a/addons/weaponselect/functions/fnc_putWeaponAway.sqf +++ b/addons/weaponselect/functions/fnc_putWeaponAway.sqf @@ -1,13 +1,17 @@ /* * Author: commy2 - * * The unit will put its current weapon away. * - * Argument: + * Arguments: * 0: Unit * - * Return value: + * Return Value: * None + * + * Example: + * [player] call ace_weaponselect_fnc_putWeaponAway + * + * Public: NO */ #include "script_component.hpp" diff --git a/addons/weaponselect/functions/fnc_selectGrenadeAll.sqf b/addons/weaponselect/functions/fnc_selectGrenadeAll.sqf index c5a8032d84..a68670184a 100644 --- a/addons/weaponselect/functions/fnc_selectGrenadeAll.sqf +++ b/addons/weaponselect/functions/fnc_selectGrenadeAll.sqf @@ -1,13 +1,17 @@ /* * Author: esteldunedain, commy2 - * * Cycle through all grenades. * - * Argument: + * Arguments: * 0: Unit * - * Return value: + * Return Value: * None + * + * Example: + * [player] call ace_weaponselect_fnc_selectGrenadeAll + * + * Public: No */ #include "script_component.hpp" diff --git a/addons/weaponselect/functions/fnc_selectGrenadeFrag.sqf b/addons/weaponselect/functions/fnc_selectGrenadeFrag.sqf index d1dc4e3442..c221b6cc30 100644 --- a/addons/weaponselect/functions/fnc_selectGrenadeFrag.sqf +++ b/addons/weaponselect/functions/fnc_selectGrenadeFrag.sqf @@ -1,13 +1,17 @@ /* * Author: esteldunedain, commy2 - * * Cycle through frags. * - * Argument: + * Arguments: * 0: Unit * - * Return value: + * Return Value: * None + * + * Example: + * [player] call ace_weaponselect_fnc_selectGrenadeFrag + * + * Public: No */ #include "script_component.hpp" diff --git a/addons/weaponselect/functions/fnc_selectGrenadeOther.sqf b/addons/weaponselect/functions/fnc_selectGrenadeOther.sqf index 5c7b712aa8..2f219989eb 100644 --- a/addons/weaponselect/functions/fnc_selectGrenadeOther.sqf +++ b/addons/weaponselect/functions/fnc_selectGrenadeOther.sqf @@ -1,13 +1,17 @@ /* * Author: esteldunedain, commy2 - * * Cycle through non explosive grenades. * - * Argument: + * Arguments: * 0: Unit * - * Return value: + * Return Value: * None + * + * Example: + * [player] call ace_weaponselect_fnc_selectGrenadeOther + * + * Public: No */ #include "script_component.hpp" diff --git a/addons/weaponselect/functions/fnc_selectWeaponMode.sqf b/addons/weaponselect/functions/fnc_selectWeaponMode.sqf index 37f4a125e0..815b8d28cf 100644 --- a/addons/weaponselect/functions/fnc_selectWeaponMode.sqf +++ b/addons/weaponselect/functions/fnc_selectWeaponMode.sqf @@ -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 * 1: Weapon * - * Return value: + * Return Value: * None + * + * Example: + * [player, currentWeapon player] call ace_weaponselect_fnc_selectWeaponMode + * + * Public: No */ #include "script_component.hpp" diff --git a/addons/weaponselect/functions/fnc_selectWeaponMuzzle.sqf b/addons/weaponselect/functions/fnc_selectWeaponMuzzle.sqf index 11c360817e..71c9cfc7b4 100644 --- a/addons/weaponselect/functions/fnc_selectWeaponMuzzle.sqf +++ b/addons/weaponselect/functions/fnc_selectWeaponMuzzle.sqf @@ -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 * 1: Weapon * - * Return value: + * Return Value: * None + * + * Example: + * [player, currentWeapon player] call ace_weaponselect_fnc_selectWeaponMuzzle + * + * Public: No */ #include "script_component.hpp" diff --git a/addons/weaponselect/functions/fnc_selectWeaponVehicle.sqf b/addons/weaponselect/functions/fnc_selectWeaponVehicle.sqf index 952b28c5ef..9695079da5 100644 --- a/addons/weaponselect/functions/fnc_selectWeaponVehicle.sqf +++ b/addons/weaponselect/functions/fnc_selectWeaponVehicle.sqf @@ -1,15 +1,19 @@ /* * Author: commy2 - * * Select weapon for unit in vehicle. * - * Argument: + * Arguments: * 0: Unit * 1: Vehicle * 2: Weapon index * - * Return value: + * Return Value: * None + * + * Example: + * [player, vehicle player, 1] call ace_weaponselect_fnc_selectWeaponVehicle + * + * Public: No */ #include "script_component.hpp" diff --git a/addons/weaponselect/functions/fnc_setNextGrenadeMuzzle.sqf b/addons/weaponselect/functions/fnc_setNextGrenadeMuzzle.sqf index f89b690e5e..ce7ec55393 100644 --- a/addons/weaponselect/functions/fnc_setNextGrenadeMuzzle.sqf +++ b/addons/weaponselect/functions/fnc_setNextGrenadeMuzzle.sqf @@ -1,14 +1,18 @@ /* * Author: esteldunedain - * * Select the next grenade muzzle to throw. * - * Argument: + * Arguments: * 0: Unit * 1: Muzzlename * - * Return value: + * Return Value: * None + * + * Example: + * [player, currentMuzzle player] call ace_weaponselect_fnc_setNextGrenadeMuzzle + * + * Public: No */ #include "script_component.hpp" diff --git a/addons/weaponselect/functions/fnc_throwGrenade.sqf b/addons/weaponselect/functions/fnc_throwGrenade.sqf index d3aa46cff8..2cdc8e63dc 100644 --- a/addons/weaponselect/functions/fnc_throwGrenade.sqf +++ b/addons/weaponselect/functions/fnc_throwGrenade.sqf @@ -1,9 +1,8 @@ /* * Author: commy2 - * * Display Grenade information on grenade throw. * - * Argument: + * Arguments: * 0: unit - Object the event handler is assigned to * 1: weapon - Fired weapon * 2: muzzle - Muzzle that was used @@ -12,8 +11,13 @@ * 5: magazine - magazine name which was used * 6: projectile - Object of the projectile that was shot * - * Return value: + * Return Value: * None + * + * Example: + * [_unit, _weapon, _muzzle, _mode, _ammo, _magazine, _projectile] call ace_weaponselect_fnc_throwGrenade + * + * Public: No */ #include "script_component.hpp"