mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Removed unnecessary ACE_Action calls parameters and changed others to _this
This commit is contained in:
parent
387aad4204
commit
7244a583d6
@ -4,8 +4,8 @@
|
|||||||
class GVAR(Rearm) { \
|
class GVAR(Rearm) { \
|
||||||
displayName = CSTRING(Rearm); \
|
displayName = CSTRING(Rearm); \
|
||||||
distance = REARM_ACTION_DISTANCE; \
|
distance = REARM_ACTION_DISTANCE; \
|
||||||
condition = QUOTE([ARR_2(_player,_target)] call FUNC(canRearm)); \
|
condition = QUOTE(_this call FUNC(canRearm)); \
|
||||||
statement = QUOTE([ARR_2(_player,_target)] call FUNC(rearm)); \
|
statement = QUOTE(_player call FUNC(rearm)); \
|
||||||
exceptions[] = {"isNotInside"}; \
|
exceptions[] = {"isNotInside"}; \
|
||||||
icon = PATHTOF(ui\icon_rearm_interact.paa); \
|
icon = PATHTOF(ui\icon_rearm_interact.paa); \
|
||||||
}; \
|
}; \
|
||||||
@ -18,8 +18,8 @@
|
|||||||
class GVAR(PickUpAmmo) { \
|
class GVAR(PickUpAmmo) { \
|
||||||
displayName = CSTRING(PickUpAmmo); \
|
displayName = CSTRING(PickUpAmmo); \
|
||||||
distance = REARM_ACTION_DISTANCE; \
|
distance = REARM_ACTION_DISTANCE; \
|
||||||
condition = QUOTE([ARR_2(_player,_target)] call FUNC(canPickUpAmmo)); \
|
condition = QUOTE(_this call FUNC(canPickUpAmmo)); \
|
||||||
insertChildren = QUOTE([_target] call FUNC(addRearmActions)); \
|
insertChildren = QUOTE(_target call FUNC(addRearmActions)); \
|
||||||
exceptions[] = {"isNotInside"}; \
|
exceptions[] = {"isNotInside"}; \
|
||||||
icon = PATHTOF(ui\icon_rearm_interact.paa); \
|
icon = PATHTOF(ui\icon_rearm_interact.paa); \
|
||||||
}; \
|
}; \
|
||||||
|
@ -3,8 +3,8 @@
|
|||||||
* Check if a unit can pick up ammo.
|
* Check if a unit can pick up ammo.
|
||||||
*
|
*
|
||||||
* Arguments:
|
* Arguments:
|
||||||
* 0: Unit <OBJECT>
|
* 0: Target <OBJECT>
|
||||||
* 1: Target <OBJECT>
|
* 1: Unit <OBJECT>
|
||||||
*
|
*
|
||||||
* Return Value:
|
* Return Value:
|
||||||
* Can Pick Up Ammo <BOOL>
|
* Can Pick Up Ammo <BOOL>
|
||||||
@ -16,6 +16,6 @@
|
|||||||
*/
|
*/
|
||||||
#include "script_component.hpp"
|
#include "script_component.hpp"
|
||||||
|
|
||||||
params ["_unit", "_target"];
|
params ["_target", "_unit"];
|
||||||
|
|
||||||
!(isNull _unit || {!(_unit isKindOf "CAManBase")} || {!local _unit} || {(_target distance _unit) > REARM_ACTION_DISTANCE})
|
!(isNull _unit || {!(_unit isKindOf "CAManBase")} || {!local _unit} || {(_target distance _unit) > REARM_ACTION_DISTANCE})
|
||||||
|
@ -3,8 +3,8 @@
|
|||||||
* Check if a unit can rearm.
|
* Check if a unit can rearm.
|
||||||
*
|
*
|
||||||
* Arguments:
|
* Arguments:
|
||||||
* 0: Unit <OBJECT>
|
* 0: Target <OBJECT>
|
||||||
* 1: Target <OBJECT>
|
* 1: Unit <OBJECT>
|
||||||
*
|
*
|
||||||
* Return Value:
|
* Return Value:
|
||||||
* Can Rearm <BOOL>
|
* Can Rearm <BOOL>
|
||||||
@ -17,7 +17,7 @@
|
|||||||
#include "script_component.hpp"
|
#include "script_component.hpp"
|
||||||
|
|
||||||
private ["_magazineClass", "_magazines", "_turretPath"];
|
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};
|
if (GVAR(level) == 0 || {isNull _unit} || {!(_unit isKindOf "CAManBase")} || {!local _unit} || {_target distance _unit > REARM_ACTION_DISTANCE}) exitWith {false};
|
||||||
|
|
||||||
|
@ -34,7 +34,7 @@ if (_tmpCal > 0) then {
|
|||||||
if (_tmpCal > 0) then {
|
if (_tmpCal > 0) then {
|
||||||
_cal = _tmpCal;
|
_cal = _tmpCal;
|
||||||
} else {
|
} 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 {
|
if (_ammo isKindOf "BulletBase") then {
|
||||||
_cal = 8;
|
_cal = 8;
|
||||||
} else {
|
} else {
|
||||||
|
@ -4,7 +4,6 @@
|
|||||||
*
|
*
|
||||||
* Arguments:
|
* Arguments:
|
||||||
* 0: Unit <OBJECT>
|
* 0: Unit <OBJECT>
|
||||||
* 1: Vehicle <OBJECT>
|
|
||||||
*
|
*
|
||||||
* Return Value:
|
* Return Value:
|
||||||
* None
|
* None
|
||||||
@ -17,7 +16,7 @@
|
|||||||
#include "script_component.hpp"
|
#include "script_component.hpp"
|
||||||
|
|
||||||
private ["_magazineClass", "_ammo", "_tmpCal", "_cal", "_idx", "_needRearmMags", "_magazineDisplayName"];
|
private ["_magazineClass", "_ammo", "_tmpCal", "_cal", "_idx", "_needRearmMags", "_magazineDisplayName"];
|
||||||
params ["_unit", "_vehicle"];
|
params ["_unit"];
|
||||||
|
|
||||||
_magazineClass = _unit getVariable QGVAR(carriedMagazine);
|
_magazineClass = _unit getVariable QGVAR(carriedMagazine);
|
||||||
if (isNil "_magazineClass") exitWith {false};
|
if (isNil "_magazineClass") exitWith {false};
|
||||||
|
Loading…
Reference in New Issue
Block a user