mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Run event renaming script
This commit is contained in:
parent
78cdd0d55a
commit
c4b75160a4
@ -24,7 +24,7 @@ if (!GVAR(extensionAvailable)) exitWith {
|
||||
|
||||
if (!hasInterface) exitWith {};
|
||||
|
||||
["SettingsInitialized", {
|
||||
["ace_settingsInitialized", {
|
||||
//If not enabled, dont't add PFEH
|
||||
if (!GVAR(enabled)) exitWith {};
|
||||
|
||||
@ -32,8 +32,8 @@ if (!hasInterface) exitWith {};
|
||||
[] call FUNC(initializeTerrainExtension);
|
||||
|
||||
// Register fire event handler
|
||||
["firedPlayer", DFUNC(handleFired)] call CBA_fnc_addEventHandler;
|
||||
["firedPlayerNonLocal", DFUNC(handleFired)] call CBA_fnc_addEventHandler;
|
||||
["ace_firedPlayer", DFUNC(handleFired)] call CBA_fnc_addEventHandler;
|
||||
["ace_firedPlayerNonLocal", DFUNC(handleFired)] call CBA_fnc_addEventHandler;
|
||||
|
||||
//Add warnings for missing compat PBOs (only if AB is on)
|
||||
{
|
||||
|
@ -20,3 +20,9 @@ class CfgPatches {
|
||||
class ACE_Extensions {
|
||||
extensions[] += {"ace_advanced_ballistics"};
|
||||
};
|
||||
|
||||
class ACE_newEvents {
|
||||
SettingsInitialized = "ace_settingsInitialized";
|
||||
firedPlayerNonLocal = "ace_firedPlayerNonLocal";
|
||||
firedPlayer = "ace_firedPlayer";
|
||||
};
|
@ -49,4 +49,4 @@ if ((profileNamespace getVariable ["ACE_ATragMX_profileNamespaceVersion", 0]) ==
|
||||
[] call FUNC(init);
|
||||
[] call FUNC(restore_user_data);
|
||||
|
||||
["RangerfinderData", {_this call FUNC(sord)}] call CBA_fnc_addEventHandler;
|
||||
["ace_rangerfinderData", {_this call FUNC(sord)}] call CBA_fnc_addEventHandler;
|
||||
|
@ -15,3 +15,6 @@ class CfgPatches {
|
||||
#include "CfgVehicles.hpp"
|
||||
#include "CfgWeapons.hpp"
|
||||
#include "RscTitles.hpp"
|
||||
class ACE_newEvents {
|
||||
RangerfinderData = "ace_rangerfinderData";
|
||||
};
|
@ -3,4 +3,4 @@
|
||||
if (!hasInterface) exitWith {};
|
||||
|
||||
//If attach placing, stop when opening menu:
|
||||
["interactMenuOpened", {GVAR(placeAction) = 0;}] call CBA_fnc_addEventHandler;
|
||||
["ace_interactMenuOpened", {GVAR(placeAction) = 0;}] call CBA_fnc_addEventHandler;
|
||||
|
@ -17,3 +17,7 @@ class CfgPatches {
|
||||
#include "CfgVehicles.hpp"
|
||||
#include "CfgWeapons.hpp"
|
||||
#include "GUI_VirtualAmmo.hpp"
|
||||
|
||||
class ACE_newEvents {
|
||||
interactMenuOpened = "ace_interactMenuOpened";
|
||||
};
|
@ -1,3 +1,3 @@
|
||||
#include "script_component.hpp"
|
||||
|
||||
["backpackOpened", {_this call FUNC(backpackOpened)}] call CBA_fnc_addEventHandler;
|
||||
["ace_backpackOpened", {_this call FUNC(backpackOpened)}] call CBA_fnc_addEventHandler;
|
||||
|
@ -13,3 +13,8 @@ class CfgPatches {
|
||||
};
|
||||
|
||||
#include "CfgEventHandlers.hpp"
|
||||
|
||||
class ACE_newEvents {
|
||||
backpackOpened = "ace_backpackOpened";
|
||||
backpackOpened = "ace_backpackOpened";
|
||||
};
|
@ -24,7 +24,7 @@ private _target = objectParent _backpack;
|
||||
if (isNull _target) exitWith {false};
|
||||
|
||||
// raise event on target unit
|
||||
["backpackOpened", [_target, _backpack], _target] call CBA_fnc_targetEvent;
|
||||
["ace_backpackOpened", [_target, _backpack], _target] call CBA_fnc_targetEvent;
|
||||
|
||||
// return false to open inventory as usual
|
||||
false
|
||||
|
@ -1,6 +1,6 @@
|
||||
#include "script_component.hpp"
|
||||
|
||||
["SettingsInitialized", {
|
||||
["ace_settingsInitialized", {
|
||||
// Hold on a little bit longer to ensure anims will work
|
||||
[{
|
||||
GVAR(captivityEnabled) = true;
|
||||
@ -24,15 +24,15 @@ if (isServer) then {
|
||||
}];
|
||||
};
|
||||
|
||||
["playerChanged", {_this call FUNC(handlePlayerChanged)}] call CBA_fnc_addEventHandler;
|
||||
["MoveInCaptive", {_this call FUNC(vehicleCaptiveMoveIn)}] call CBA_fnc_addEventHandler;
|
||||
["MoveOutCaptive", {_this call FUNC(vehicleCaptiveMoveOut)}] call CBA_fnc_addEventHandler;
|
||||
["ace_playerChanged", {_this call FUNC(handlePlayerChanged)}] call CBA_fnc_addEventHandler;
|
||||
["ace_moveInCaptive", {_this call FUNC(vehicleCaptiveMoveIn)}] call CBA_fnc_addEventHandler;
|
||||
["ace_moveOutCaptive", {_this call FUNC(vehicleCaptiveMoveOut)}] call CBA_fnc_addEventHandler;
|
||||
|
||||
["SetHandcuffed", {_this call FUNC(setHandcuffed)}] call CBA_fnc_addEventHandler;
|
||||
["SetSurrendered", {_this call FUNC(setSurrendered)}] call CBA_fnc_addEventHandler;
|
||||
["ace_setHandcuffed", {_this call FUNC(setHandcuffed)}] call CBA_fnc_addEventHandler;
|
||||
["ace_setSurrendered", {_this call FUNC(setSurrendered)}] call CBA_fnc_addEventHandler;
|
||||
|
||||
//Medical Integration Events
|
||||
["medical_onUnconscious", {_this call ACE_Captives_fnc_handleOnUnconscious}] call CBA_fnc_addEventHandler;
|
||||
["ace_medical_onUnconscious", {_this call ACE_Captives_fnc_handleOnUnconscious}] call CBA_fnc_addEventHandler;
|
||||
|
||||
if (!hasInterface) exitWith {};
|
||||
|
||||
|
@ -18,3 +18,20 @@ class CfgPatches {
|
||||
#include "CfgVehicles.hpp"
|
||||
#include "CfgWeapons.hpp"
|
||||
#include "CfgEden.hpp"
|
||||
class ACE_newEvents {
|
||||
SettingsInitialized = "ace_settingsInitialized";
|
||||
medical_onUnconscious = "ace_medical_onUnconscious";
|
||||
SetSurrendered = "ace_setSurrendered";
|
||||
SetHandcuffed = "ace_setHandcuffed";
|
||||
MoveOutCaptive = "ace_moveOutCaptive";
|
||||
MoveInCaptive = "ace_moveInCaptive";
|
||||
playerChanged = "ace_playerChanged";
|
||||
CaptiveStatusChanged = "ace_captiveStatusChanged";
|
||||
CaptiveStatusChanged = "ace_captiveStatusChanged";
|
||||
SetSurrendered = "ace_setSurrendered";
|
||||
SetHandcuffed = "ace_setHandcuffed";
|
||||
MoveOutCaptive = "ace_moveOutCaptive";
|
||||
SetHandcuffed = "ace_setHandcuffed";
|
||||
MoveInCaptive = "ace_moveInCaptive";
|
||||
SetHandcuffed = "ace_setHandcuffed";
|
||||
};
|
@ -21,6 +21,6 @@ params ["_unit", "_target"];
|
||||
|
||||
playSound3D [QUOTE(PATHTO_R(sounds\cable_tie_zipping.ogg)), objNull, false, (getPosASL _target), 1, 1, 10];
|
||||
|
||||
["SetHandcuffed", [_target, true], [_target]] call CBA_fnc_targetEvent;
|
||||
["ace_setHandcuffed", [_target, true], [_target]] call CBA_fnc_targetEvent;
|
||||
|
||||
_unit removeItem "ACE_CableTie";
|
||||
|
@ -47,4 +47,4 @@ if (isNull _vehicle) then {
|
||||
if (isNull _vehicle) exitWith {ERROR("");};
|
||||
|
||||
_unit setVariable [QGVAR(isEscorting), false, true];
|
||||
["MoveInCaptive", [_target, _vehicle], [_target]] call CBA_fnc_targetEvent;
|
||||
["ace_moveInCaptive", [_target, _vehicle], [_target]] call CBA_fnc_targetEvent;
|
||||
|
@ -17,4 +17,4 @@
|
||||
|
||||
params ["_unit", "_target"];
|
||||
|
||||
["SetHandcuffed", [_target, false], [_target]] call CBA_fnc_targetEvent;
|
||||
["ace_setHandcuffed", [_target, false], [_target]] call CBA_fnc_targetEvent;
|
||||
|
@ -18,4 +18,4 @@
|
||||
|
||||
params ["_unit", "_target"];
|
||||
|
||||
["MoveOutCaptive", [_target], [_target]] call CBA_fnc_targetEvent;
|
||||
["ace_moveOutCaptive", [_target], [_target]] call CBA_fnc_targetEvent;
|
||||
|
@ -30,7 +30,7 @@ if (!isServer) exitWith {};
|
||||
params ["_units"];
|
||||
{
|
||||
TRACE_2("event",_x,local _x);
|
||||
["SetHandcuffed", [_x, true], [_x]] call CBA_fnc_targetEvent;
|
||||
["ace_setHandcuffed", [_x, true], [_x]] call CBA_fnc_targetEvent;
|
||||
} forEach _units;
|
||||
}, [_units], 0.05] call EFUNC(common,waitAndExecute);
|
||||
|
||||
|
@ -30,7 +30,7 @@ if (!isServer) exitWith {};
|
||||
params ["_units"];
|
||||
{
|
||||
TRACE_2("event",_x,local _x);
|
||||
["SetSurrendered", [_x, true], [_x]] call CBA_fnc_targetEvent;
|
||||
["ace_setSurrendered", [_x, true], [_x]] call CBA_fnc_targetEvent;
|
||||
} forEach _units;
|
||||
}, [_units], 0.05] call EFUNC(common,waitAndExecute);
|
||||
|
||||
|
@ -124,4 +124,4 @@ if (_state) then {
|
||||
};
|
||||
|
||||
//Global Event after changes:
|
||||
["CaptiveStatusChanged", [_unit, _state, "SetHandcuffed"]] call CBA_fnc_globalEvent;
|
||||
["ace_captiveStatusChanged", [_unit, _state, "SetHandcuffed"]] call CBA_fnc_globalEvent;
|
||||
|
@ -117,4 +117,4 @@ if (_state) then {
|
||||
};
|
||||
|
||||
//Global Event after changes:
|
||||
["CaptiveStatusChanged", [_unit, _state, "SetSurrendered"]] call CBA_fnc_globalEvent;
|
||||
["ace_captiveStatusChanged", [_unit, _state, "SetSurrendered"]] call CBA_fnc_globalEvent;
|
||||
|
@ -1,8 +1,8 @@
|
||||
#include "script_component.hpp"
|
||||
|
||||
["AddCargoByClass", {_this call FUNC(addCargoItem)}] call CBA_fnc_addEventHandler;
|
||||
["ace_addCargoByClass", {_this call FUNC(addCargoItem)}] call CBA_fnc_addEventHandler;
|
||||
|
||||
["LoadCargo", {
|
||||
["ace_loadCargo", {
|
||||
params ["_item", "_vehicle"];
|
||||
TRACE_2("LoadCargo EH",_item,_vehicle);
|
||||
|
||||
@ -13,11 +13,11 @@
|
||||
private _itemName = getText (configFile >> "CfgVehicles" >> typeOf _item >> "displayName");
|
||||
private _vehicleName = getText (configFile >> "CfgVehicles" >> typeOf _vehicle >> "displayName");
|
||||
|
||||
["displayTextStructured", [[_hint, _itemName, _vehicleName], 3.0]] call CBA_fnc_localEvent;
|
||||
["ace_displayTextStructured", [[_hint, _itemName, _vehicleName], 3.0]] call CBA_fnc_localEvent;
|
||||
|
||||
if (_loaded) then {
|
||||
// Invoke listenable event
|
||||
["cargoLoaded", [_item, _vehicle]] call CBA_fnc_globalEvent;
|
||||
["ace_cargoLoaded", [_item, _vehicle]] call CBA_fnc_globalEvent;
|
||||
};
|
||||
}] call CBA_fnc_addEventHandler;
|
||||
|
||||
@ -34,11 +34,11 @@
|
||||
private _itemName = getText (configFile >> "CfgVehicles" >> _itemClass >> "displayName");
|
||||
private _vehicleName = getText (configFile >> "CfgVehicles" >> typeOf _vehicle >> "displayName");
|
||||
|
||||
["displayTextStructured", [[_hint, _itemName, _vehicleName], 3.0]] call CBA_fnc_localEvent;
|
||||
["ace_displayTextStructured", [[_hint, _itemName, _vehicleName], 3.0]] call CBA_fnc_localEvent;
|
||||
|
||||
if (_unloaded) then {
|
||||
// Invoke listenable event
|
||||
["cargoUnloaded", [_item, _vehicle]] call CBA_fnc_globalEvent;
|
||||
["ace_cargoUnloaded", [_item, _vehicle]] call CBA_fnc_globalEvent;
|
||||
};
|
||||
|
||||
// TOOO maybe drag/carry the unloaded item?
|
||||
|
@ -16,3 +16,21 @@ class CfgPatches {
|
||||
#include "CfgEventHandlers.hpp"
|
||||
#include "CfgVehicles.hpp"
|
||||
#include "menu.hpp"
|
||||
|
||||
class ACE_newEvents {
|
||||
LoadCargo = "ace_loadCargo";
|
||||
cargoUnloaded = "ace_cargoUnloaded";
|
||||
displayTextStructured = "ace_displayTextStructured";
|
||||
cargoLoaded = "ace_cargoLoaded";
|
||||
displayTextStructured = "ace_displayTextStructured";
|
||||
AddCargoByClass = "ace_addCargoByClass";
|
||||
ServerUnloadCargo = "ace_serverUnloadCargo";
|
||||
displayTextStructured = "ace_displayTextStructured";
|
||||
displayTextStructured = "ace_displayTextStructured";
|
||||
UnloadCargo = "ace_unloadCargo";
|
||||
displayTextStructured = "ace_displayTextStructured";
|
||||
LoadCargo = "ace_loadCargo";
|
||||
hideObjectGlobal = "ace_hideObjectGlobal";
|
||||
AddCargoByClass = "ace_addCargoByClass";
|
||||
cargoAddedByClass = "ace_cargoAddedByClass";
|
||||
};
|
@ -26,4 +26,4 @@ for "_i" from 1 to _amount do {
|
||||
};
|
||||
|
||||
// Invoke listenable event
|
||||
["cargoAddedByClass", [_itemClass, _vehicle, _amount]] call CBA_fnc_globalEvent;
|
||||
["ace_cargoAddedByClass", [_itemClass, _vehicle, _amount]] call CBA_fnc_globalEvent;
|
||||
|
@ -29,7 +29,7 @@ if (isServer) then {
|
||||
_cargoClassname = getText (_x >> "type");
|
||||
_cargoCount = getNumber (_x >> "amount");
|
||||
TRACE_3("adding ACE_Cargo", (configName _x), _cargoClassname, _cargoCount);
|
||||
["AddCargoByClass", [_cargoClassname, _vehicle, _cargoCount]] call CBA_fnc_localEvent;
|
||||
["ace_addCargoByClass", [_cargoClassname, _vehicle, _cargoCount]] call CBA_fnc_localEvent;
|
||||
};
|
||||
} count ("true" configClasses (configFile >> "CfgVehicles" >> _type >> "ACE_Cargo" >> "Cargo"));
|
||||
};
|
||||
|
@ -35,7 +35,7 @@ _vehicle setVariable [QGVAR(space), _space - _itemSize, true];
|
||||
if (_item isEqualType objNull) then {
|
||||
detach _item;
|
||||
_item attachTo [_vehicle,[0,0,-100]];
|
||||
["hideObjectGlobal", [_item, true]] call CBA_fnc_serverEvent;
|
||||
["ace_hideObjectGlobal", [_item, true]] call CBA_fnc_serverEvent;
|
||||
};
|
||||
|
||||
true
|
||||
|
@ -40,7 +40,7 @@ if ([_object, _vehicle] call FUNC(canLoadItemIn)) then {
|
||||
[
|
||||
5 * _size,
|
||||
[_object,_vehicle],
|
||||
{["LoadCargo", _this select 0] call CBA_fnc_localEvent},
|
||||
{["ace_loadCargo", _this select 0] call CBA_fnc_localEvent},
|
||||
{},
|
||||
localize LSTRING(LoadingItem)
|
||||
] call EFUNC(common,progressBar);
|
||||
@ -48,7 +48,7 @@ if ([_object, _vehicle] call FUNC(canLoadItemIn)) then {
|
||||
} else {
|
||||
private _displayName = getText (configFile >> "CfgVehicles" >> typeOf _object >> "displayName");
|
||||
|
||||
["displayTextStructured", [[LSTRING(LoadingFailed), _displayName], 3.0]] call CBA_fnc_localEvent;
|
||||
["ace_displayTextStructured", [[LSTRING(LoadingFailed), _displayName], 3.0]] call CBA_fnc_localEvent;
|
||||
};
|
||||
|
||||
_return
|
||||
|
@ -37,7 +37,7 @@ if ([_item, GVAR(interactionVehicle), ACE_player] call FUNC(canUnloadItem)) then
|
||||
[
|
||||
5 * _size,
|
||||
[_item, GVAR(interactionVehicle), ACE_player],
|
||||
{["UnloadCargo", _this select 0] call CBA_fnc_localEvent},
|
||||
{["ace_unloadCargo", _this select 0] call CBA_fnc_localEvent},
|
||||
{},
|
||||
localize LSTRING(UnloadingItem),
|
||||
{true},
|
||||
@ -47,5 +47,5 @@ if ([_item, GVAR(interactionVehicle), ACE_player] call FUNC(canUnloadItem)) then
|
||||
private _itemClass = if (_item isEqualType "") then {_item} else {typeOf _item};
|
||||
private _displayName = getText (configFile >> "CfgVehicles" >> _itemClass >> "displayName");
|
||||
|
||||
["displayTextStructured", [[LSTRING(UnloadingFailed), _displayName], 3.0]] call CBA_fnc_localEvent;
|
||||
["ace_displayTextStructured", [[LSTRING(UnloadingFailed), _displayName], 3.0]] call CBA_fnc_localEvent;
|
||||
};
|
||||
|
@ -29,7 +29,7 @@ if ((count _emptyPosAGL) != 3) exitWith {
|
||||
TRACE_4("Could not find unload pos",_vehicle,getPosASL _vehicle,isTouchingGround _vehicle,speed _vehicle);
|
||||
if ((!isNull _unloader) && {_unloader == ACE_player}) then {
|
||||
//display text saying there are no safe places to exit the vehicle
|
||||
["displayTextStructured", [localize ELSTRING(common,NoRoomToUnload)]] call CBA_fnc_localEvent;
|
||||
["ace_displayTextStructured", [localize ELSTRING(common,NoRoomToUnload)]] call CBA_fnc_localEvent;
|
||||
};
|
||||
false
|
||||
};
|
||||
@ -52,7 +52,7 @@ if (_item isEqualType objNull) then {
|
||||
detach _item;
|
||||
// hideObjectGlobal must be executed before setPos to ensure light objects are rendered correctly
|
||||
// do both on server to ensure they are executed in the correct order
|
||||
["ServerUnloadCargo", [_item, _emptyPosAGL]] call CBA_fnc_serverEvent;
|
||||
["ace_serverUnloadCargo", [_item, _emptyPosAGL]] call CBA_fnc_serverEvent;
|
||||
} else {
|
||||
private _newItem = createVehicle [_item, _emptyPosAGL, [], 0, ""];
|
||||
_newItem setPosASL (AGLtoASL _emptyPosAGL);
|
||||
|
@ -59,14 +59,14 @@
|
||||
//////////////////////////////////////////////////
|
||||
|
||||
//Status Effect EHs:
|
||||
["setStatusEffect", {_this call FUNC(statusEffect_set)}] call CBA_fnc_addEventHandler;
|
||||
["ace_setStatusEffect", {_this call FUNC(statusEffect_set)}] call CBA_fnc_addEventHandler;
|
||||
["forceWalk", false, ["ACE_SwitchUnits", "ACE_Attach", "ACE_dragging", "ACE_Explosives", "ACE_Ladder", "ACE_Sandbag", "ACE_refuel", "ACE_rearm", "ACE_dragging"]] call FUNC(statusEffect_addType);
|
||||
["blockSprint", false, []] call FUNC(statusEffect_addType);
|
||||
["setCaptive", true, [QEGVAR(captives,Handcuffed), QEGVAR(captives,Surrendered), QEGVAR(medical,unconscious)]] call FUNC(statusEffect_addType);
|
||||
["blockDamage", false, ["fixCollision"]] call FUNC(statusEffect_addType);
|
||||
["blockEngine", false, ["ACE_Refuel"]] call FUNC(statusEffect_addType);
|
||||
|
||||
["forceWalk", {
|
||||
["ace_forceWalk", {
|
||||
params ["_object", "_set"];
|
||||
TRACE_2("forceWalk EH",_object,_set);
|
||||
_object forceWalk (_set > 0);
|
||||
@ -135,12 +135,12 @@ if (isServer) then {
|
||||
ACE_LOGINFO_2("Headbug Used: Name: %1, Animation: %2",_profileName,_animation);
|
||||
}] call CBA_fnc_addEventHandler;
|
||||
|
||||
["fixCollision", FUNC(fixCollision)] call CBA_fnc_addEventHandler;
|
||||
["fixFloating", FUNC(fixFloating)] call CBA_fnc_addEventHandler;
|
||||
["fixPosition", FUNC(fixPosition)] call CBA_fnc_addEventHandler;
|
||||
["ace_fixCollision", FUNC(fixCollision)] call CBA_fnc_addEventHandler;
|
||||
["ace_fixFloating", FUNC(fixFloating)] call CBA_fnc_addEventHandler;
|
||||
["ace_fixPosition", FUNC(fixPosition)] call CBA_fnc_addEventHandler;
|
||||
|
||||
["loadPersonEvent", FUNC(loadPersonLocal)] call CBA_fnc_addEventHandler;
|
||||
["unloadPersonEvent", FUNC(unloadPersonLocal)] call CBA_fnc_addEventHandler;
|
||||
["ace_loadPersonEvent", FUNC(loadPersonLocal)] call CBA_fnc_addEventHandler;
|
||||
["ace_unloadPersonEvent", FUNC(unloadPersonLocal)] call CBA_fnc_addEventHandler;
|
||||
|
||||
["lockVehicle", {
|
||||
_this setVariable [QGVAR(lockStatus), locked _this];
|
||||
@ -151,21 +151,21 @@ if (isServer) then {
|
||||
_this lock (_this getVariable [QGVAR(lockStatus), locked _this]);
|
||||
}] call CBA_fnc_addEventHandler;
|
||||
|
||||
["setDir", {(_this select 0) setDir (_this select 1)}] call CBA_fnc_addEventHandler;
|
||||
["setFuel", {(_this select 0) setFuel (_this select 1)}] call CBA_fnc_addEventHandler;
|
||||
["engineOn", {(_this select 0) engineOn (_this select 1)}] call CBA_fnc_addEventHandler;
|
||||
["setSpeaker", {(_this select 0) setSpeaker (_this select 1)}] call CBA_fnc_addEventHandler;
|
||||
["selectLeader", {(_this select 0) selectLeader (_this select 1)}] call CBA_fnc_addEventHandler;
|
||||
["setVelocity", {(_this select 0) setVelocity (_this select 1)}] call CBA_fnc_addEventHandler;
|
||||
["playMove", {(_this select 0) playMove (_this select 1)}] call CBA_fnc_addEventHandler;
|
||||
["playMoveNow", {(_this select 0) playMoveNow (_this select 1)}] call CBA_fnc_addEventHandler;
|
||||
["switchMove", {(_this select 0) switchMove (_this select 1)}] call CBA_fnc_addEventHandler;
|
||||
["setVectorDirAndUp", {(_this select 0) setVectorDirAndUp (_this select 1)}] call CBA_fnc_addEventHandler;
|
||||
["setVanillaHitPointDamage", {(_this select 0) setHitPointDamage (_this select 1)}] call CBA_fnc_addEventHandler;
|
||||
["ace_setDir", {(_this select 0) setDir (_this select 1)}] call CBA_fnc_addEventHandler;
|
||||
["ace_setFuel", {(_this select 0) setFuel (_this select 1)}] call CBA_fnc_addEventHandler;
|
||||
["ace_engineOn", {(_this select 0) engineOn (_this select 1)}] call CBA_fnc_addEventHandler;
|
||||
["ace_setSpeaker", {(_this select 0) setSpeaker (_this select 1)}] call CBA_fnc_addEventHandler;
|
||||
["ace_selectLeader", {(_this select 0) selectLeader (_this select 1)}] call CBA_fnc_addEventHandler;
|
||||
["ace_setVelocity", {(_this select 0) setVelocity (_this select 1)}] call CBA_fnc_addEventHandler;
|
||||
["ace_playMove", {(_this select 0) playMove (_this select 1)}] call CBA_fnc_addEventHandler;
|
||||
["ace_playMoveNow", {(_this select 0) playMoveNow (_this select 1)}] call CBA_fnc_addEventHandler;
|
||||
["ace_switchMove", {(_this select 0) switchMove (_this select 1)}] call CBA_fnc_addEventHandler;
|
||||
["ace_setVectorDirAndUp", {(_this select 0) setVectorDirAndUp (_this select 1)}] call CBA_fnc_addEventHandler;
|
||||
["ace_setVanillaHitPointDamage", {(_this select 0) setHitPointDamage (_this select 1)}] call CBA_fnc_addEventHandler;
|
||||
|
||||
if (isServer) then {
|
||||
["hideObjectGlobal", {(_this select 0) hideObjectGlobal (_this select 1)}] call CBA_fnc_addEventHandler;
|
||||
["enableSimulationGlobal", {(_this select 0) enableSimulationGlobal (_this select 1)}] call CBA_fnc_addEventHandler;
|
||||
["ace_hideObjectGlobal", {(_this select 0) hideObjectGlobal (_this select 1)}] call CBA_fnc_addEventHandler;
|
||||
["ace_enableSimulationGlobal", {(_this select 0) enableSimulationGlobal (_this select 1)}] call CBA_fnc_addEventHandler;
|
||||
};
|
||||
|
||||
|
||||
@ -178,14 +178,14 @@ if (isServer) then {
|
||||
if (!isServer) then {
|
||||
["PlayerJip", {
|
||||
ACE_LOGINFO("JIP event synchronization initialized");
|
||||
["SEH_all", [player]] call CBA_fnc_serverEvent;
|
||||
["ace_sEH_all", [player]] call CBA_fnc_serverEvent;
|
||||
}] call CBA_fnc_addEventHandler;
|
||||
} else {
|
||||
["SEH_all", FUNC(_handleRequestAllSyncedEvents)] call CBA_fnc_addEventHandler;
|
||||
["ace_sEH_all", FUNC(_handleRequestAllSyncedEvents)] call CBA_fnc_addEventHandler;
|
||||
};
|
||||
|
||||
["SEH", FUNC(_handleSyncedEvent)] call CBA_fnc_addEventHandler;
|
||||
["SEH_s", FUNC(_handleRequestSyncedEvent)] call CBA_fnc_addEventHandler;
|
||||
["ace_sEH", FUNC(_handleSyncedEvent)] call CBA_fnc_addEventHandler;
|
||||
["ace_sEH_s", FUNC(_handleRequestSyncedEvent)] call CBA_fnc_addEventHandler;
|
||||
|
||||
if (isServer) then {
|
||||
[FUNC(syncedEventPFH), 0.5, []] call CBA_fnc_addPerFrameHandler;
|
||||
@ -254,7 +254,7 @@ call FUNC(checkFiles);
|
||||
[] call FUNC(readSettingsFromParamsArray);
|
||||
};
|
||||
// Event so that ACE_Modules have their settings loaded:
|
||||
["InitSettingsFromModules", []] call CBA_fnc_localEvent;
|
||||
["ace_initSettingsFromModules", []] call CBA_fnc_localEvent;
|
||||
|
||||
if (isServer) then {
|
||||
// Publish all settings data after all configs and modules are read
|
||||
@ -270,7 +270,7 @@ call FUNC(checkFiles);
|
||||
ACE_LOGINFO("Settings initialized.");
|
||||
|
||||
//Event that settings are safe to use:
|
||||
["SettingsInitialized", []] call CBA_fnc_localEvent;
|
||||
["ace_settingsInitialized", []] call CBA_fnc_localEvent;
|
||||
|
||||
//Set init finished and run all delayed functions:
|
||||
GVAR(settingsInitFinished) = true;
|
||||
@ -350,7 +350,7 @@ GVAR(OldIsCamera) = false;
|
||||
uiNamespace setVariable ["ACE_player", _data];
|
||||
|
||||
// Raise ACE event locally
|
||||
["playerChanged", [ACE_player, _oldPlayer]] call CBA_fnc_localEvent;
|
||||
["ace_playerChanged", [ACE_player, _oldPlayer]] call CBA_fnc_localEvent;
|
||||
};
|
||||
|
||||
// "playerVehicleChanged" event
|
||||
@ -358,7 +358,7 @@ GVAR(OldIsCamera) = false;
|
||||
if !(_data isEqualTo GVAR(OldPlayerVehicle)) then {
|
||||
// Raise ACE event locally
|
||||
GVAR(OldPlayerVehicle) = _data;
|
||||
["playerVehicleChanged", [ACE_player, _data]] call CBA_fnc_localEvent;
|
||||
["ace_playerVehicleChanged", [ACE_player, _data]] call CBA_fnc_localEvent;
|
||||
};
|
||||
|
||||
// "playerTurretChanged" event
|
||||
@ -366,7 +366,7 @@ GVAR(OldIsCamera) = false;
|
||||
if !(_data isEqualTo GVAR(OldPlayerTurret)) then {
|
||||
// Raise ACE event locally
|
||||
GVAR(OldPlayerTurret) = _data;
|
||||
["playerTurretChanged", [ACE_player, _data]] call CBA_fnc_localEvent;
|
||||
["ace_playerTurretChanged", [ACE_player, _data]] call CBA_fnc_localEvent;
|
||||
};
|
||||
|
||||
// "playerWeaponChanged" event
|
||||
@ -374,7 +374,7 @@ GVAR(OldIsCamera) = false;
|
||||
if (_data != GVAR(OldPlayerWeapon)) then {
|
||||
// Raise ACE event locally
|
||||
GVAR(OldPlayerWeapon) = _data;
|
||||
["playerWeaponChanged", [ACE_player, _data]] call CBA_fnc_localEvent;
|
||||
["ace_playerWeaponChanged", [ACE_player, _data]] call CBA_fnc_localEvent;
|
||||
};
|
||||
|
||||
// "playerInventoryChanged" event
|
||||
@ -406,7 +406,7 @@ GVAR(OldIsCamera) = false;
|
||||
|
||||
if !(_data isEqualTo GVAR(OldPlayerInventoryNoAmmo)) then {
|
||||
GVAR(OldPlayerInventoryNoAmmo) = _data;
|
||||
["playerInventoryChanged", [ACE_player, [ACE_player, false] call FUNC(getAllGear)]] call CBA_fnc_localEvent;
|
||||
["ace_playerInventoryChanged", [ACE_player, [ACE_player, false] call FUNC(getAllGear)]] call CBA_fnc_localEvent;
|
||||
};
|
||||
};
|
||||
|
||||
@ -415,7 +415,7 @@ GVAR(OldIsCamera) = false;
|
||||
if !(_data isEqualTo GVAR(OldPlayerVisionMode)) then {
|
||||
// Raise ACE event locally
|
||||
GVAR(OldPlayerVisionMode) = _data;
|
||||
["playerVisionModeChanged", [ACE_player, _data]] call CBA_fnc_localEvent;
|
||||
["ace_playerVisionModeChanged", [ACE_player, _data]] call CBA_fnc_localEvent;
|
||||
};
|
||||
|
||||
// "cameraViewChanged" event
|
||||
@ -423,7 +423,7 @@ GVAR(OldIsCamera) = false;
|
||||
if !(_data isEqualTo GVAR(OldCameraView)) then {
|
||||
// Raise ACE event locally
|
||||
GVAR(OldCameraView) = _data;
|
||||
["cameraViewChanged", [ACE_player, _data]] call CBA_fnc_localEvent;
|
||||
["ace_cameraViewChanged", [ACE_player, _data]] call CBA_fnc_localEvent;
|
||||
};
|
||||
|
||||
// "visibleMapChanged" event
|
||||
@ -431,7 +431,7 @@ GVAR(OldIsCamera) = false;
|
||||
if (!_data isEqualTo GVAR(OldVisibleMap)) then {
|
||||
// Raise ACE event locally
|
||||
GVAR(OldVisibleMap) = _data;
|
||||
["visibleMapChanged", [ACE_player, _data]] call CBA_fnc_localEvent;
|
||||
["ace_visibleMapChanged", [ACE_player, _data]] call CBA_fnc_localEvent;
|
||||
};
|
||||
|
||||
// "activeCameraChanged" event
|
||||
@ -439,7 +439,7 @@ GVAR(OldIsCamera) = false;
|
||||
if !(_data isEqualTo GVAR(OldIsCamera)) then {
|
||||
// Raise ACE event locally
|
||||
GVAR(OldIsCamera) = _data;
|
||||
["activeCameraChanged", [ACE_player, _data]] call CBA_fnc_localEvent;
|
||||
["ace_activeCameraChanged", [ACE_player, _data]] call CBA_fnc_localEvent;
|
||||
};
|
||||
|
||||
END_COUNTER(stateChecker);
|
||||
@ -450,8 +450,8 @@ GVAR(OldIsCamera) = false;
|
||||
// Eventhandlers for player controlled machines
|
||||
//////////////////////////////////////////////////
|
||||
|
||||
["displayTextStructured", {_this call FUNC(displayTextStructured)}] call CBA_fnc_addEventHandler;
|
||||
["displayTextPicture", {_this call FUNC(displayTextPicture)}] call CBA_fnc_addEventHandler;
|
||||
["ace_displayTextStructured", {_this call FUNC(displayTextStructured)}] call CBA_fnc_addEventHandler;
|
||||
["ace_displayTextPicture", {_this call FUNC(displayTextPicture)}] call CBA_fnc_addEventHandler;
|
||||
|
||||
["medical_onUnconscious", {
|
||||
params ["_unit", "_isUnconscious"];
|
||||
@ -461,7 +461,7 @@ GVAR(OldIsCamera) = false;
|
||||
};
|
||||
}] call CBA_fnc_addEventHandler;
|
||||
|
||||
["useItem", DFUNC(useItem)] call CBA_fnc_addEventHandler;
|
||||
["ace_useItem", DFUNC(useItem)] call CBA_fnc_addEventHandler;
|
||||
|
||||
|
||||
//////////////////////////////////////////////////
|
||||
@ -499,7 +499,7 @@ if (didJip) then {
|
||||
// We are jipping! Get ready and wait, and throw the event
|
||||
[{
|
||||
if(!isNull player && GVAR(settingsInitFinished)) then {
|
||||
["PlayerJip", [player]] call CBA_fnc_localEvent;
|
||||
["ace_playerJip", [player]] call CBA_fnc_localEvent;
|
||||
[_this select 1] call CBA_fnc_removePerFrameHandler;
|
||||
};
|
||||
}, 0, []] call CBA_fnc_addPerFrameHandler;
|
||||
|
@ -14,6 +14,81 @@ class CfgPatches {
|
||||
|
||||
// This class will be deprecated in version 3.8.0
|
||||
class ACE_newEvents {
|
||||
forceWalk = "ace_forceWalk";
|
||||
PlayerJip = "ace_playerJip";
|
||||
useItem = "ace_useItem";
|
||||
displayTextPicture = "ace_displayTextPicture";
|
||||
displayTextStructured = "ace_displayTextStructured";
|
||||
activeCameraChanged = "ace_activeCameraChanged";
|
||||
visibleMapChanged = "ace_visibleMapChanged";
|
||||
cameraViewChanged = "ace_cameraViewChanged";
|
||||
playerVisionModeChanged = "ace_playerVisionModeChanged";
|
||||
playerInventoryChanged = "ace_playerInventoryChanged";
|
||||
playerWeaponChanged = "ace_playerWeaponChanged";
|
||||
playerTurretChanged = "ace_playerTurretChanged";
|
||||
playerVehicleChanged = "ace_playerVehicleChanged";
|
||||
playerChanged = "ace_playerChanged";
|
||||
SettingsInitialized = "ace_settingsInitialized";
|
||||
InitSettingsFromModules = "ace_initSettingsFromModules";
|
||||
SEH_s = "ace_sEH_s";
|
||||
SEH = "ace_sEH";
|
||||
SEH_all = "ace_sEH_all";
|
||||
SEH_all = "ace_sEH_all";
|
||||
enableSimulationGlobal = "ace_enableSimulationGlobal";
|
||||
hideObjectGlobal = "ace_hideObjectGlobal";
|
||||
setVanillaHitPointDamage = "ace_setVanillaHitPointDamage";
|
||||
setVectorDirAndUp = "ace_setVectorDirAndUp";
|
||||
switchMove = "ace_switchMove";
|
||||
playMoveNow = "ace_playMoveNow";
|
||||
playMove = "ace_playMove";
|
||||
setVelocity = "ace_setVelocity";
|
||||
selectLeader = "ace_selectLeader";
|
||||
setSpeaker = "ace_setSpeaker";
|
||||
engineOn = "ace_engineOn";
|
||||
setFuel = "ace_setFuel";
|
||||
setDir = "ace_setDir";
|
||||
unloadPersonEvent = "ace_unloadPersonEvent";
|
||||
loadPersonEvent = "ace_loadPersonEvent";
|
||||
fixPosition = "ace_fixPosition";
|
||||
fixFloating = "ace_fixFloating";
|
||||
fixCollision = "ace_fixCollision";
|
||||
setStatusEffect = "ace_setStatusEffect";
|
||||
SEH_s = "ace_sEH_s";
|
||||
SEH_s = "ace_sEH_s";
|
||||
setSpeaker = "ace_setSpeaker";
|
||||
displayTextStructured = "ace_displayTextStructured";
|
||||
unloadPersonEvent = "ace_unloadPersonEvent";
|
||||
hideObjectGlobal = "ace_hideObjectGlobal";
|
||||
SEH = "ace_sEH";
|
||||
SettingChanged = "ace_settingChanged";
|
||||
SettingChanged = "ace_settingChanged";
|
||||
SEH_s = "ace_sEH_s";
|
||||
setSpeaker = "ace_setSpeaker";
|
||||
setSpeaker = "ace_setSpeaker";
|
||||
setSpeaker = "ace_setSpeaker";
|
||||
loadPersonEvent = "ace_loadPersonEvent";
|
||||
hideObjectGlobal = "ace_hideObjectGlobal";
|
||||
HeadbugFixUsed = "ace_headbugFixUsed";
|
||||
HeadbugFixUsed = "ace_headbugFixUsed";
|
||||
blockDamage = "ace_blockDamage";
|
||||
blockDamage = "ace_blockDamage";
|
||||
firedNonPlayerVehicle = "ace_firedNonPlayerVehicle";
|
||||
firedPlayerVehicleNonLocal = "ace_firedPlayerVehicleNonLocal";
|
||||
firedPlayerVehicle = "ace_firedPlayerVehicle";
|
||||
firedNonPlayer = "ace_firedNonPlayer";
|
||||
firedPlayerNonLocal = "ace_firedPlayerNonLocal";
|
||||
firedPlayer = "ace_firedPlayer";
|
||||
switchMove = "ace_switchMove";
|
||||
playMoveNow = "ace_playMoveNow";
|
||||
playMoveNow = "ace_playMoveNow";
|
||||
playMoveNow = "ace_playMoveNow";
|
||||
playMoveNow = "ace_playMoveNow";
|
||||
playMove = "ace_playMove";
|
||||
playMove = "ace_playMove";
|
||||
unlockVehicle = "ace_unlockVehicle";
|
||||
lockVehicle = "ace_lockVehicle";
|
||||
playerInventoryChanged = "ace_playerInventoryChanged";
|
||||
SettingChanged = "ace_settingChanged";
|
||||
playMoveNow = QGVAR(playMoveNow);
|
||||
};
|
||||
|
||||
|
@ -18,7 +18,7 @@ params ["_client"];
|
||||
private _eventEntry = HASH_GET(GVAR(syncedEvents),_x);
|
||||
_eventEntry params ["", "_eventLog"];
|
||||
|
||||
["SEH_s", [_x, _eventLog], _client] call CBA_fnc_targetEvent;
|
||||
["ace_sEH_s", [_x, _eventLog], _client] call CBA_fnc_targetEvent;
|
||||
false
|
||||
} count (GVAR(syncedEvents) select 0);
|
||||
|
||||
|
@ -30,7 +30,7 @@ if (isServer) then {
|
||||
private _eventEntry = HASH_GET(GVAR(syncedEvents),_eventName);
|
||||
_eventEntry params ["", "_eventLog"];
|
||||
|
||||
["SEH_s", [_eventName, _eventLog], _client] call CBA_fnc_targetEvent;
|
||||
["ace_sEH_s", [_eventName, _eventLog], _client] call CBA_fnc_targetEvent;
|
||||
} else {
|
||||
params ["_eventName", "_eventLog"];
|
||||
|
||||
|
@ -37,4 +37,4 @@ missionNamespace setVariable [_name, _value];
|
||||
GVAR(settings) pushBack _this;
|
||||
|
||||
// Raise event locally
|
||||
["SettingChanged", [_name, _value]] call CBA_fnc_localEvent;
|
||||
["ace_settingChanged", [_name, _value]] call CBA_fnc_localEvent;
|
||||
|
@ -28,7 +28,7 @@ GVAR(AssignedItemsShownItems) = [
|
||||
ACE_isGPSEnabled
|
||||
];
|
||||
|
||||
["playerInventoryChanged", {
|
||||
["ace_playerInventoryChanged", {
|
||||
params ["_unit"];
|
||||
|
||||
private _assignedItems = getUnitLoadout _unit param [9, ["","","","","",""]]; // ["ItemMap","ItemGPS","ItemRadio","ItemCompass","ItemWatch","NVGoggles"]
|
||||
|
@ -28,9 +28,9 @@ _target setVariable [QGVAR(owner), _unit, true];
|
||||
// lock target object
|
||||
if (_lockTarget) then {
|
||||
if (!isNull _unit) then {
|
||||
["lockVehicle", _target, _target] call CBA_fnc_targetEvent;
|
||||
["ace_lockVehicle", _target, _target] call CBA_fnc_targetEvent;
|
||||
} else {
|
||||
["unlockVehicle", _target, _target] call CBA_fnc_targetEvent;
|
||||
["ace_unlockVehicle", _target, _target] call CBA_fnc_targetEvent;
|
||||
};
|
||||
};
|
||||
|
||||
|
@ -41,34 +41,34 @@ TRACE_2("",local _unit,vehicle _unit);
|
||||
switch (_priority) do {
|
||||
case 0: {
|
||||
if (_unit == vehicle _unit) then {
|
||||
["playMove", [_unit, _animation], _unit] call CBA_fnc_targetEvent;
|
||||
["ace_playMove", [_unit, _animation], _unit] call CBA_fnc_targetEvent;
|
||||
} else {
|
||||
// Execute on all machines. PlayMove and PlayMoveNow are bugged: They have no global effects when executed on remote machines inside vehicles.
|
||||
["playMove", [_unit, _animation]] call CBA_fnc_globalEvent;
|
||||
["ace_playMove", [_unit, _animation]] call CBA_fnc_globalEvent;
|
||||
};
|
||||
};
|
||||
case 1: {
|
||||
if (_unit == vehicle _unit) then {
|
||||
["playMoveNow", [_unit, _animation], _unit] call CBA_fnc_targetEvent;
|
||||
["ace_playMoveNow", [_unit, _animation], _unit] call CBA_fnc_targetEvent;
|
||||
} else {
|
||||
// Execute on all machines. PlayMove and PlayMoveNow are bugged: They have no global effects when executed on remote machines inside vehicles.
|
||||
["playMoveNow", [_unit, _animation]] call CBA_fnc_globalEvent;
|
||||
["ace_playMoveNow", [_unit, _animation]] call CBA_fnc_globalEvent;
|
||||
};
|
||||
};
|
||||
case 2: {
|
||||
// try playMoveNow first
|
||||
if (_unit == vehicle _unit) then {
|
||||
["playMoveNow", [_unit, _animation], _unit] call CBA_fnc_targetEvent;
|
||||
["ace_playMoveNow", [_unit, _animation], _unit] call CBA_fnc_targetEvent;
|
||||
} else {
|
||||
// Execute on all machines. PlayMove and PlayMoveNow are bugged: They have no global effects when executed on remote machines inside vehicles.
|
||||
["playMoveNow", [_unit, _animation]] call CBA_fnc_globalEvent;
|
||||
["ace_playMoveNow", [_unit, _animation]] call CBA_fnc_globalEvent;
|
||||
};
|
||||
|
||||
// if animation doesn't respond, do switchMove
|
||||
if (animationState _unit != _animation) then {
|
||||
TRACE_1("did not respond to playMoveNow",animationState _unit);
|
||||
// Execute on all machines. SwitchMove has local effects.
|
||||
["switchMove", [_unit, _animation]] call CBA_fnc_globalEvent;
|
||||
["ace_switchMove", [_unit, _animation]] call CBA_fnc_globalEvent;
|
||||
};
|
||||
};
|
||||
default {};
|
||||
|
@ -26,12 +26,12 @@ TRACE_7("firedEH:",_unit, _weapon, _muzzle, _mode, _ammo, _magazine, _projectile
|
||||
if (_unit isKindOf "CAManBase") then {
|
||||
// The unit it on foot
|
||||
if (_unit == ACE_player) then {
|
||||
["firedPlayer", _this] call CBA_fnc_localEvent;
|
||||
["ace_firedPlayer", _this] call CBA_fnc_localEvent;
|
||||
} else {
|
||||
if ([_unit] call EFUNC(common,isPlayer)) then {
|
||||
["firedPlayerNonLocal", _this] call CBA_fnc_localEvent;
|
||||
["ace_firedPlayerNonLocal", _this] call CBA_fnc_localEvent;
|
||||
} else {
|
||||
["firedNonPlayer", _this] call CBA_fnc_localEvent;
|
||||
["ace_firedNonPlayer", _this] call CBA_fnc_localEvent;
|
||||
};
|
||||
};
|
||||
} else {
|
||||
@ -55,12 +55,12 @@ if (_unit isKindOf "CAManBase") then {
|
||||
};
|
||||
|
||||
if (_gunner == ACE_player) then {
|
||||
["firedPlayerVehicle", _this] call CBA_fnc_localEvent;
|
||||
["ace_firedPlayerVehicle", _this] call CBA_fnc_localEvent;
|
||||
} else {
|
||||
if ([_gunner] call EFUNC(common,isPlayer)) then {
|
||||
["firedPlayerVehicleNonLocal", _this] call CBA_fnc_localEvent;
|
||||
["ace_firedPlayerVehicleNonLocal", _this] call CBA_fnc_localEvent;
|
||||
} else {
|
||||
["firedNonPlayerVehicle", _this] call CBA_fnc_localEvent;
|
||||
["ace_firedNonPlayerVehicle", _this] call CBA_fnc_localEvent;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
@ -21,7 +21,7 @@ if (!local _object) exitWith {};
|
||||
if (_object isKindOf "CAManBase") exitWith {};
|
||||
|
||||
//We need to manually set allowDamage to true for setHitIndex to function
|
||||
["blockDamage", [_object, 0]] call CBA_fnc_localEvent;
|
||||
["ace_blockDamage", [_object, 0]] call CBA_fnc_localEvent;
|
||||
|
||||
// save and restore hitpoints, see below why
|
||||
private _hitPointDamages = getAllHitPointsDamage _object;
|
||||
@ -41,4 +41,4 @@ _object setDamage damage _object;
|
||||
//manually re-enable allowDamage to previous setting (ref statusEffect_funcs)
|
||||
private _effectVarName = format [QGVAR(effect_%1), "blockDamage"];
|
||||
private _effectNumber = _object getVariable [_effectVarName, 0];
|
||||
["blockDamage", [_object, _effectNumber]] call CBA_fnc_localEvent;
|
||||
["ace_blockDamage", [_object, _effectNumber]] call CBA_fnc_localEvent;
|
||||
|
@ -17,8 +17,8 @@
|
||||
private _unit = ACE_player;
|
||||
private _anim = animationState _unit;
|
||||
|
||||
["HeadbugFixUsed", [profileName, _anim]] call CBA_fnc_serverEvent;
|
||||
["HeadbugFixUsed", [profileName, _anim]] call CBA_fnc_localEvent;
|
||||
["ace_headbugFixUsed", [profileName, _anim]] call CBA_fnc_serverEvent;
|
||||
["ace_headbugFixUsed", [profileName, _anim]] call CBA_fnc_localEvent;
|
||||
|
||||
if (_unit != vehicle _unit || {!([_unit, objNull, ["isNotSitting"]] call FUNC(canInteractWith))}) exitWith {false};
|
||||
|
||||
|
@ -28,5 +28,5 @@ if !(_reason in _setHiddenReasons) then {
|
||||
};
|
||||
|
||||
if !(isObjectHidden _unit) then {
|
||||
["hideObjectGlobal", [_unit, true]] call CBA_fnc_serverEvent;
|
||||
["ace_hideObjectGlobal", [_unit, true]] call CBA_fnc_serverEvent;
|
||||
};
|
||||
|
@ -32,7 +32,7 @@ private _nearVehicles = nearestObjects [_unit, ["Car", "Air", "Tank", "Ship_F"],
|
||||
|
||||
if (!isNull _vehicle) then {
|
||||
[_unit, true, GROUP_SWITCH_ID, side group _caller] call FUNC(switchToGroupSide);
|
||||
["loadPersonEvent", [_unit, _vehicle, _caller], _unit] call CBA_fnc_targetEvent;
|
||||
["ace_loadPersonEvent", [_unit, _vehicle, _caller], _unit] call CBA_fnc_targetEvent;
|
||||
};
|
||||
|
||||
_vehicle
|
||||
|
@ -29,6 +29,6 @@ private _speaker = speaker _unit;
|
||||
|
||||
if (_speaker == "ACE_NoVoice") exitWith {};
|
||||
|
||||
["setSpeaker", [_unit, "ACE_NoVoice"]] call CBA_fnc_globalEvent;
|
||||
["ace_setSpeaker", [_unit, "ACE_NoVoice"]] call CBA_fnc_globalEvent;
|
||||
|
||||
_unit setVariable ["ACE_OriginalSpeaker", _speaker, true];
|
||||
|
@ -16,5 +16,5 @@ params ["_unit"];
|
||||
|
||||
// setSpeaker gets overwritten after init on remote units; if unit is muted, setSpeaker again
|
||||
if (count (_unit getVariable [QGVAR(muteUnitReasons), []]) > 0) then {
|
||||
["setSpeaker", [_unit, "ACE_NoVoice"]] call CBA_fnc_localEvent;
|
||||
["ace_setSpeaker", [_unit, "ACE_NoVoice"]] call CBA_fnc_localEvent;
|
||||
};
|
||||
|
@ -18,4 +18,4 @@ params ["_unit"];
|
||||
_unit setVariable [QGVAR(muteUnitReasons), _unit getVariable [QGVAR(muteUnitReasons), []], true];
|
||||
|
||||
// fix mp issues with respawning and the speaker
|
||||
["setSpeaker", [_unit, speaker _unit]] call CBA_fnc_globalEvent;
|
||||
["ace_setSpeaker", [_unit, speaker _unit]] call CBA_fnc_globalEvent;
|
||||
|
@ -17,4 +17,4 @@ params ["_eventName"];
|
||||
// Only JIP machines on initialization send this off, requesting sync on events with the serverCommand
|
||||
if (isServer) exitWith {false};
|
||||
|
||||
["SEH_s", [_eventName, ACE_player] ] call CBA_fnc_serverEvent;
|
||||
["ace_sEH_s", [_eventName, ACE_player]] call CBA_fnc_serverEvent;
|
||||
|
@ -78,8 +78,8 @@ if (isServer && {_broadcastChanges}) then {
|
||||
publicVariable _name;
|
||||
|
||||
// Raise event globally, this publicizes eventual changes in _force status so clients can update it locally
|
||||
["SettingChanged", [_name, _value, _force]] call CBA_fnc_globalEvent;
|
||||
["ace_settingChanged", [_name, _value, _force]] call CBA_fnc_globalEvent;
|
||||
} else {
|
||||
// Raise event locally
|
||||
["SettingChanged", [_name, _value, _force]] call CBA_fnc_localEvent;
|
||||
["ace_settingChanged", [_name, _value, _force]] call CBA_fnc_localEvent;
|
||||
};
|
||||
|
@ -23,4 +23,4 @@ if (!HASH_HASKEY(GVAR(syncedEvents),_name)) exitWith {
|
||||
|
||||
private _eventData = [_name, _args, _ttl];
|
||||
|
||||
["SEH", _eventData] call CBA_fnc_globalEvent;
|
||||
["ace_sEH", _eventData] call CBA_fnc_globalEvent;
|
||||
|
@ -28,5 +28,5 @@ if (_reason in _setHiddenReasons) then {
|
||||
};
|
||||
|
||||
if (_setHiddenReasons isEqualTo []) then {
|
||||
["hideObjectGlobal",[_unit,false]] call CBA_fnc_serverEvent;
|
||||
["ace_hideObjectGlobal", [_unit,false]] call CBA_fnc_serverEvent;
|
||||
};
|
||||
|
@ -26,7 +26,7 @@ if (_vehicle == _unit) exitWith {false};
|
||||
if (speed _vehicle > 1 || {((getPos _vehicle) select 2) > 2}) exitWith {false};
|
||||
|
||||
if (!isNull _vehicle) then {
|
||||
["unloadPersonEvent", [_unit, _vehicle], [_unit]] call CBA_fnc_targetEvent;
|
||||
["ace_unloadPersonEvent", [_unit, _vehicle], [_unit]] call CBA_fnc_targetEvent;
|
||||
};
|
||||
|
||||
true
|
||||
|
@ -27,7 +27,7 @@ if (count _emptyPos != 3) exitwith {
|
||||
ACE_LOGWARNING_4("Could not find unload pos %1-ASL: %2 isTouchingGround: %3 Speed: %4",_vehicle, getPosASL _vehicle, isTouchingGround _vehicle, speed _vehicle);
|
||||
if ((!isNull _unloader) && {[_unloader] call FUNC(isPlayer)}) then {
|
||||
//display text saying there are no safe places to exit the vehicle
|
||||
["displayTextStructured", [localize LSTRING(NoRoomToUnload)], [_unloader]] call CBA_fnc_targetEvent;
|
||||
["ace_displayTextStructured", [localize LSTRING(NoRoomToUnload)], [_unloader]] call CBA_fnc_targetEvent;
|
||||
};
|
||||
false
|
||||
};
|
||||
|
@ -32,4 +32,4 @@ private _speaker = _unit getVariable ["ACE_OriginalSpeaker", ""];
|
||||
|
||||
if (_speaker == "") exitWith {};
|
||||
|
||||
["setSpeaker", [_unit, _speaker], _unit] call CBA_fnc_targetEvent;
|
||||
["ace_setSpeaker", [_unit, _speaker], _unit] call CBA_fnc_targetEvent;
|
||||
|
@ -4,7 +4,7 @@ GVAR(placer) = objNull;
|
||||
GVAR(deployPFH) = -1;
|
||||
|
||||
// Deploy concertina wire if interact menu is opened
|
||||
["interactMenuOpened", {
|
||||
["ace_interactMenuOpened", {
|
||||
if (GVAR(deployPFH) != -1) then {
|
||||
GVAR(placer) setVariable [QGVAR(wireDeployed), true];
|
||||
};
|
||||
|
@ -13,3 +13,6 @@ class CfgPatches {
|
||||
|
||||
#include "CfgEventHandlers.hpp"
|
||||
#include "CfgVehicles.hpp"
|
||||
class ACE_newEvents {
|
||||
interactMenuOpened = "ace_interactMenuOpened";
|
||||
};
|
@ -30,4 +30,4 @@ GVAR(vectorConnected) = false;
|
||||
GVAR(noVectorData) = true;
|
||||
GVAR(vectorGrid) = "00000000";
|
||||
|
||||
["RangerfinderData", FUNC(handleRangeFinderData)] call CBA_fnc_addEventHandler;
|
||||
["ace_rangerfinderData", FUNC(handleRangeFinderData)] call CBA_fnc_addEventHandler;
|
||||
|
@ -16,3 +16,7 @@ class CfgPatches {
|
||||
#include "CfgWeapons.hpp"
|
||||
#include "Dialog.hpp"
|
||||
#include "RscTitles.hpp"
|
||||
|
||||
class ACE_newEvents {
|
||||
RangerfinderData = "ace_rangerfinderData";
|
||||
};
|
@ -1,4 +1,4 @@
|
||||
#include "script_component.hpp"
|
||||
|
||||
["DisarmDropItems", FUNC(eventTargetStart)] call CBA_fnc_addEventHandler;
|
||||
["DisarmDebugCallback", FUNC(eventCallerFinish)] call CBA_fnc_addEventHandler;
|
||||
["ace_disarmDropItems", FUNC(eventTargetStart)] call CBA_fnc_addEventHandler;
|
||||
["ace_disarmDebugCallback", FUNC(eventCallerFinish)] call CBA_fnc_addEventHandler;
|
||||
|
@ -17,3 +17,10 @@ class CfgPatches {
|
||||
#include "CfgWeapons.hpp"
|
||||
|
||||
#include "gui_disarm.hpp"
|
||||
|
||||
class ACE_newEvents {
|
||||
DisarmDebugCallback = "ace_disarmDebugCallback";
|
||||
DisarmDropItems = "ace_disarmDropItems";
|
||||
DisarmDropItems = "ace_disarmDropItems";
|
||||
DisarmDebugCallback = "ace_disarmDebugCallback";
|
||||
};
|
@ -23,5 +23,5 @@ params ["_caller", "_target", "_errorMsg"];
|
||||
|
||||
if (_errorMsg != "") then {
|
||||
ACE_LOGINFO_2("%1 - eventTargetFinish: %2",ACE_time,_this);
|
||||
["DisarmDebugCallback", [_caller, _target, _errorMsg], [_caller]] call CBA_fnc_targetEvent;
|
||||
["ace_disarmDebugCallback", [_caller, _target, _errorMsg], [_caller]] call CBA_fnc_targetEvent;
|
||||
};
|
||||
|
@ -42,7 +42,7 @@ GVAR(disarmTarget) = _target;
|
||||
if (isNull GVAR(disarmTarget)) exitWith {ERROR("disarmTarget is null");};
|
||||
|
||||
TRACE_2("Debug: Droping %1 from %2",_data,GVAR(disarmTarget));
|
||||
["DisarmDropItems", [ACE_player, GVAR(disarmTarget), [_data]], [GVAR(disarmTarget)]] call CBA_fnc_targetEvent;
|
||||
["ace_disarmDropItems", [ACE_player, GVAR(disarmTarget), [_data]], [GVAR(disarmTarget)]] call CBA_fnc_targetEvent;
|
||||
|
||||
false //not sure what this does
|
||||
}];
|
||||
|
@ -3,7 +3,7 @@
|
||||
|
||||
if (!hasInterface) exitWith {};
|
||||
|
||||
["playerInventoryChanged", {
|
||||
["ace_playerInventoryChanged", {
|
||||
params ["_unit"];
|
||||
[_unit] call FUNC(takeLoadedATWeapon);
|
||||
[_unit] call FUNC(updateInventoryDisplay);
|
||||
@ -11,5 +11,5 @@ if (!hasInterface) exitWith {};
|
||||
|
||||
// Register fire event handler
|
||||
// Only for the local player and for AI. Non-local players will handle it themselves
|
||||
["firedPlayer", DFUNC(replaceATWeapon)] call CBA_fnc_addEventHandler;
|
||||
["firedNonPlayer", DFUNC(replaceATWeapon)] call CBA_fnc_addEventHandler;
|
||||
["ace_firedPlayer", DFUNC(replaceATWeapon)] call CBA_fnc_addEventHandler;
|
||||
["ace_firedNonPlayer", DFUNC(replaceATWeapon)] call CBA_fnc_addEventHandler;
|
||||
|
@ -16,3 +16,9 @@ class CfgPatches {
|
||||
#include "CfgWeapons.hpp"
|
||||
#include "CfgMagazines.hpp"
|
||||
#include "CfgVehicles.hpp"
|
||||
|
||||
class ACE_newEvents {
|
||||
playerInventoryChanged = "ace_playerInventoryChanged";
|
||||
firedNonPlayer = "ace_firedNonPlayer";
|
||||
firedPlayer = "ace_firedPlayer";
|
||||
};
|
@ -20,11 +20,11 @@ if (isNil "ACE_maxWeightCarry") then {
|
||||
["isNotCarrying", {!((_this select 0) getVariable [QGVAR(isCarrying), false])}] call EFUNC(common,addCanInteractWithCondition);
|
||||
|
||||
// release object on player change. This does work when returning to lobby, but not when hard disconnecting.
|
||||
["playerChanged", {_this call FUNC(handlePlayerChanged)}] call CBA_fnc_addEventHandler;
|
||||
["playerVehicleChanged", {[ACE_player, objNull] call FUNC(handlePlayerChanged)}] call CBA_fnc_addEventHandler;
|
||||
["playerWeaponChanged", {_this call FUNC(handlePlayerWeaponChanged)}] call CBA_fnc_addEventHandler;
|
||||
["ace_playerChanged", {_this call FUNC(handlePlayerChanged)}] call CBA_fnc_addEventHandler;
|
||||
["ace_playerVehicleChanged", {[ACE_player, objNull] call FUNC(handlePlayerChanged)}] call CBA_fnc_addEventHandler;
|
||||
["ace_playerWeaponChanged", {_this call FUNC(handlePlayerWeaponChanged)}] call CBA_fnc_addEventHandler;
|
||||
|
||||
// handle waking up dragged unit and falling unconscious while dragging
|
||||
["medical_onUnconscious", {_this call FUNC(handleUnconscious)}] call CBA_fnc_addEventHandler;
|
||||
["ace_medical_onUnconscious", {_this call FUNC(handleUnconscious)}] call CBA_fnc_addEventHandler;
|
||||
|
||||
//@todo Captivity?
|
||||
|
@ -15,3 +15,21 @@ class CfgPatches {
|
||||
#include "CfgEventHandlers.hpp"
|
||||
#include "CfgVehicles.hpp"
|
||||
#include "CfgMovesBasic.hpp"
|
||||
|
||||
class ACE_newEvents {
|
||||
medical_onUnconscious = "ace_medical_onUnconscious";
|
||||
playerWeaponChanged = "ace_playerWeaponChanged";
|
||||
playerVehicleChanged = "ace_playerVehicleChanged";
|
||||
playerChanged = "ace_playerChanged";
|
||||
setDir = "ace_setDir";
|
||||
fixFloating = "ace_fixFloating";
|
||||
fixPosition = "ace_fixPosition";
|
||||
fixCollision = "ace_fixCollision";
|
||||
fixCollision = "ace_fixCollision";
|
||||
fixFloating = "ace_fixFloating";
|
||||
fixPosition = "ace_fixPosition";
|
||||
fixCollision = "ace_fixCollision";
|
||||
fixCollision = "ace_fixCollision";
|
||||
setDir = "ace_setDir";
|
||||
setDir = "ace_setDir";
|
||||
};
|
@ -44,7 +44,7 @@ if (_target isKindOf "CAManBase") then {
|
||||
_target attachTo [_unit, _position];
|
||||
|
||||
};
|
||||
["setDir", [_target, _direction], _target] call CBA_fnc_targetEvent;
|
||||
["ace_setDir", [_target, _direction], _target] call CBA_fnc_targetEvent;
|
||||
|
||||
_unit setVariable [QGVAR(isCarrying), true, true];
|
||||
_unit setVariable [QGVAR(carriedObject), _target, true];
|
||||
|
@ -33,7 +33,7 @@ _position = _position vectorAdd [0, 0, _offset];
|
||||
// attach object
|
||||
TRACE_3("attaching",_position,_offset,_direction);
|
||||
_target attachTo [_unit, _position];
|
||||
["setDir", [_target, _direction], _target] call CBA_fnc_targetEvent;
|
||||
["ace_setDir", [_target, _direction], _target] call CBA_fnc_targetEvent;
|
||||
|
||||
if (_target isKindOf "CAManBase") then {
|
||||
[_target, "AinjPpneMrunSnonWnonDb_still", 0, true] call EFUNC(common,doAnimation);
|
||||
|
@ -30,8 +30,8 @@ if !(_unit getVariable ["ACE_isUnconscious", false]) then {
|
||||
};
|
||||
|
||||
// prevent collision damage
|
||||
["fixCollision", _unit] call CBA_fnc_localEvent;
|
||||
["fixCollision", _target, _target] call CBA_fnc_targetEvent;
|
||||
["ace_fixCollision", _unit] call CBA_fnc_localEvent;
|
||||
["ace_fixCollision", _target, _target] call CBA_fnc_targetEvent;
|
||||
|
||||
// release object
|
||||
detach _target;
|
||||
@ -62,8 +62,8 @@ _unit setVariable [QGVAR(draggedObject), objNull, true];
|
||||
[objNull, _target, true] call EFUNC(common,claim);
|
||||
|
||||
if !(_target isKindOf "CAManBase") then {
|
||||
["fixPosition", _target, _target] call CBA_fnc_targetEvent;
|
||||
["fixFloating", _target, _target] call CBA_fnc_targetEvent;
|
||||
["ace_fixPosition", _target, _target] call CBA_fnc_targetEvent;
|
||||
["ace_fixFloating", _target, _target] call CBA_fnc_targetEvent;
|
||||
};
|
||||
|
||||
if (_unit getVariable ["ACE_isUnconscious", false]) then {
|
||||
|
@ -25,8 +25,8 @@ TRACE_2("params",_unit,_target);
|
||||
private _inBuilding = [_unit] call FUNC(isObjectOnObject);
|
||||
|
||||
// prevent collision damage
|
||||
["fixCollision", _unit] call CBA_fnc_localEvent;
|
||||
["fixCollision", _target, _target] call CBA_fnc_targetEvent;
|
||||
["ace_fixCollision", _unit] call CBA_fnc_localEvent;
|
||||
["ace_fixCollision", _target, _target] call CBA_fnc_targetEvent;
|
||||
|
||||
// release object
|
||||
detach _target;
|
||||
@ -67,8 +67,8 @@ _unit setVariable [QGVAR(carriedObject), objNull, true];
|
||||
[objNull, _target, true] call EFUNC(common,claim);
|
||||
|
||||
if !(_target isKindOf "CAManBase") then {
|
||||
["fixPosition", _target, _target] call CBA_fnc_targetEvent;
|
||||
["fixFloating", _target, _target] call CBA_fnc_targetEvent;
|
||||
["ace_fixPosition", _target, _target] call CBA_fnc_targetEvent;
|
||||
["ace_fixFloating", _target, _target] call CBA_fnc_targetEvent;
|
||||
};
|
||||
|
||||
// recreate UAV crew
|
||||
|
@ -42,6 +42,6 @@ _carriedItem attachTo [_unit];
|
||||
|
||||
//reset the carry direction
|
||||
private _direction = _carriedItem getVariable [QGVAR(carryDirection), 0];
|
||||
["setDir", [_carriedItem, _direction], _carriedItem] call CBA_fnc_targetEvent;
|
||||
["ace_setDir", [_carriedItem, _direction], _carriedItem] call CBA_fnc_targetEvent;
|
||||
|
||||
true
|
||||
|
@ -21,7 +21,7 @@
|
||||
//When getting knocked out in medical, trigger deadman explosives:
|
||||
//Event is global, only run on server (ref: ace_medical_fnc_setUnconscious)
|
||||
if (isServer) then {
|
||||
["medical_onUnconscious", {
|
||||
["ace_medical_onUnconscious", {
|
||||
params ["_unit", "_isUnconscious"];
|
||||
if (!_isUnconscious) exitWith {};
|
||||
TRACE_1("Knocked Out, Doing Deadman", _unit);
|
||||
@ -37,7 +37,7 @@ if (isServer) then {
|
||||
(!isNull _explosive && {alive _explosive})
|
||||
};
|
||||
TRACE_1("serverSendsOrientations sent:",GVAR(explosivesOrientations));
|
||||
["serverSendsOrientations", [GVAR(explosivesOrientations)], _logic] call CBA_fnc_targetEvent;
|
||||
["ace_serverSendsOrientations", [GVAR(explosivesOrientations)], _logic] call CBA_fnc_targetEvent;
|
||||
}] call CBA_fnc_addEventHandler;
|
||||
};
|
||||
|
||||
@ -66,7 +66,7 @@ if (didJIP) then {
|
||||
// Create a logic to get the client ID
|
||||
GVAR(localLogic) = ([sideLogic] call CBA_fnc_getSharedGroup) createUnit ["Logic", [0,0,0], [], 0, "NONE"];
|
||||
TRACE_1("clientRequestsOrientations sent:",GVAR(localLogic));
|
||||
["clientRequestsOrientations", [GVAR(localLogic)]] call CBA_fnc_serverEvent;
|
||||
["ace_clientRequestsOrientations", [GVAR(localLogic)]] call CBA_fnc_serverEvent;
|
||||
};
|
||||
|
||||
["interactMenuOpened", {
|
||||
|
@ -42,3 +42,9 @@ class CfgMineTriggers {
|
||||
mineTriggerRange = 1;
|
||||
};
|
||||
};
|
||||
|
||||
class ACE_newEvents {
|
||||
medical_onUnconscious = "ace_medical_onUnconscious";
|
||||
clientRequestsOrientations = "ace_clientRequestsOrientations";
|
||||
serverSendsOrientations = "ace_serverSendsOrientations";
|
||||
};
|
@ -8,7 +8,7 @@ if (!hasInterface) exitWith {};
|
||||
|
||||
#include "initKeybinds.sqf"
|
||||
|
||||
["infoDisplayChanged", {
|
||||
["ace_infoDisplayChanged", {
|
||||
if (!isNull ((_this select 0) displayCtrl 1713151)) then {
|
||||
uiNamespace setVariable ["ACE_dlgRangefinder", _this select 0];
|
||||
((_this select 0) displayCtrl 151) ctrlSetTextColor [0,0,0,0];
|
||||
@ -16,8 +16,8 @@ if (!hasInterface) exitWith {};
|
||||
}] call CBA_fnc_addEventHandler;
|
||||
|
||||
// Register fire event handler
|
||||
["firedPlayerVehicle", DFUNC(firedEH)] call CBA_fnc_addEventHandler;
|
||||
["firedPlayerVehicleNonLocal", DFUNC(firedEH)] call CBA_fnc_addEventHandler;
|
||||
["ace_firedPlayerVehicle", DFUNC(firedEH)] call CBA_fnc_addEventHandler;
|
||||
["ace_firedPlayerVehicleNonLocal", DFUNC(firedEH)] call CBA_fnc_addEventHandler;
|
||||
|
||||
// Register event for global updates
|
||||
[QGVAR(forceUpdate), {[ACE_player] call FUNC(onForceUpdate)}] call CBA_fnc_addEventHandler;
|
||||
|
@ -24,3 +24,9 @@ class CfgPatches {
|
||||
class ACE_Extensions {
|
||||
extensions[] += {"ace_fcs"};
|
||||
};
|
||||
|
||||
class ACE_newEvents {
|
||||
infoDisplayChanged = "ace_infoDisplayChanged";
|
||||
firedPlayerVehicleNonLocal = "ace_firedPlayerVehicleNonLocal";
|
||||
firedPlayerVehicle = "ace_firedPlayerVehicle";
|
||||
};
|
@ -6,7 +6,7 @@ GVAR(lastFPTime) = -1;
|
||||
GVAR(fingersHash) = HASH_CREATE;
|
||||
GVAR(pfeh_id) = -1;
|
||||
|
||||
["SettingsInitialized", {
|
||||
["ace_settingsInitialized", {
|
||||
//If not enabled, dont't bother adding keybind or eventhandler
|
||||
if (!GVAR(enabled)) exitWith {};
|
||||
|
||||
|
@ -16,3 +16,7 @@ class CfgPatches {
|
||||
#include "ACE_Settings.hpp"
|
||||
#include "CfgEventHandlers.hpp"
|
||||
#include "CfgVehicles.hpp"
|
||||
|
||||
class ACE_newEvents {
|
||||
SettingsInitialized = "ace_settingsInitialized";
|
||||
};
|
@ -9,17 +9,17 @@ if(isServer) then {
|
||||
[QGVAR(frag_eh), { _this call FUNC(frago); }] call CBA_fnc_addEventHandler;
|
||||
};
|
||||
|
||||
["SettingsInitialized", {
|
||||
["ace_settingsInitialized", {
|
||||
//If not enabled, exit
|
||||
if (!GVAR(enabled)) exitWith {};
|
||||
|
||||
// Register fire event handler
|
||||
["firedPlayer", DFUNC(fired)] call CBA_fnc_addEventHandler;
|
||||
["firedPlayerNonLocal", DFUNC(fired)] call CBA_fnc_addEventHandler;
|
||||
["firedNonPlayer", DFUNC(fired)] call CBA_fnc_addEventHandler;
|
||||
["firedPlayerVehicle", DFUNC(fired)] call CBA_fnc_addEventHandler;
|
||||
["firedPlayerVehicleNonLocal", DFUNC(fired)] call CBA_fnc_addEventHandler;
|
||||
["firedNonPlayerVehicle", DFUNC(fired)] call CBA_fnc_addEventHandler;
|
||||
["ace_firedPlayer", DFUNC(fired)] call CBA_fnc_addEventHandler;
|
||||
["ace_firedPlayerNonLocal", DFUNC(fired)] call CBA_fnc_addEventHandler;
|
||||
["ace_firedNonPlayer", DFUNC(fired)] call CBA_fnc_addEventHandler;
|
||||
["ace_firedPlayerVehicle", DFUNC(fired)] call CBA_fnc_addEventHandler;
|
||||
["ace_firedPlayerVehicleNonLocal", DFUNC(fired)] call CBA_fnc_addEventHandler;
|
||||
["ace_firedNonPlayerVehicle", DFUNC(fired)] call CBA_fnc_addEventHandler;
|
||||
|
||||
[FUNC(masterPFH), 0, []] call CBA_fnc_addPerFrameHandler;
|
||||
|
||||
|
@ -13,3 +13,12 @@ class CfgPatches {
|
||||
#include "CfgEventhandlers.hpp"
|
||||
#include "CfgAmmo.hpp"
|
||||
#include "ACE_Settings.hpp"
|
||||
class ACE_newEvents {
|
||||
SettingsInitialized = "ace_settingsInitialized";
|
||||
firedNonPlayerVehicle = "ace_firedNonPlayerVehicle";
|
||||
firedPlayerVehicleNonLocal = "ace_firedPlayerVehicleNonLocal";
|
||||
firedPlayerVehicle = "ace_firedPlayerVehicle";
|
||||
firedNonPlayer = "ace_firedNonPlayer";
|
||||
firedPlayerNonLocal = "ace_firedPlayerNonLocal";
|
||||
firedPlayer = "ace_firedPlayer";
|
||||
};
|
@ -4,7 +4,7 @@ if (!hasInterface) exitWith {};
|
||||
|
||||
GVAR(pfID) = -1;
|
||||
|
||||
["SettingsInitialized", {
|
||||
["ace_settingsInitialized", {
|
||||
TRACE_1("SettingsInitialized eh",GVAR(enabledFor));
|
||||
|
||||
if (GVAR(enabledFor) == 0) exitWith {}; //Module has no effect if enabledFor is "None"
|
||||
|
@ -17,3 +17,7 @@ class CfgPatches {
|
||||
#include "CfgWeapons.hpp"
|
||||
|
||||
#include "CfgVehicles.hpp"
|
||||
|
||||
class ACE_newEvents {
|
||||
SettingsInitialized = "ace_settingsInitialized";
|
||||
};
|
@ -44,13 +44,13 @@ GVAR(surfaceCacheIsDust) = false;
|
||||
// init GlassesChanged eventhandler
|
||||
GVAR(OldGlasses) = "<null>";
|
||||
|
||||
["playerInventoryChanged", {
|
||||
["ace_playerInventoryChanged", {
|
||||
params ["_unit"];
|
||||
|
||||
private _currentGlasses = goggles _unit;
|
||||
|
||||
if (GVAR(OldGlasses) != _currentGlasses) then {
|
||||
["GlassesChanged", [_unit, _currentGlasses]] call CBA_fnc_localEvent;
|
||||
["ace_glassesChanged", [_unit, _currentGlasses]] call CBA_fnc_localEvent;
|
||||
GVAR(OldGlasses) = _currentGlasses;
|
||||
};
|
||||
}] call CBA_fnc_addEventHandler;
|
||||
@ -111,8 +111,8 @@ private _fnc_checkGoggles = {
|
||||
};
|
||||
};
|
||||
|
||||
["cameraViewChanged", _fnc_checkGoggles] call CBA_fnc_addEventHandler;
|
||||
["activeCameraChanged", _fnc_checkGoggles] call CBA_fnc_addEventHandler;
|
||||
["ace_cameraViewChanged", _fnc_checkGoggles] call CBA_fnc_addEventHandler;
|
||||
["ace_activeCameraChanged", _fnc_checkGoggles] call CBA_fnc_addEventHandler;
|
||||
|
||||
// goggles effects main PFH
|
||||
[{
|
||||
@ -135,4 +135,4 @@ private _fnc_checkGoggles = {
|
||||
}, 0.5, []] call CBA_fnc_addPerFrameHandler;
|
||||
|
||||
// Register fire event handler
|
||||
["firedPlayer", DFUNC(handleFired)] call CBA_fnc_addEventHandler;
|
||||
["ace_firedPlayer", DFUNC(handleFired)] call CBA_fnc_addEventHandler;
|
||||
|
@ -268,3 +268,13 @@ class CfgCloudlets {
|
||||
destroyOnWaterSurface = 1;
|
||||
};
|
||||
};
|
||||
|
||||
class ACE_newEvents {
|
||||
playerInventoryChanged = "ace_playerInventoryChanged";
|
||||
firedPlayer = "ace_firedPlayer";
|
||||
activeCameraChanged = "ace_activeCameraChanged";
|
||||
cameraViewChanged = "ace_cameraViewChanged";
|
||||
GlassesChanged = "ace_glassesChanged";
|
||||
GlassesCracked = "ace_glassesCracked";
|
||||
GlassesCracked = "ace_glassesCracked";
|
||||
};
|
@ -27,7 +27,7 @@ _config = configFile >> "CfgGlasses" >> goggles _unit;
|
||||
if ((_this select 1) call FUNC(GetExplosionIndex) < getNumber (_config >> "ACE_Resistance")) exitWith {true};
|
||||
|
||||
if !([_unit] call FUNC(isGogglesVisible)) exitWith {
|
||||
["GlassesCracked", [_unit]] call CBA_fnc_localEvent;
|
||||
["ace_glassesCracked", [_unit]] call CBA_fnc_localEvent;
|
||||
true
|
||||
};
|
||||
|
||||
@ -46,5 +46,5 @@ if (getText (_config >> "ACE_OverlayCracked") != "") then {
|
||||
(GLASSDISPLAY displayCtrl 10650) ctrlSetText getText (_config >> "ACE_OverlayCracked");
|
||||
};
|
||||
|
||||
["GlassesCracked", [_unit]] call CBA_fnc_localEvent;
|
||||
["ace_glassesCracked", [_unit]] call CBA_fnc_localEvent;
|
||||
true
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
#include "script_component.hpp"
|
||||
|
||||
["flashbangExplosion", {_this call FUNC(flashbangExplosionEH)}] call CBA_fnc_addEventHandler;
|
||||
["ace_flashbangExplosion", {_this call FUNC(flashbangExplosionEH)}] call CBA_fnc_addEventHandler;
|
||||
|
||||
if (!hasInterface) exitWith {};
|
||||
|
||||
@ -25,6 +25,6 @@ GVAR(flashbangPPEffectCC) ppEffectForceInNVG true;
|
||||
|
||||
|
||||
// Register fire event handler
|
||||
["firedPlayer", DFUNC(throwGrenade)] call CBA_fnc_addEventHandler;
|
||||
["firedPlayerNonLocal", DFUNC(throwGrenade)] call CBA_fnc_addEventHandler;
|
||||
["firedNonPlayer", DFUNC(throwGrenade)] call CBA_fnc_addEventHandler;
|
||||
["ace_firedPlayer", DFUNC(throwGrenade)] call CBA_fnc_addEventHandler;
|
||||
["ace_firedPlayerNonLocal", DFUNC(throwGrenade)] call CBA_fnc_addEventHandler;
|
||||
["ace_firedNonPlayer", DFUNC(throwGrenade)] call CBA_fnc_addEventHandler;
|
||||
|
@ -19,3 +19,11 @@ class CfgPatches {
|
||||
#include "CfgVehicles.hpp"
|
||||
|
||||
#include "Effects.hpp"
|
||||
|
||||
class ACE_newEvents {
|
||||
firedNonPlayer = "ace_firedNonPlayer";
|
||||
firedPlayerNonLocal = "ace_firedPlayerNonLocal";
|
||||
firedPlayer = "ace_firedPlayer";
|
||||
flashbangExplosion = "ace_flashbangExplosion";
|
||||
flashbangExplosion = "ace_flashbangExplosion";
|
||||
};
|
@ -21,5 +21,5 @@ TRACE_1("params",_projectile);
|
||||
if (alive _projectile) then {
|
||||
playSound3D ["A3\Sounds_F\weapons\Explosion\explosion_mine_1.wss", _projectile, false, getPosASL _projectile, 5, 1.2, 400];
|
||||
|
||||
["flashbangExplosion", [getPosASL _projectile]] call CBA_fnc_globalEvent;
|
||||
["ace_flashbangExplosion", [getPosASL _projectile]] call CBA_fnc_globalEvent;
|
||||
};
|
||||
|
@ -12,7 +12,7 @@ GVAR(time3) = 0;
|
||||
GVAR(damageCoefficent) = 1;
|
||||
GVAR(volumeAttenuation) = 1;
|
||||
|
||||
["SettingsInitialized", {
|
||||
["ace_settingsInitialized", {
|
||||
TRACE_1("settingInit",GVAR(EnableCombatDeafness));
|
||||
// Only run PFEH and install event handlers if combat deafness is enabled
|
||||
if (!GVAR(EnableCombatDeafness)) exitWith {};
|
||||
@ -28,8 +28,8 @@ GVAR(volumeAttenuation) = 1;
|
||||
[FUNC(updateVolume), 1, [false]] call CBA_fnc_addPerFrameHandler;
|
||||
|
||||
// Update veh attunation when player veh changes
|
||||
["playerVehicleChanged", {_this call FUNC(updatePlayerVehAttenuation);}] call CBA_fnc_addEventHandler;
|
||||
["playerTurretChanged", {_this call FUNC(updatePlayerVehAttenuation);}] call CBA_fnc_addEventHandler;
|
||||
["ace_playerVehicleChanged", {_this call FUNC(updatePlayerVehAttenuation);}] call CBA_fnc_addEventHandler;
|
||||
["ace_playerTurretChanged", {_this call FUNC(updatePlayerVehAttenuation);}] call CBA_fnc_addEventHandler;
|
||||
|
||||
// Reset deafness on respawn (or remote control player switch)
|
||||
["playerChanged", {
|
||||
@ -41,5 +41,5 @@ GVAR(volumeAttenuation) = 1;
|
||||
}] call CBA_fnc_addEventHandler;
|
||||
|
||||
// Update protection on possible helmet change
|
||||
["playerInventoryChanged", {[] call FUNC(updateHearingProtection);}] call CBA_fnc_addEventHandler;
|
||||
["ace_playerInventoryChanged", {[] call FUNC(updateHearingProtection);}] call CBA_fnc_addEventHandler;
|
||||
}] call CBA_fnc_addEventHandler;
|
||||
|
@ -23,3 +23,10 @@ class CfgPatches {
|
||||
#include "CfgAmmo.hpp"
|
||||
|
||||
#include "ACE_Settings.hpp"
|
||||
|
||||
class ACE_newEvents {
|
||||
SettingsInitialized = "ace_settingsInitialized";
|
||||
playerInventoryChanged = "ace_playerInventoryChanged";
|
||||
playerTurretChanged = "ace_playerTurretChanged";
|
||||
playerVehicleChanged = "ace_playerVehicleChanged";
|
||||
};
|
@ -10,5 +10,5 @@ GVAR(ELEVAT) = 0.01;
|
||||
|
||||
// Register fire event handler
|
||||
// Don't run for non players, as they are too dumb to launch huntirs anyway
|
||||
["firedPlayer", DFUNC(handleFired)] call CBA_fnc_addEventHandler;
|
||||
["firedPlayerNonLocal", DFUNC(handleFired)] call CBA_fnc_addEventHandler;
|
||||
["ace_firedPlayer", DFUNC(handleFired)] call CBA_fnc_addEventHandler;
|
||||
["ace_firedPlayerNonLocal", DFUNC(handleFired)] call CBA_fnc_addEventHandler;
|
||||
|
@ -19,3 +19,8 @@ class CfgPatches {
|
||||
#include "CfgWeapons.hpp"
|
||||
#include "Dialog.hpp"
|
||||
#include "RscTitles.hpp"
|
||||
|
||||
class ACE_newEvents {
|
||||
firedPlayerNonLocal = "ace_firedPlayerNonLocal";
|
||||
firedPlayer = "ace_firedPlayer";
|
||||
};
|
@ -8,7 +8,7 @@ GVAR(cachedBuildingActionPairs) = [];
|
||||
|
||||
GVAR(ParsedTextCached) = [];
|
||||
|
||||
["SettingChanged", {
|
||||
["ace_settingChanged", {
|
||||
params ["_name"];
|
||||
if (({_x == _name} count [QGVAR(colorTextMax), QGVAR(colorTextMin), QGVAR(colorShadowMax), QGVAR(colorShadowMin), QGVAR(textSize), QGVAR(shadowSetting)]) == 1) then {
|
||||
[] call FUNC(setupTextColors);
|
||||
@ -23,7 +23,7 @@ GVAR(ParsedTextCached) = [];
|
||||
}] call CBA_fnc_addEventHandler;
|
||||
|
||||
//Add Actions to Houses:
|
||||
["interactMenuOpened", {_this call FUNC(userActions_addHouseActions)}] call CBA_fnc_addEventHandler;
|
||||
["ace_interactMenuOpened", {_this call FUNC(userActions_addHouseActions)}] call CBA_fnc_addEventHandler;
|
||||
|
||||
["ACE3 Common", QGVAR(InteractKey), (localize LSTRING(InteractKey)),
|
||||
{
|
||||
@ -54,7 +54,7 @@ GVAR(ParsedTextCached) = [];
|
||||
}] call CBA_fnc_addEventHandler;
|
||||
|
||||
// disable firing while the interact menu is is is opened
|
||||
["playerChanged", {_this call FUNC(handlePlayerChanged)}] call CBA_fnc_addEventHandler;
|
||||
["ace_playerChanged", {_this call FUNC(handlePlayerChanged)}] call CBA_fnc_addEventHandler;
|
||||
|
||||
// background options
|
||||
["interactMenuOpened", {
|
||||
|
@ -23,3 +23,15 @@ class CfgPatches {
|
||||
class ACE_Extensions {
|
||||
extensions[] += {"ace_break_line", "ace_parse_imagepath"};
|
||||
};
|
||||
|
||||
class ACE_newEvents {
|
||||
SettingChanged = "ace_settingChanged";
|
||||
playerChanged = "ace_playerChanged";
|
||||
interactMenuOpened = "ace_interactMenuOpened";
|
||||
clearConditionCaches = "ace_clearConditionCaches";
|
||||
clearConditionCaches = "ace_clearConditionCaches";
|
||||
interactMenuClosed = "ace_interactMenuClosed";
|
||||
clearConditionCaches = "ace_clearConditionCaches";
|
||||
clearConditionCaches = "ace_clearConditionCaches";
|
||||
interactMenuOpened = "ace_interactMenuOpened";
|
||||
};
|
@ -102,6 +102,6 @@ if (GVAR(openedMenuType) == 0) then {
|
||||
GVAR(startHoverTime) = -1000;
|
||||
};
|
||||
|
||||
["interactMenuOpened", [_menuType]] call CBA_fnc_localEvent;
|
||||
["ace_interactMenuOpened", [_menuType]] call CBA_fnc_localEvent;
|
||||
|
||||
true
|
||||
|
@ -28,7 +28,7 @@ if(GVAR(actionSelected)) then {
|
||||
private _target = GVAR(selectedTarget);
|
||||
|
||||
// Clear the conditions caches
|
||||
["clearConditionCaches", []] call CBA_fnc_localEvent;
|
||||
["ace_clearConditionCaches", []] call CBA_fnc_localEvent;
|
||||
|
||||
// exit scope if selecting an action on key release is disabled
|
||||
if (!(GVAR(actionOnKeyRelease)) && !_calledByClicking) exitWith {};
|
||||
@ -40,11 +40,11 @@ if(GVAR(actionSelected)) then {
|
||||
[_target, _player, _actionData select 6] call (_actionData select 3);
|
||||
|
||||
// Clear the conditions caches again if the action was performed
|
||||
["clearConditionCaches", []] call CBA_fnc_localEvent;
|
||||
["ace_clearConditionCaches", []] call CBA_fnc_localEvent;
|
||||
};
|
||||
};
|
||||
|
||||
["interactMenuClosed", [GVAR(openedMenuType)]] call CBA_fnc_localEvent;
|
||||
["ace_interactMenuClosed", [GVAR(openedMenuType)]] call CBA_fnc_localEvent;
|
||||
|
||||
GVAR(keyDown) = false;
|
||||
GVAR(keyDownSelfAction) = false;
|
||||
|
@ -97,7 +97,7 @@ if (GVAR(openedMenuType) >= 0) then {
|
||||
private _target = GVAR(selectedTarget);
|
||||
|
||||
// Clear the conditions caches
|
||||
["clearConditionCaches", []] call CBA_fnc_localEvent;
|
||||
["ace_clearConditionCaches", []] call CBA_fnc_localEvent;
|
||||
|
||||
// Check the action conditions
|
||||
private _actionData = GVAR(selectedAction) select 0;
|
||||
@ -106,7 +106,7 @@ if (GVAR(openedMenuType) >= 0) then {
|
||||
[_target, _player, _actionData select 6] call (_actionData select 3);
|
||||
|
||||
// Clear the conditions caches again if the action was performed
|
||||
["clearConditionCaches", []] call CBA_fnc_localEvent;
|
||||
["ace_clearConditionCaches", []] call CBA_fnc_localEvent;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
@ -3,9 +3,9 @@
|
||||
|
||||
ACE_Modifier = 0;
|
||||
|
||||
["pardon", {(_this select 0) addRating -rating (_this select 0)}] call CBA_fnc_addEventHandler;
|
||||
["ace_pardon", {(_this select 0) addRating -rating (_this select 0)}] call CBA_fnc_addEventHandler;
|
||||
|
||||
["getDown", {
|
||||
["ace_getDown", {
|
||||
params ["_target"];
|
||||
|
||||
_target setUnitPos "DOWN";
|
||||
|
@ -17,3 +17,17 @@ class CfgPatches {
|
||||
#include "RscTitles.hpp"
|
||||
#include "ACE_Settings.hpp"
|
||||
#include "ACE_ZeusActions.hpp"
|
||||
|
||||
class ACE_newEvents {
|
||||
getDown = "ace_getDown";
|
||||
pardon = "ace_pardon";
|
||||
tapShoulder = "ace_tapShoulder";
|
||||
sendAway = "ace_sendAway";
|
||||
setVelocity = "ace_setVelocity";
|
||||
displayTextStructured = "ace_displayTextStructured";
|
||||
pardon = "ace_pardon";
|
||||
displayTextStructured = "ace_displayTextStructured";
|
||||
CBA_teamColorChanged = "ace_cBA_teamColorChanged";
|
||||
getDown = "ace_getDown";
|
||||
selectLeader = "ace_selectLeader";
|
||||
};
|
@ -17,4 +17,4 @@
|
||||
|
||||
params ["_unit"];
|
||||
|
||||
["selectLeader", [group _unit, _unit], units group _unit] call CBA_fnc_targetEvent;
|
||||
["ace_selectLeader", [group _unit, _unit], units group _unit] call CBA_fnc_targetEvent;
|
||||
|
@ -27,7 +27,7 @@ _chance = [0.5, 0.8] select (count weapons _unit > 0);
|
||||
|
||||
{
|
||||
if (count weapons _x == 0 && {random 1 < _chance}) then {
|
||||
["getDown", [_x], [_x]] call CBA_fnc_targetEvent;
|
||||
["ace_getDown", [_x], [_x]] call CBA_fnc_targetEvent;
|
||||
};
|
||||
false
|
||||
} count (_target nearEntities ["Civilian", SEND_RADIUS]);
|
||||
|
@ -18,7 +18,7 @@
|
||||
|
||||
params ["_unit", "_team"];
|
||||
|
||||
["CBA_teamColorChanged", [_unit, _team]] call CBA_fnc_globalEvent;
|
||||
["ace_cBA_teamColorChanged", [_unit, _team]] call CBA_fnc_globalEvent;
|
||||
|
||||
// display message
|
||||
if (_unit == ACE_player) then {
|
||||
@ -31,5 +31,5 @@ if (_unit == ACE_player) then {
|
||||
_message = format [localize LSTRING(JoinedTeam), _team];
|
||||
};
|
||||
|
||||
["displayTextStructured", _message] call CBA_fnc_localEvent;
|
||||
["ace_displayTextStructured", _message] call CBA_fnc_localEvent;
|
||||
};
|
||||
|
@ -15,4 +15,4 @@
|
||||
|
||||
params ["", "_target"];
|
||||
|
||||
["pardon", [_target], [_target]] call CBA_fnc_targetEvent;
|
||||
["ace_pardon", [_target], [_target]] call CBA_fnc_targetEvent;
|
||||
|
@ -51,4 +51,4 @@ _target addMagazine [_magToPassClassName, _magToPassAmmoCount];
|
||||
|
||||
_playerName = [_player] call EFUNC(common,getName);
|
||||
_magToPassDisplayName = getText (configFile >> "CfgMagazines" >> _magToPassClassName >> "displayName");
|
||||
["displayTextStructured", [[LSTRING(PassMagazineHint), _playerName, _magToPassDisplayName], 1.5, _target], [_target]] call CBA_fnc_targetEvent;
|
||||
["ace_displayTextStructured", [[LSTRING(PassMagazineHint), _playerName, _magToPassDisplayName], 1.5, _target], [_target]] call CBA_fnc_targetEvent;
|
@ -22,4 +22,4 @@ private _newVelocity = vectorDir _unit;
|
||||
_newVelocity set [2, 0.25];
|
||||
_newVelocity = _newVelocity vectorMultiply 2;
|
||||
|
||||
["setVelocity", [_boat, _newVelocity], [_boat]] call CBA_fnc_targetEvent;
|
||||
["ace_setVelocity", [_boat, _newVelocity], [_boat]] call CBA_fnc_targetEvent;
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user