forked from Bob-Murphy/A3-Antistasi-1.4
-
-
Notifications
You must be signed in to change notification settings - Fork 173
Expand file tree
/
Copy pathfn_initACE.sqf
More file actions
66 lines (56 loc) · 2.51 KB
/
Copy pathfn_initACE.sqf
File metadata and controls
66 lines (56 loc) · 2.51 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
/*
* File: fn_initACE.sqf
* Function: A3A_fnc_initACE
* Function description
* Initialization code for ACE3 stuff
* Arguments:
* 0: Objects <ARRAY>
* 1: All <BOOL>
*
* Return Value:
* None
*
* Example:
* call A3A_fnc_initACE;
*
* Public: No
*/
#include "..\..\script_component.hpp"
if (A3A_hasACEMedical) then {
// log atropine, epinephrine, and morphine use
// Appears to be local to the medic
["ace_treatmentSucceded", {
params ["_caller", "_target", "_selectionName", "_className", "_itemUser", "_usedItem"];
if (_usedItem in ["ACE_adenosine", "ACE_epinephrine", "ACE_morphine", "ACE_painkillers"]) then {
private _callerUID = ["AI",getPlayerUID _caller] select (isPlayer _caller);
private _targetUID = ["AI",getPlayerUID _target] select (isPlayer _target);
ServerInfo_5("Player %1 [%2] used %3 on %4 [%5]",name _caller,_callerUID,_usedItem,name _target,_targetUID);
};
}] call CBA_fnc_addEventHandler;
};
["ace_explosives_place", {
params ["_explosive","_dir","_pitch","_unit"];
if (captive player && _unit == player) then { player setCaptive false };
}] call CBA_fnc_addEventHandler;
["ace_throwableThrown", {
params ["_unit", "_throwable"];
if (captive player && _unit == player) then { player setCaptive false };
}] call CBA_fnc_addEventHandler;
["ace_towing_ropeDeployed", {
params ["_unit", "_target", "_ropeClass"];
if (captive player && _unit == player) then { player setCaptive false };
}] call CBA_fnc_addEventHandler;
[boxX, boxX] call ace_common_fnc_claim; //Disables ALL Ace Interactions
[vehicleBox, VehicleBox] call ace_common_fnc_claim; //Disables ALL Ace Interactions
if (isNil "ace_interact_menu_fnc_compileMenu" || isNil "ace_interact_menu_fnc_compileMenuSelfAction") exitWith {
Error("ACE non-public functions have changed, rebel group join/leave actions will not be removed.");
};
// Remove actions from Antistasi unit types
// Need to compile the menus first, because ACE delays creating menus until a unit of that class is created
{
[_x] call ace_interact_menu_fnc_compileMenu;
[_x] call ace_interact_menu_fnc_compileMenuSelfAction;
[_x, 0, ["ACE_ApplyHandcuffs"]] call ace_interact_menu_fnc_removeActionFromClass;
[_x, 1, ["ACE_SelfActions", "ACE_TeamManagement", "ACE_LeaveGroup"]] call ace_interact_menu_fnc_removeActionFromClass;
[_x, 0, ["ACE_MainActions", "ACE_JoinGroup"]] call ace_interact_menu_fnc_removeActionFromClass;
} forEach (A3A_customUnitClasses + A3A_customSkeletonClasses);