forked from Bob-Murphy/A3-Antistasi-1.4
-
-
Notifications
You must be signed in to change notification settings - Fork 155
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* initial commit * review changes * ace_throwable fix * Fixes & cleanup for ACE init refactor: - Removed surplus initACEUnconsciousHandler call. - Removed leftover debug systemChat from treatment logging. - Fixed bug in throwableThrown EH. - Moved claim calls before the early-out. - Moved initServer event handlers to correct place (pre-serverInitDone) --------- Co-authored-by: John Jordan <[email protected]>
- Loading branch information
1 parent
e9b1123
commit ebd76dc
Showing
4 changed files
with
100 additions
and
67 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
/* | ||
* 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_treatmentStarted", { | ||
params ["_caller", "_target", "_selectionName", "_className", "_itemUser", "_usedItem"]; | ||
if (_usedItem in ["ACE_atropine", "ACE_epinephrine", "ACE_morphine"]) then { | ||
ServerInfo_3("Player: %1 used %2 on %3",name _caller,_usedItem,name _target); | ||
}; | ||
}] 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; | ||
|
||
[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 group join action from all rebel unit types | ||
// Need to compile the menus first, because ACE delays creating menus until a unit of that class is created | ||
private _unitTypes = ["I_G_soldier_F", "I_G_Soldier_TL_F", "I_G_Soldier_AR_F", "I_G_medic_F", "I_G_engineer_F", "I_G_Soldier_GL_F", "I_G_officer_F"]; | ||
{ | ||
[_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 _unitTypes; // TODO: add raw unit types from new templates | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters