ACE3/addons/reload/CfgVehicles.hpp
johnb432 44e0fdb6fa
Reload - Code cleanup and various improvements (#9343)
* Reload code cleanup

* Update fnc_startLinkingBelt.sqf

* Update addons/reload/functions/fnc_getAmmoToLinkBelt.sqf

Co-authored-by: Jouni Järvinen <rautamiekka@users.noreply.github.com>

---------

Co-authored-by: Jouni Järvinen <rautamiekka@users.noreply.github.com>
2023-08-28 14:26:24 -03:00

50 lines
1.8 KiB
C++

class CfgVehicles {
class Man;
class CAManBase: Man {
class ACE_SelfActions {
class ACE_Equipment {
class GVAR(checkAmmo) {
displayName = CSTRING(checkAmmo);
condition = QUOTE(GVAR(showCheckAmmoSelf) && {_player call FUNC(canCheckAmmoSelf)});
statement = QUOTE(call FUNC(checkAmmo));
exceptions[] = {"isNotInside", "isNotSwimming", "isNotSitting"};
};
};
};
class ACE_Actions {
class ACE_Weapon {
class GVAR(linkBelt) {
displayName = CSTRING(linkBelt);
distance = 2;
condition = QUOTE(([ARR_2(_player, _target)] call FUNC(getAmmoToLinkBelt)) > 0);
statement = QUOTE([ARR_2(_player, _target)] call FUNC(startLinkingBelt));
exceptions[] = {"isNotInside"};
};
class GVAR(checkAmmo) {
displayName = CSTRING(checkAmmo);
distance = 2;
condition = QUOTE(call FUNC(canCheckAmmo));
statement = QUOTE(call FUNC(checkAmmo));
exceptions[] = {"isNotInside", "isNotSwimming", "isNotSitting"};
};
};
};
};
class LandVehicle;
class StaticWeapon: LandVehicle {
class ACE_Actions {
class ACE_MainActions {
class GVAR(checkAmmo) {
displayName = CSTRING(checkAmmo);
distance = 2;
condition = QUOTE(call FUNC(canCheckAmmo));
statement = QUOTE(call FUNC(checkAmmo));
exceptions[] = {"isNotInside", "isNotSwimming", "isNotSitting"};
};
};
};
};
};