Removed unnecessary ACE_Action calls parameters and changed others to _this

This commit is contained in:
jonpas 2015-08-18 03:37:02 +02:00
parent 387aad4204
commit 7244a583d6
5 changed files with 12 additions and 13 deletions

View File

@ -4,8 +4,8 @@
class GVAR(Rearm) { \
displayName = CSTRING(Rearm); \
distance = REARM_ACTION_DISTANCE; \
condition = QUOTE([ARR_2(_player,_target)] call FUNC(canRearm)); \
statement = QUOTE([ARR_2(_player,_target)] call FUNC(rearm)); \
condition = QUOTE(_this call FUNC(canRearm)); \
statement = QUOTE(_player call FUNC(rearm)); \
exceptions[] = {"isNotInside"}; \
icon = PATHTOF(ui\icon_rearm_interact.paa); \
}; \
@ -18,8 +18,8 @@
class GVAR(PickUpAmmo) { \
displayName = CSTRING(PickUpAmmo); \
distance = REARM_ACTION_DISTANCE; \
condition = QUOTE([ARR_2(_player,_target)] call FUNC(canPickUpAmmo)); \
insertChildren = QUOTE([_target] call FUNC(addRearmActions)); \
condition = QUOTE(_this call FUNC(canPickUpAmmo)); \
insertChildren = QUOTE(_target call FUNC(addRearmActions)); \
exceptions[] = {"isNotInside"}; \
icon = PATHTOF(ui\icon_rearm_interact.paa); \
}; \

View File

@ -3,8 +3,8 @@
* Check if a unit can pick up ammo.
*
* Arguments:
* 0: Unit <OBJECT>
* 1: Target <OBJECT>
* 0: Target <OBJECT>
* 1: Unit <OBJECT>
*
* Return Value:
* Can Pick Up Ammo <BOOL>
@ -16,6 +16,6 @@
*/
#include "script_component.hpp"
params ["_unit", "_target"];
params ["_target", "_unit"];
!(isNull _unit || {!(_unit isKindOf "CAManBase")} || {!local _unit} || {(_target distance _unit) > REARM_ACTION_DISTANCE})

View File

@ -3,8 +3,8 @@
* Check if a unit can rearm.
*
* Arguments:
* 0: Unit <OBJECT>
* 1: Target <OBJECT>
* 0: Target <OBJECT>
* 1: Unit <OBJECT>
*
* Return Value:
* Can Rearm <BOOL>
@ -17,7 +17,7 @@
#include "script_component.hpp"
private ["_magazineClass", "_magazines", "_turretPath"];
params ["_unit", "_target"];
params ["_target", "_unit"];
if (GVAR(level) == 0 || {isNull _unit} || {!(_unit isKindOf "CAManBase")} || {!local _unit} || {_target distance _unit > REARM_ACTION_DISTANCE}) exitWith {false};

View File

@ -34,7 +34,7 @@ if (_tmpCal > 0) then {
if (_tmpCal > 0) then {
_cal = _tmpCal;
} else {
diag_log format ["ACE_Rearm: Undefined Ammo [%1 : %2]", _ammo, inheritsFrom (configFile >> "CfgAmmo" >> _ammo)];
diag_log format ["[ACE] ERROR: Undefined Ammo [%1 : %2]", _ammo, inheritsFrom (configFile >> "CfgAmmo" >> _ammo)];
if (_ammo isKindOf "BulletBase") then {
_cal = 8;
} else {

View File

@ -4,7 +4,6 @@
*
* Arguments:
* 0: Unit <OBJECT>
* 1: Vehicle <OBJECT>
*
* Return Value:
* None
@ -17,7 +16,7 @@
#include "script_component.hpp"
private ["_magazineClass", "_ammo", "_tmpCal", "_cal", "_idx", "_needRearmMags", "_magazineDisplayName"];
params ["_unit", "_vehicle"];
params ["_unit"];
_magazineClass = _unit getVariable QGVAR(carriedMagazine);
if (isNil "_magazineClass") exitWith {false};