Changed Optional parameter comment to default value

This commit is contained in:
jonpas 2015-08-16 23:05:26 +02:00
parent fb73d3a436
commit dcf074ed5a
3 changed files with 14 additions and 14 deletions

View File

@ -6,37 +6,37 @@
* 0: Unit that does the repairing <OBJECT>
* 1: Vehicle to repair <OBJECT>
* 2: Selected hitpoint <STRING>
* 3: Track <OBJECT> (Optional)
* 3: Track <OBJECT>/<BOOL> (default: false)
*
* Return Value:
* None
*
* Example:
* [unit, vehicle, "hipoint"] call ace_repair_fnc_canReplaceTrack
* [unit, vehicle, "hitpoint"] call ace_repair_fnc_canReplaceTrack
*
* Public: No
*/
#include "script_component.hpp"
params ["_unit", "_target", "_hitPoint", ["_wheel",false]];
TRACE_4("params",_unit,_target,_hitPoint,_wheel);
// TODO [_unit, _wheel] call EFUNC(common,claim); on start of action
params ["_unit", "_target", "_hitPoint", ["_track", false]];
TRACE_4("params",_unit,_target,_hitPoint,_track);
// TODO [_unit, _track] call EFUNC(common,claim); on start of action
if (typeName _wheel == "OBJECT") then {
if (typeName _track == "OBJECT") then {
// not near interpret as objNull
if !(_wheel in nearestObjects [_unit, ["ACE_Track"], 5]) then {
_wheel = objNull;
if !(_track in nearestObjects [_unit, ["ACE_Track"], 5]) then {
_track = objNull;
};
} else {
_wheel = objNull;
_track = objNull;
{
if ([_unit, _x, ["isNotDragging", "isNotCarrying"]] call EFUNC(common,canInteractWith)) exitWith {
_wheel = _x;
_track = _x;
};
} forEach nearestObjects [_unit, ["ACE_Track"], 5];
};
if (isNull _wheel) exitWith {false};
if (isNull _track) exitWith {false};
alive _target && {_target getHitPointDamage _hitPoint >= 1}

View File

@ -6,7 +6,7 @@
* 0: Unit that does the repairing <OBJECT>
* 1: Vehicle to repair <OBJECT>
* 2: Selected hitpoint <STRING>
* 3: Wheel <OBJECT> (Optional)
* 3: Wheel <OBJECT>/<BOOL> (default: false)
*
* Return Value:
* None
@ -18,7 +18,7 @@
*/
#include "script_component.hpp"
params ["_unit", "_target", "_hitPoint", ["_wheel",false]];
params ["_unit", "_target", "_hitPoint", ["_wheel", false]];
TRACE_4("params",_unit,_target,_hitPoint,_wheel);
// TODO [_unit, _wheel] call EFUNC(common,claim); on start of action
//if !([_unit, _target, _hitpoint, "ReplaceWheel"] call FUNC(canRepair)) exitwith {false};

View File

@ -4,7 +4,7 @@
*
* Arguments:
* 0: Unit <OBJECT>
* 1: Class <NUMBER> (Optional)
* 1: Class <NUMBER> (default: 1)
*
* Return Value:
* Is Engineer Class <BOOL>