mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Reload/Interaction - Fix 2 hemtt ingame errors (#7924)
* fix 2 hemtt ingame errors * Extract broken calls to function * Update addons/interaction/functions/fnc_doRemoteControl.sqf Co-authored-by: Dystopian <sddex@ya.ru> Co-authored-by: Dystopian <sddex@ya.ru>
This commit is contained in:
parent
25cc139dba
commit
153644b77a
@ -35,19 +35,7 @@ class ACE_ZeusActions {
|
||||
displayName = "$STR_A3_CfgVehicles_ModuleRemoteControl_F";
|
||||
icon = "\A3\Modules_F_Curator\Data\portraitRemoteControl_ca.paa";
|
||||
condition = QUOTE(ZEUS_ACTION_CONDITION && {-1 < (curatorSelected select 0) findIf {!isNull effectiveCommander _x}});
|
||||
statement = QUOTE( \
|
||||
private _units = curatorSelected select 0; \
|
||||
private _unit = _units param [ARR_2( \
|
||||
_units findIf { \
|
||||
side _x in [ARR_4(east,west,resistance,civilian)] \
|
||||
&& !(isPlayer _x) \
|
||||
}, \
|
||||
objNull \
|
||||
)]; \
|
||||
bis_fnc_curatorObjectPlaced_mouseOver = [ARR_2('OBJECT',_unit)]; \
|
||||
private _rc = group _target createUnit [ARR_5('ModuleRemoteControl_F',[ARR_3(0,0,0)],[],0,'NONE')]; \
|
||||
_rc setVariable [ARR_2('BIS_fnc_initModules_disableAutoActivation',false)]; \
|
||||
);
|
||||
statement = QUOTE(call FUNC(doRemoteControl));
|
||||
};
|
||||
|
||||
class GVAR(repair) {
|
||||
|
@ -25,6 +25,7 @@ PREP(canPassMagazine);
|
||||
PREP(passMagazine);
|
||||
PREP(canBecomeLeader);
|
||||
PREP(doBecomeLeader);
|
||||
PREP(doRemoteControl);
|
||||
PREP(canTapShoulder);
|
||||
PREP(tapShoulder);
|
||||
PREP(canPardon);
|
||||
|
25
addons/interaction/functions/fnc_doRemoteControl.sqf
Normal file
25
addons/interaction/functions/fnc_doRemoteControl.sqf
Normal file
@ -0,0 +1,25 @@
|
||||
#include "script_component.hpp"
|
||||
/*
|
||||
* Author: SilentSpike, joko
|
||||
*
|
||||
* Arguments:
|
||||
* None
|
||||
*
|
||||
* Return Value:
|
||||
* None
|
||||
*
|
||||
* Example:
|
||||
* call ace_interaction_fnc_onRemoteControl
|
||||
*
|
||||
* Public: No
|
||||
*/
|
||||
|
||||
private _units = curatorSelected select 0;
|
||||
private _index = _units findIf {
|
||||
(side _x) in [east, west, resistance, civilian]
|
||||
&& !(isPlayer _x)
|
||||
};
|
||||
private _unit = _units param [_index, objNull];
|
||||
bis_fnc_curatorObjectPlaced_mouseOver = ["OBJECT", _unit];
|
||||
private _rc = (group _target) createUnit ["ModuleRemoteControl_F", [0,0,0], [], 0, "NONE"];
|
||||
_rc setVariable ["BIS_fnc_initModules_disableAutoActivation", false];
|
@ -20,15 +20,7 @@ class Extended_PostInit_EventHandlers {
|
||||
class Extended_Take_EventHandlers {
|
||||
class CAManBase {
|
||||
class ACE_AmmoIndicatorReload {
|
||||
clientTake = QUOTE( \
|
||||
params [ARR_3('_unit', '_container', '_item')]; \
|
||||
if ( \
|
||||
_unit == ACE_player \
|
||||
&& {GVAR(DisplayText)} \
|
||||
&& {_container in [ARR_3(uniformContainer _unit, vestContainer _unit, backpackContainer _unit)]} \
|
||||
&& {_item == currentMagazine _unit} \
|
||||
) then {_unit call DFUNC(displayAmmo)}; \
|
||||
);
|
||||
clientTake = QUOTE(_this call FUNC(onTake));
|
||||
};
|
||||
};
|
||||
};
|
||||
|
@ -4,4 +4,5 @@ PREP(canCheckAmmoSelf);
|
||||
PREP(getAmmoToLinkBelt);
|
||||
PREP(checkAmmo);
|
||||
PREP(displayAmmo);
|
||||
PREP(onTake);
|
||||
PREP(startLinkingBelt);
|
||||
|
27
addons/reload/functions/fnc_onTake.sqf
Normal file
27
addons/reload/functions/fnc_onTake.sqf
Normal file
@ -0,0 +1,27 @@
|
||||
#include "script_component.hpp"
|
||||
/*
|
||||
* Author: ?
|
||||
*
|
||||
* Arguments:
|
||||
* 0: Unit <OBJECT>
|
||||
* 1: Container <OBJECT>
|
||||
* 2: Item <STRING>
|
||||
*
|
||||
* Return Value:
|
||||
* None
|
||||
*
|
||||
* Example:
|
||||
* [bob, backpackContainer bob, "ACE_Banana"] call ace_reload_fnc_onTake
|
||||
*
|
||||
* Public: No
|
||||
*/
|
||||
|
||||
params ["_unit", "_container", "_item"];
|
||||
if (
|
||||
_unit == ACE_player
|
||||
&& {GVAR(DisplayText)}
|
||||
&& {_item == currentMagazine _unit}
|
||||
&& {_container in [uniformContainer _unit, vestContainer _unit, backpackContainer _unit]}
|
||||
) then {
|
||||
_unit call FUNC(displayAmmo);
|
||||
};
|
Loading…
Reference in New Issue
Block a user