mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Merge branch 'master' into eol-lf
This commit is contained in:
commit
bd5f6107a0
@ -24,7 +24,7 @@ if (!GVAR(extensionAvailable)) exitWith {
|
|||||||
|
|
||||||
if (!hasInterface) exitWith {};
|
if (!hasInterface) exitWith {};
|
||||||
|
|
||||||
["SettingsInitialized", {
|
["ace_settingsInitialized", {
|
||||||
//If not enabled, dont't add PFEH
|
//If not enabled, dont't add PFEH
|
||||||
if (!GVAR(enabled)) exitWith {};
|
if (!GVAR(enabled)) exitWith {};
|
||||||
|
|
||||||
@ -32,8 +32,8 @@ if (!hasInterface) exitWith {};
|
|||||||
[] call FUNC(initializeTerrainExtension);
|
[] call FUNC(initializeTerrainExtension);
|
||||||
|
|
||||||
// Register fire event handler
|
// Register fire event handler
|
||||||
["firedPlayer", DFUNC(handleFired)] call EFUNC(common,addEventHandler);
|
["ace_firedPlayer", DFUNC(handleFired)] call CBA_fnc_addEventHandler;
|
||||||
["firedPlayerNonLocal", DFUNC(handleFired)] call EFUNC(common,addEventHandler);
|
["ace_firedPlayerNonLocal", DFUNC(handleFired)] call CBA_fnc_addEventHandler;
|
||||||
|
|
||||||
//Add warnings for missing compat PBOs (only if AB is on)
|
//Add warnings for missing compat PBOs (only if AB is on)
|
||||||
{
|
{
|
||||||
@ -50,7 +50,7 @@ if (!hasInterface) exitWith {};
|
|||||||
["iansky_opt","ace_compat_sma3_iansky"],
|
["iansky_opt","ace_compat_sma3_iansky"],
|
||||||
["R3F_Armes","ace_compat_r3f"]
|
["R3F_Armes","ace_compat_r3f"]
|
||||||
];
|
];
|
||||||
}] call EFUNC(common,addEventHandler);
|
}] call CBA_fnc_addEventHandler;
|
||||||
|
|
||||||
#ifdef DEBUG_MODE_FULL
|
#ifdef DEBUG_MODE_FULL
|
||||||
call FUNC(diagnoseWeapons);
|
call FUNC(diagnoseWeapons);
|
||||||
|
@ -49,4 +49,4 @@ if ((profileNamespace getVariable ["ACE_ATragMX_profileNamespaceVersion", 0]) ==
|
|||||||
[] call FUNC(init);
|
[] call FUNC(init);
|
||||||
[] call FUNC(restore_user_data);
|
[] call FUNC(restore_user_data);
|
||||||
|
|
||||||
["RangerfinderData", {_this call FUNC(sord)}] call EFUNC(common,addEventHandler);
|
[QEGVAR(vector,rangefinderData), {_this call FUNC(sord)}] call CBA_fnc_addEventHandler;
|
||||||
|
@ -17,3 +17,7 @@ class CfgPatches {
|
|||||||
#include "CfgVehicles.hpp"
|
#include "CfgVehicles.hpp"
|
||||||
#include "CfgWeapons.hpp"
|
#include "CfgWeapons.hpp"
|
||||||
#include "RscTitles.hpp"
|
#include "RscTitles.hpp"
|
||||||
|
|
||||||
|
class ACE_newEvents {
|
||||||
|
RangerfinderData = QEGVAR(vector,rangefinderData);
|
||||||
|
};
|
||||||
|
@ -3,4 +3,4 @@
|
|||||||
if (!hasInterface) exitWith {};
|
if (!hasInterface) exitWith {};
|
||||||
|
|
||||||
//If attach placing, stop when opening menu:
|
//If attach placing, stop when opening menu:
|
||||||
["interactMenuOpened", {GVAR(placeAction) = 0;}] call EFUNC(common,addEventHandler);
|
["ace_interactMenuOpened", {GVAR(placeAction) = 0;}] call CBA_fnc_addEventHandler;
|
||||||
|
@ -18,3 +18,7 @@ class CfgPatches {
|
|||||||
#include "CfgVehicles.hpp"
|
#include "CfgVehicles.hpp"
|
||||||
#include "CfgWeapons.hpp"
|
#include "CfgWeapons.hpp"
|
||||||
#include "GUI_VirtualAmmo.hpp"
|
#include "GUI_VirtualAmmo.hpp"
|
||||||
|
|
||||||
|
class ACE_newEvents {
|
||||||
|
interactMenuOpened = "ace_interactMenuOpened";
|
||||||
|
};
|
@ -40,7 +40,7 @@ _onAtachText = format [localize LSTRING(Item_Attached), _onAtachText];
|
|||||||
|
|
||||||
if (_unit == _attachToVehicle) then { //Self Attachment
|
if (_unit == _attachToVehicle) then { //Self Attachment
|
||||||
_attachedItem = _itemVehClass createVehicle [0,0,0];
|
_attachedItem = _itemVehClass createVehicle [0,0,0];
|
||||||
_attachedItem attachTo [_unit, [-0.05, 0, 0.12], "rightshoulder"];
|
_attachedItem attachTo [_unit, [0.05, -0.09, 0.1], "leftshoulder"];
|
||||||
if (!_silentScripted) then {
|
if (!_silentScripted) then {
|
||||||
_unit removeItem _itemClassname; // Remove item
|
_unit removeItem _itemClassname; // Remove item
|
||||||
[_onAtachText] call EFUNC(common,displayTextStructured);
|
[_onAtachText] call EFUNC(common,displayTextStructured);
|
||||||
|
@ -1,3 +1,3 @@
|
|||||||
#include "script_component.hpp"
|
#include "script_component.hpp"
|
||||||
|
|
||||||
["backpackOpened", {_this call FUNC(backpackOpened)}] call EFUNC(common,addEventHandler);
|
["ace_backpackOpened", {_this call FUNC(backpackOpened)}] call CBA_fnc_addEventHandler;
|
||||||
|
@ -14,3 +14,7 @@ class CfgPatches {
|
|||||||
};
|
};
|
||||||
|
|
||||||
#include "CfgEventHandlers.hpp"
|
#include "CfgEventHandlers.hpp"
|
||||||
|
|
||||||
|
class ACE_newEvents {
|
||||||
|
backpackOpened = "ace_backpackOpened";
|
||||||
|
};
|
||||||
|
@ -24,7 +24,7 @@ private _target = objectParent _backpack;
|
|||||||
if (isNull _target) exitWith {false};
|
if (isNull _target) exitWith {false};
|
||||||
|
|
||||||
// raise event on target unit
|
// raise event on target unit
|
||||||
["backpackOpened", _target, [_target, _backpack]] call EFUNC(common,targetEvent);
|
["ace_backpackOpened", [_target, _backpack], _target] call CBA_fnc_targetEvent;
|
||||||
|
|
||||||
// return false to open inventory as usual
|
// return false to open inventory as usual
|
||||||
false
|
false
|
||||||
|
@ -1,11 +1,11 @@
|
|||||||
#include "script_component.hpp"
|
#include "script_component.hpp"
|
||||||
|
|
||||||
["SettingsInitialized", {
|
["ace_settingsInitialized", {
|
||||||
// Hold on a little bit longer to ensure anims will work
|
// Hold on a little bit longer to ensure anims will work
|
||||||
[{
|
[{
|
||||||
GVAR(captivityEnabled) = true;
|
GVAR(captivityEnabled) = true;
|
||||||
}, [], 0.05] call CBA_fnc_waitAndExecute;
|
}, [], 0.05] call CBA_fnc_waitAndExecute;
|
||||||
}] call EFUNC(common,addEventHandler);
|
}] call CBA_fnc_addEventHandler;
|
||||||
|
|
||||||
//Handles when someone starts escorting and then disconnects, leaving the captive attached
|
//Handles when someone starts escorting and then disconnects, leaving the captive attached
|
||||||
//This is normaly handled by the PFEH in doEscortCaptive, but that won't be running if they DC
|
//This is normaly handled by the PFEH in doEscortCaptive, but that won't be running if they DC
|
||||||
@ -24,15 +24,15 @@ if (isServer) then {
|
|||||||
}];
|
}];
|
||||||
};
|
};
|
||||||
|
|
||||||
["playerChanged", {_this call FUNC(handlePlayerChanged)}] call EFUNC(common,addEventhandler);
|
["ace_playerChanged", {_this call FUNC(handlePlayerChanged)}] call CBA_fnc_addEventHandler;
|
||||||
["MoveInCaptive", {_this call FUNC(vehicleCaptiveMoveIn)}] call EFUNC(common,addEventHandler);
|
[QGVAR(moveInCaptive), {_this call FUNC(vehicleCaptiveMoveIn)}] call CBA_fnc_addEventHandler;
|
||||||
["MoveOutCaptive", {_this call FUNC(vehicleCaptiveMoveOut)}] call EFUNC(common,addEventHandler);
|
[QGVAR(moveOutCaptive), {_this call FUNC(vehicleCaptiveMoveOut)}] call CBA_fnc_addEventHandler;
|
||||||
|
|
||||||
["SetHandcuffed", {_this call FUNC(setHandcuffed)}] call EFUNC(common,addEventHandler);
|
[QGVAR(setHandcuffed), {_this call FUNC(setHandcuffed)}] call CBA_fnc_addEventHandler;
|
||||||
["SetSurrendered", {_this call FUNC(setSurrendered)}] call EFUNC(common,addEventHandler);
|
[QGVAR(setSurrendered), {_this call FUNC(setSurrendered)}] call CBA_fnc_addEventHandler;
|
||||||
|
|
||||||
//Medical Integration Events
|
//Medical Integration Events
|
||||||
["medical_onUnconscious", {_this call ACE_Captives_fnc_handleOnUnconscious}] call EFUNC(common,addEventHandler);
|
["ace_unconscious", {_this call ACE_Captives_fnc_handleOnUnconscious}] call CBA_fnc_addEventHandler;
|
||||||
|
|
||||||
if (!hasInterface) exitWith {};
|
if (!hasInterface) exitWith {};
|
||||||
|
|
||||||
|
@ -19,3 +19,11 @@ class CfgPatches {
|
|||||||
#include "CfgVehicles.hpp"
|
#include "CfgVehicles.hpp"
|
||||||
#include "CfgWeapons.hpp"
|
#include "CfgWeapons.hpp"
|
||||||
#include "CfgEden.hpp"
|
#include "CfgEden.hpp"
|
||||||
|
|
||||||
|
class ACE_newEvents {
|
||||||
|
SetSurrendered = QGVAR(setSurrendered);
|
||||||
|
SetHandcuffed = QGVAR(setHandcuffed);
|
||||||
|
MoveOutCaptive = QGVAR(moveOutCaptive);
|
||||||
|
MoveInCaptive = QGVAR(moveInCaptive);
|
||||||
|
CaptiveStatusChanged = "ace_captiveStatusChanged";
|
||||||
|
};
|
||||||
|
@ -21,6 +21,6 @@ params ["_unit", "_target"];
|
|||||||
|
|
||||||
playSound3D [QUOTE(PATHTO_R(sounds\cable_tie_zipping.ogg)), objNull, false, (getPosASL _target), 1, 1, 10];
|
playSound3D [QUOTE(PATHTO_R(sounds\cable_tie_zipping.ogg)), objNull, false, (getPosASL _target), 1, 1, 10];
|
||||||
|
|
||||||
["SetHandcuffed", [_target], [_target, true]] call EFUNC(common,targetEvent);
|
[QGVAR(setHandcuffed), [_target, true], [_target]] call CBA_fnc_targetEvent;
|
||||||
|
|
||||||
_unit removeItem "ACE_CableTie";
|
_unit removeItem "ACE_CableTie";
|
||||||
|
@ -47,4 +47,4 @@ if (isNull _vehicle) then {
|
|||||||
if (isNull _vehicle) exitWith {ERROR("");};
|
if (isNull _vehicle) exitWith {ERROR("");};
|
||||||
|
|
||||||
_unit setVariable [QGVAR(isEscorting), false, true];
|
_unit setVariable [QGVAR(isEscorting), false, true];
|
||||||
["MoveInCaptive", [_target], [_target, _vehicle]] call EFUNC(common,targetEvent);
|
[QGVAR(moveInCaptive), [_target, _vehicle], [_target]] call CBA_fnc_targetEvent;
|
||||||
|
@ -17,4 +17,4 @@
|
|||||||
|
|
||||||
params ["_unit", "_target"];
|
params ["_unit", "_target"];
|
||||||
|
|
||||||
["SetHandcuffed", [_target], [_target, false]] call EFUNC(common,targetEvent);
|
[QGVAR(setHandcuffed), [_target, false], [_target]] call CBA_fnc_targetEvent;
|
||||||
|
@ -18,4 +18,4 @@
|
|||||||
|
|
||||||
params ["_unit", "_target"];
|
params ["_unit", "_target"];
|
||||||
|
|
||||||
["MoveOutCaptive", [_target], [_target]] call EFUNC(common,targetEvent);
|
[QGVAR(moveOutCaptive), [_target], [_target]] call CBA_fnc_targetEvent;
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* Author: commy2, PabstMirror
|
* Author: commy2, PabstMirror
|
||||||
* Handles the "medical_onUnconscious" event
|
* Handles the "ace_unconscious" event
|
||||||
*
|
*
|
||||||
* Arguments:
|
* Arguments:
|
||||||
* 0: Unit <OBJECT>
|
* 0: Unit <OBJECT>
|
||||||
|
@ -30,7 +30,7 @@ if (!isServer) exitWith {};
|
|||||||
params ["_units"];
|
params ["_units"];
|
||||||
{
|
{
|
||||||
TRACE_2("event",_x,local _x);
|
TRACE_2("event",_x,local _x);
|
||||||
["SetHandcuffed", [_x], [_x, true]] call EFUNC(common,targetEvent);
|
[QGVAR(setHandcuffed), [_x, true], [_x]] call CBA_fnc_targetEvent;
|
||||||
} forEach _units;
|
} forEach _units;
|
||||||
}, [_units], 0.05] call CBA_fnc_waitAndExecute;
|
}, [_units], 0.05] call CBA_fnc_waitAndExecute;
|
||||||
|
|
||||||
|
@ -30,7 +30,7 @@ if (!isServer) exitWith {};
|
|||||||
params ["_units"];
|
params ["_units"];
|
||||||
{
|
{
|
||||||
TRACE_2("event",_x,local _x);
|
TRACE_2("event",_x,local _x);
|
||||||
["SetSurrendered", [_x], [_x, true]] call EFUNC(common,targetEvent);
|
[QGVAR(setSurrendered), [_x, true], [_x]] call CBA_fnc_targetEvent;
|
||||||
} forEach _units;
|
} forEach _units;
|
||||||
}, [_units], 0.05] call CBA_fnc_waitAndExecute;
|
}, [_units], 0.05] call CBA_fnc_waitAndExecute;
|
||||||
|
|
||||||
|
@ -124,4 +124,4 @@ if (_state) then {
|
|||||||
};
|
};
|
||||||
|
|
||||||
//Global Event after changes:
|
//Global Event after changes:
|
||||||
["CaptiveStatusChanged", [_unit, _state, "SetHandcuffed"]] call EFUNC(common,globalEvent);
|
["ace_captiveStatusChanged", [_unit, _state, "SetHandcuffed"]] call CBA_fnc_globalEvent;
|
||||||
|
@ -117,4 +117,4 @@ if (_state) then {
|
|||||||
};
|
};
|
||||||
|
|
||||||
//Global Event after changes:
|
//Global Event after changes:
|
||||||
["CaptiveStatusChanged", [_unit, _state, "SetSurrendered"]] call EFUNC(common,globalEvent);
|
["ace_captiveStatusChanged", [_unit, _state, "SetSurrendered"]] call CBA_fnc_globalEvent;
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
#include "script_component.hpp"
|
#include "script_component.hpp"
|
||||||
|
|
||||||
["AddCargoByClass", {_this call FUNC(addCargoItem)}] call EFUNC(common,addEventHandler);
|
["ace_addCargoByClass", {_this call FUNC(addCargoItem)}] call CBA_fnc_addEventHandler;
|
||||||
|
|
||||||
["LoadCargo", {
|
["ace_loadCargo", {
|
||||||
params ["_item", "_vehicle"];
|
params ["_item", "_vehicle"];
|
||||||
TRACE_2("LoadCargo EH",_item,_vehicle);
|
TRACE_2("LoadCargo EH",_item,_vehicle);
|
||||||
|
|
||||||
@ -13,15 +13,15 @@
|
|||||||
private _itemName = getText (configFile >> "CfgVehicles" >> typeOf _item >> "displayName");
|
private _itemName = getText (configFile >> "CfgVehicles" >> typeOf _item >> "displayName");
|
||||||
private _vehicleName = getText (configFile >> "CfgVehicles" >> typeOf _vehicle >> "displayName");
|
private _vehicleName = getText (configFile >> "CfgVehicles" >> typeOf _vehicle >> "displayName");
|
||||||
|
|
||||||
["displayTextStructured", [[_hint, _itemName, _vehicleName], 3.0]] call EFUNC(common,localEvent);
|
[[_hint, _itemName, _vehicleName], 3.0] call EFUNC(common,displayTextStructured);
|
||||||
|
|
||||||
if (_loaded) then {
|
if (_loaded) then {
|
||||||
// Invoke listenable event
|
// Invoke listenable event
|
||||||
["cargoLoaded", [_item, _vehicle]] call EFUNC(common,globalEvent);
|
["ace_cargoLoaded", [_item, _vehicle]] call CBA_fnc_globalEvent;
|
||||||
};
|
};
|
||||||
}] call EFUNC(common,addEventHandler);
|
}] call CBA_fnc_addEventHandler;
|
||||||
|
|
||||||
["UnloadCargo", {
|
["ace_unloadCargo", {
|
||||||
params ["_item", "_vehicle", ["_unloader", objNull]];
|
params ["_item", "_vehicle", ["_unloader", objNull]];
|
||||||
TRACE_3("UnloadCargo EH",_item,_vehicle,_unloader);
|
TRACE_3("UnloadCargo EH",_item,_vehicle,_unloader);
|
||||||
|
|
||||||
@ -34,19 +34,19 @@
|
|||||||
private _itemName = getText (configFile >> "CfgVehicles" >> _itemClass >> "displayName");
|
private _itemName = getText (configFile >> "CfgVehicles" >> _itemClass >> "displayName");
|
||||||
private _vehicleName = getText (configFile >> "CfgVehicles" >> typeOf _vehicle >> "displayName");
|
private _vehicleName = getText (configFile >> "CfgVehicles" >> typeOf _vehicle >> "displayName");
|
||||||
|
|
||||||
["displayTextStructured", [[_hint, _itemName, _vehicleName], 3.0]] call EFUNC(common,localEvent);
|
[[_hint, _itemName, _vehicleName], 3.0] call EFUNC(common,displayTextStructured);
|
||||||
|
|
||||||
if (_unloaded) then {
|
if (_unloaded) then {
|
||||||
// Invoke listenable event
|
// Invoke listenable event
|
||||||
["cargoUnloaded", [_item, _vehicle]] call EFUNC(common,globalEvent);
|
["ace_cargoUnloaded", [_item, _vehicle]] call CBA_fnc_globalEvent;
|
||||||
};
|
};
|
||||||
|
|
||||||
// TOOO maybe drag/carry the unloaded item?
|
// TOOO maybe drag/carry the unloaded item?
|
||||||
}] call EFUNC(common,addEventHandler);
|
}] call CBA_fnc_addEventHandler;
|
||||||
|
|
||||||
["ServerUnloadCargo", {
|
[QGVAR(serverUnload), {
|
||||||
params ["_item", "_emptyPosAGL"];
|
params ["_item", "_emptyPosAGL"];
|
||||||
|
|
||||||
_item hideObjectGlobal false;
|
_item hideObjectGlobal false;
|
||||||
_item setPosASL (AGLtoASL _emptyPosAGL);
|
_item setPosASL (AGLtoASL _emptyPosAGL);
|
||||||
}] call EFUNC(common,addEventHandler);
|
}] call CBA_fnc_addEventHandler;
|
||||||
|
@ -17,3 +17,13 @@ class CfgPatches {
|
|||||||
#include "CfgEventHandlers.hpp"
|
#include "CfgEventHandlers.hpp"
|
||||||
#include "CfgVehicles.hpp"
|
#include "CfgVehicles.hpp"
|
||||||
#include "menu.hpp"
|
#include "menu.hpp"
|
||||||
|
|
||||||
|
class ACE_newEvents {
|
||||||
|
LoadCargo = "ace_loadCargo";
|
||||||
|
cargoUnloaded = "ace_cargoUnloaded";
|
||||||
|
cargoLoaded = "ace_cargoLoaded";
|
||||||
|
AddCargoByClass = "ace_addCargoByClass";
|
||||||
|
ServerUnloadCargo = QGVAR(serverUnload);
|
||||||
|
UnloadCargo = "ace_unloadCargo";
|
||||||
|
cargoAddedByClass = "ace_cargoAddedByClass";
|
||||||
|
};
|
||||||
|
@ -26,4 +26,4 @@ for "_i" from 1 to _amount do {
|
|||||||
};
|
};
|
||||||
|
|
||||||
// Invoke listenable event
|
// Invoke listenable event
|
||||||
["cargoAddedByClass", [_itemClass, _vehicle, _amount]] call EFUNC(common,globalEvent);
|
["ace_cargoAddedByClass", [_itemClass, _vehicle, _amount]] call CBA_fnc_globalEvent;
|
||||||
|
@ -29,7 +29,7 @@ if (isServer) then {
|
|||||||
_cargoClassname = getText (_x >> "type");
|
_cargoClassname = getText (_x >> "type");
|
||||||
_cargoCount = getNumber (_x >> "amount");
|
_cargoCount = getNumber (_x >> "amount");
|
||||||
TRACE_3("adding ACE_Cargo", (configName _x), _cargoClassname, _cargoCount);
|
TRACE_3("adding ACE_Cargo", (configName _x), _cargoClassname, _cargoCount);
|
||||||
["AddCargoByClass", [_cargoClassname, _vehicle, _cargoCount]] call EFUNC(common,localEvent);
|
["ace_addCargoByClass", [_cargoClassname, _vehicle, _cargoCount]] call CBA_fnc_localEvent;
|
||||||
};
|
};
|
||||||
} count ("true" configClasses (configFile >> "CfgVehicles" >> _type >> "ACE_Cargo" >> "Cargo"));
|
} 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 {
|
if (_item isEqualType objNull) then {
|
||||||
detach _item;
|
detach _item;
|
||||||
_item attachTo [_vehicle,[0,0,-100]];
|
_item attachTo [_vehicle,[0,0,-100]];
|
||||||
["hideObjectGlobal", [_item, true]] call EFUNC(common,serverEvent);
|
[QEGVAR(common,hideObjectGlobal), [_item, true]] call CBA_fnc_serverEvent;
|
||||||
};
|
};
|
||||||
|
|
||||||
true
|
true
|
||||||
|
@ -40,7 +40,7 @@ if ([_object, _vehicle] call FUNC(canLoadItemIn)) then {
|
|||||||
[
|
[
|
||||||
5 * _size,
|
5 * _size,
|
||||||
[_object,_vehicle],
|
[_object,_vehicle],
|
||||||
{["LoadCargo", _this select 0] call EFUNC(common,localEvent)},
|
{["ace_loadCargo", _this select 0] call CBA_fnc_localEvent},
|
||||||
{},
|
{},
|
||||||
localize LSTRING(LoadingItem)
|
localize LSTRING(LoadingItem)
|
||||||
] call EFUNC(common,progressBar);
|
] call EFUNC(common,progressBar);
|
||||||
@ -48,7 +48,7 @@ if ([_object, _vehicle] call FUNC(canLoadItemIn)) then {
|
|||||||
} else {
|
} else {
|
||||||
private _displayName = getText (configFile >> "CfgVehicles" >> typeOf _object >> "displayName");
|
private _displayName = getText (configFile >> "CfgVehicles" >> typeOf _object >> "displayName");
|
||||||
|
|
||||||
["displayTextStructured", [[LSTRING(LoadingFailed), _displayName], 3.0]] call EFUNC(common,localEvent);
|
[[LSTRING(LoadingFailed), _displayName], 3.0] call EFUNC(common,displayTextStructured);
|
||||||
};
|
};
|
||||||
|
|
||||||
_return
|
_return
|
||||||
|
@ -37,7 +37,7 @@ if ([_item, GVAR(interactionVehicle), ACE_player] call FUNC(canUnloadItem)) then
|
|||||||
[
|
[
|
||||||
5 * _size,
|
5 * _size,
|
||||||
[_item, GVAR(interactionVehicle), ACE_player],
|
[_item, GVAR(interactionVehicle), ACE_player],
|
||||||
{["UnloadCargo", _this select 0] call EFUNC(common,localEvent)},
|
{["ace_unloadCargo", _this select 0] call CBA_fnc_localEvent},
|
||||||
{},
|
{},
|
||||||
localize LSTRING(UnloadingItem),
|
localize LSTRING(UnloadingItem),
|
||||||
{true},
|
{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 _itemClass = if (_item isEqualType "") then {_item} else {typeOf _item};
|
||||||
private _displayName = getText (configFile >> "CfgVehicles" >> _itemClass >> "displayName");
|
private _displayName = getText (configFile >> "CfgVehicles" >> _itemClass >> "displayName");
|
||||||
|
|
||||||
["displayTextStructured", [[LSTRING(UnloadingFailed), _displayName], 3.0]] call EFUNC(common,localEvent);
|
[[LSTRING(UnloadingFailed), _displayName], 3.0] call EFUNC(common,displayTextStructured);
|
||||||
};
|
};
|
||||||
|
@ -29,7 +29,7 @@ if ((count _emptyPosAGL) != 3) exitWith {
|
|||||||
TRACE_4("Could not find unload pos",_vehicle,getPosASL _vehicle,isTouchingGround _vehicle,speed _vehicle);
|
TRACE_4("Could not find unload pos",_vehicle,getPosASL _vehicle,isTouchingGround _vehicle,speed _vehicle);
|
||||||
if ((!isNull _unloader) && {_unloader == ACE_player}) then {
|
if ((!isNull _unloader) && {_unloader == ACE_player}) then {
|
||||||
//display text saying there are no safe places to exit the vehicle
|
//display text saying there are no safe places to exit the vehicle
|
||||||
["displayTextStructured", [localize ELSTRING(common,NoRoomToUnload)]] call EFUNC(common,localEvent);
|
[localize ELSTRING(common,NoRoomToUnload)] call EFUNC(common,displayTextStructured);
|
||||||
};
|
};
|
||||||
false
|
false
|
||||||
};
|
};
|
||||||
@ -52,7 +52,7 @@ if (_item isEqualType objNull) then {
|
|||||||
detach _item;
|
detach _item;
|
||||||
// hideObjectGlobal must be executed before setPos to ensure light objects are rendered correctly
|
// 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
|
// do both on server to ensure they are executed in the correct order
|
||||||
["ServerUnloadCargo", [_item, _emptyPosAGL]] call EFUNC(common,serverEvent);
|
[QGVAR(serverUnload), [_item, _emptyPosAGL]] call CBA_fnc_serverEvent;
|
||||||
} else {
|
} else {
|
||||||
private _newItem = createVehicle [_item, _emptyPosAGL, [], 0, ""];
|
private _newItem = createVehicle [_item, _emptyPosAGL, [], 0, ""];
|
||||||
_newItem setPosASL (AGLtoASL _emptyPosAGL);
|
_newItem setPosASL (AGLtoASL _emptyPosAGL);
|
||||||
|
@ -176,6 +176,7 @@
|
|||||||
<Spanish>Hacer objeto cargable</Spanish>
|
<Spanish>Hacer objeto cargable</Spanish>
|
||||||
<French>Rendre l'objet chargeable</French>
|
<French>Rendre l'objet chargeable</French>
|
||||||
<Czech>Vytvořit objekt nakladatelným</Czech>
|
<Czech>Vytvořit objekt nakladatelným</Czech>
|
||||||
|
<Portuguese>Fazer objeto carregável</Portuguese>
|
||||||
</Key>
|
</Key>
|
||||||
<Key ID="STR_ACE_Cargo_makeLoadable_description">
|
<Key ID="STR_ACE_Cargo_makeLoadable_description">
|
||||||
<English>Sets the synced object as loadable by the cargo system.</English>
|
<English>Sets the synced object as loadable by the cargo system.</English>
|
||||||
@ -185,6 +186,7 @@
|
|||||||
<Spanish>Sincronizar un objecto para hacerlo cargable.</Spanish>
|
<Spanish>Sincronizar un objecto para hacerlo cargable.</Spanish>
|
||||||
<French>Rend l'objet synchronisé comme chargeable par le système de cargaison.</French>
|
<French>Rend l'objet synchronisé comme chargeable par le système de cargaison.</French>
|
||||||
<Czech>Nastaví synchronizované objekty nakladatelnými za pomocí Nákladního systému.</Czech>
|
<Czech>Nastaví synchronizované objekty nakladatelnými za pomocí Nákladního systému.</Czech>
|
||||||
|
<Portuguese>Seta o objeto sincronizado como carregável</Portuguese>
|
||||||
</Key>
|
</Key>
|
||||||
<Key ID="STR_ACE_Cargo_makeLoadable_setSize_displayName">
|
<Key ID="STR_ACE_Cargo_makeLoadable_setSize_displayName">
|
||||||
<English>Object's Size</English>
|
<English>Object's Size</English>
|
||||||
@ -194,6 +196,7 @@
|
|||||||
<Spanish>Tamaño del objeto</Spanish>
|
<Spanish>Tamaño del objeto</Spanish>
|
||||||
<French>Taille de l'objet</French>
|
<French>Taille de l'objet</French>
|
||||||
<Czech>Velikost objektu</Czech>
|
<Czech>Velikost objektu</Czech>
|
||||||
|
<Portuguese>Tamanho do objeto</Portuguese>
|
||||||
</Key>
|
</Key>
|
||||||
</Package>
|
</Package>
|
||||||
</Project>
|
</Project>
|
@ -1,111 +1,111 @@
|
|||||||
|
|
||||||
class RscInGameUI {
|
class RscInGameUI {
|
||||||
class RscUnitInfo {
|
class RscUnitInfo {
|
||||||
onLoad = QUOTE([ARR_4(""onLoad"",_this,""RscUnitInfo"",'IGUI')] call (uinamespace getvariable 'BIS_fnc_initDisplay'); [ARR_2('infoDisplayChanged', [ARR_2(_this select 0, 'Any')])] call FUNC(localEvent););
|
onLoad = QUOTE([ARR_4(""onLoad"",_this,""RscUnitInfo"",'IGUI')] call (uinamespace getvariable 'BIS_fnc_initDisplay'); [ARR_2('ace_infoDisplayChanged', [ARR_2(_this select 0, 'Any')])] call CBA_fnc_localEvent;);
|
||||||
};
|
};
|
||||||
|
|
||||||
class RscUnitInfoNoHUD {
|
class RscUnitInfoNoHUD {
|
||||||
onLoad = QUOTE([ARR_2('infoDisplayChanged', [ARR_2(_this select 0, 'Any')])] call FUNC(localEvent););
|
onLoad = QUOTE([ARR_2('ace_infoDisplayChanged', [ARR_2(_this select 0, 'Any')])] call CBA_fnc_localEvent;);
|
||||||
};
|
};
|
||||||
|
|
||||||
class RscUnitInfoSoldier: RscUnitInfo {
|
class RscUnitInfoSoldier: RscUnitInfo {
|
||||||
onLoad = QUOTE([ARR_4(""onLoad"",_this,""RscUnitInfo"",'IGUI')] call (uinamespace getvariable 'BIS_fnc_initDisplay'); uiNamespace setVariable [ARR_2('ACE_dlgSoldier', _this select 0)]; [ARR_2('infoDisplayChanged', [ARR_2(_this select 0, 'Soldier')])] call FUNC(localEvent););
|
onLoad = QUOTE([ARR_4(""onLoad"",_this,""RscUnitInfo"",'IGUI')] call (uinamespace getvariable 'BIS_fnc_initDisplay'); uiNamespace setVariable [ARR_2('ACE_dlgSoldier', _this select 0)]; [ARR_2('ace_infoDisplayChanged', [ARR_2(_this select 0, 'Soldier')])] call CBA_fnc_localEvent;);
|
||||||
};
|
};
|
||||||
|
|
||||||
class RscUnitInfoTank: RscUnitInfo {
|
class RscUnitInfoTank: RscUnitInfo {
|
||||||
onLoad = QUOTE([ARR_4(""onLoad"",_this,""RscUnitInfo"",'IGUI')] call (uinamespace getvariable 'BIS_fnc_initDisplay'); uiNamespace setVariable [ARR_2('ACE_dlgVehicle', _this select 0)]; [ARR_2('infoDisplayChanged', [ARR_2(_this select 0, 'Vehicle')])] call FUNC(localEvent););
|
onLoad = QUOTE([ARR_4(""onLoad"",_this,""RscUnitInfo"",'IGUI')] call (uinamespace getvariable 'BIS_fnc_initDisplay'); uiNamespace setVariable [ARR_2('ACE_dlgVehicle', _this select 0)]; [ARR_2('ace_infoDisplayChanged', [ARR_2(_this select 0, 'Vehicle')])] call CBA_fnc_localEvent;);
|
||||||
};
|
};
|
||||||
|
|
||||||
class RscUnitInfoAirNoWeapon: RscUnitInfo {
|
class RscUnitInfoAirNoWeapon: RscUnitInfo {
|
||||||
onLoad = QUOTE([ARR_4(""onLoad"",_this,""RscUnitInfo"",'IGUI')] call (uinamespace getvariable 'BIS_fnc_initDisplay'); uiNamespace setVariable [ARR_2('ACE_dlgAircraft', _this select 0)]; [ARR_2('infoDisplayChanged', [ARR_2(_this select 0, 'Aircraft')])] call FUNC(localEvent););
|
onLoad = QUOTE([ARR_4(""onLoad"",_this,""RscUnitInfo"",'IGUI')] call (uinamespace getvariable 'BIS_fnc_initDisplay'); uiNamespace setVariable [ARR_2('ACE_dlgAircraft', _this select 0)]; [ARR_2('ace_infoDisplayChanged', [ARR_2(_this select 0, 'Aircraft')])] call CBA_fnc_localEvent;);
|
||||||
};
|
};
|
||||||
|
|
||||||
class RscUnitInfoAir: RscUnitInfoAirNoWeapon {
|
class RscUnitInfoAir: RscUnitInfoAirNoWeapon {
|
||||||
onLoad = QUOTE([ARR_4(""onLoad"",_this,""RscUnitInfo"",'IGUI')] call (uinamespace getvariable 'BIS_fnc_initDisplay'); uiNamespace setVariable [ARR_2('ACE_dlgAircraft', _this select 0)]; [ARR_2('infoDisplayChanged', [ARR_2(_this select 0, 'Aircraft')])] call FUNC(localEvent););
|
onLoad = QUOTE([ARR_4(""onLoad"",_this,""RscUnitInfo"",'IGUI')] call (uinamespace getvariable 'BIS_fnc_initDisplay'); uiNamespace setVariable [ARR_2('ACE_dlgAircraft', _this select 0)]; [ARR_2('ace_infoDisplayChanged', [ARR_2(_this select 0, 'Aircraft')])] call CBA_fnc_localEvent;);
|
||||||
};
|
};
|
||||||
|
|
||||||
class RscUnitInfo_AH64D_gunner {
|
class RscUnitInfo_AH64D_gunner {
|
||||||
onLoad = QUOTE(uiNamespace setVariable [ARR_2('ACE_dlgAircraft', _this select 0)]; [ARR_2('infoDisplayChanged', [ARR_2(_this select 0, 'Aircraft')])] call FUNC(localEvent););
|
onLoad = QUOTE(uiNamespace setVariable [ARR_2('ACE_dlgAircraft', _this select 0)]; [ARR_2('ace_infoDisplayChanged', [ARR_2(_this select 0, 'Aircraft')])] call CBA_fnc_localEvent;);
|
||||||
};
|
};
|
||||||
|
|
||||||
class RscUnitInfoUAV {
|
class RscUnitInfoUAV {
|
||||||
onLoad = QUOTE(uiNamespace setVariable [ARR_2('ACE_dlgUAV', _this select 0)]; [ARR_2('infoDisplayChanged', [ARR_2(_this select 0, 'UAV')])] call FUNC(localEvent););
|
onLoad = QUOTE(uiNamespace setVariable [ARR_2('ACE_dlgUAV', _this select 0)]; [ARR_2('ace_infoDisplayChanged', [ARR_2(_this select 0, 'UAV')])] call CBA_fnc_localEvent;);
|
||||||
};
|
};
|
||||||
|
|
||||||
class RscUnitInfoSubmarine: RscUnitInfo {
|
class RscUnitInfoSubmarine: RscUnitInfo {
|
||||||
onLoad = QUOTE([ARR_4(""onLoad"",_this,""RscUnitInfo"",'IGUI')] call (uinamespace getvariable 'BIS_fnc_initDisplay'); uiNamespace setVariable [ARR_2('ACE_dlgSubmarine', _this select 0)]; [ARR_2('infoDisplayChanged', [ARR_2(_this select 0, 'Submarine')])] call FUNC(localEvent););
|
onLoad = QUOTE([ARR_4(""onLoad"",_this,""RscUnitInfo"",'IGUI')] call (uinamespace getvariable 'BIS_fnc_initDisplay'); uiNamespace setVariable [ARR_2('ACE_dlgSubmarine', _this select 0)]; [ARR_2('ace_infoDisplayChanged', [ARR_2(_this select 0, 'Submarine')])] call CBA_fnc_localEvent;);
|
||||||
};
|
};
|
||||||
|
|
||||||
class RscUnitInfoShip: RscUnitInfo {
|
class RscUnitInfoShip: RscUnitInfo {
|
||||||
onLoad = QUOTE([ARR_4(""onLoad"",_this,""RscUnitInfo"",'IGUI')] call (uinamespace getvariable 'BIS_fnc_initDisplay'); uiNamespace setVariable [ARR_2('ACE_dlgShip', _this select 0)]; [ARR_2('infoDisplayChanged', [ARR_2(_this select 0, 'Ship')])] call FUNC(localEvent););
|
onLoad = QUOTE([ARR_4(""onLoad"",_this,""RscUnitInfo"",'IGUI')] call (uinamespace getvariable 'BIS_fnc_initDisplay'); uiNamespace setVariable [ARR_2('ACE_dlgShip', _this select 0)]; [ARR_2('ace_infoDisplayChanged', [ARR_2(_this select 0, 'Ship')])] call CBA_fnc_localEvent;);
|
||||||
};
|
};
|
||||||
|
|
||||||
class RscWeaponEmpty {
|
class RscWeaponEmpty {
|
||||||
onLoad = QUOTE([ARR_2('infoDisplayChanged', [ARR_2(_this select 0, 'Any')])] call FUNC(localEvent););
|
onLoad = QUOTE([ARR_2('ace_infoDisplayChanged', [ARR_2(_this select 0, 'Any')])] call CBA_fnc_localEvent;);
|
||||||
};
|
};
|
||||||
|
|
||||||
class RscWeaponRangeFinder {
|
class RscWeaponRangeFinder {
|
||||||
onLoad = QUOTE([ARR_2('infoDisplayChanged', [ARR_2(_this select 0, 'Any')])] call FUNC(localEvent););
|
onLoad = QUOTE([ARR_2('ace_infoDisplayChanged', [ARR_2(_this select 0, 'Any')])] call CBA_fnc_localEvent;);
|
||||||
};
|
};
|
||||||
|
|
||||||
class RscWeaponRangeArtillery {
|
class RscWeaponRangeArtillery {
|
||||||
onLoad = QUOTE(uiNamespace setVariable [ARR_2('ACE_dlgArtillery', _this select 0)]; [ARR_2('infoDisplayChanged', [ARR_2(_this select 0, 'Artillery')])] call FUNC(localEvent););
|
onLoad = QUOTE(uiNamespace setVariable [ARR_2('ACE_dlgArtillery', _this select 0)]; [ARR_2('ace_infoDisplayChanged', [ARR_2(_this select 0, 'Artillery')])] call CBA_fnc_localEvent;);
|
||||||
};
|
};
|
||||||
|
|
||||||
class RscWeaponRangeArtilleryAuto {
|
class RscWeaponRangeArtilleryAuto {
|
||||||
onLoad = QUOTE(uiNamespace setVariable [ARR_2('ACE_dlgArtillery', _this select 0)]; [ARR_2('infoDisplayChanged', [ARR_2(_this select 0, 'Artillery')])] call FUNC(localEvent););
|
onLoad = QUOTE(uiNamespace setVariable [ARR_2('ACE_dlgArtillery', _this select 0)]; [ARR_2('ace_infoDisplayChanged', [ARR_2(_this select 0, 'Artillery')])] call CBA_fnc_localEvent;);
|
||||||
};
|
};
|
||||||
|
|
||||||
class RscWeaponRangeFinderPAS13 {
|
class RscWeaponRangeFinderPAS13 {
|
||||||
onLoad = QUOTE([ARR_2('infoDisplayChanged', [ARR_2(_this select 0, 'Any')])] call FUNC(localEvent););
|
onLoad = QUOTE([ARR_2('ace_infoDisplayChanged', [ARR_2(_this select 0, 'Any')])] call CBA_fnc_localEvent;);
|
||||||
};
|
};
|
||||||
|
|
||||||
class RscOptics_LaserDesignator {
|
class RscOptics_LaserDesignator {
|
||||||
onLoad = QUOTE([ARR_2('infoDisplayChanged', [ARR_2(_this select 0, 'Any')])] call FUNC(localEvent););
|
onLoad = QUOTE([ARR_2('ace_infoDisplayChanged', [ARR_2(_this select 0, 'Any')])] call CBA_fnc_localEvent;);
|
||||||
};
|
};
|
||||||
|
|
||||||
class RscWeaponRangeFinderMAAWS {
|
class RscWeaponRangeFinderMAAWS {
|
||||||
onLoad = QUOTE([ARR_2('infoDisplayChanged', [ARR_2(_this select 0, 'Any')])] call FUNC(localEvent););
|
onLoad = QUOTE([ARR_2('ace_infoDisplayChanged', [ARR_2(_this select 0, 'Any')])] call CBA_fnc_localEvent;);
|
||||||
};
|
};
|
||||||
|
|
||||||
class RscWeaponRangeFinderAbramsCom {
|
class RscWeaponRangeFinderAbramsCom {
|
||||||
onLoad = QUOTE([ARR_2('infoDisplayChanged', [ARR_2(_this select 0, 'Any')])] call FUNC(localEvent););
|
onLoad = QUOTE([ARR_2('ace_infoDisplayChanged', [ARR_2(_this select 0, 'Any')])] call CBA_fnc_localEvent;);
|
||||||
};
|
};
|
||||||
|
|
||||||
class RscWeaponRangeFinderAbramsGun {
|
class RscWeaponRangeFinderAbramsGun {
|
||||||
onLoad = QUOTE([ARR_2('infoDisplayChanged', [ARR_2(_this select 0, 'Any')])] call FUNC(localEvent););
|
onLoad = QUOTE([ARR_2('ace_infoDisplayChanged', [ARR_2(_this select 0, 'Any')])] call CBA_fnc_localEvent;);
|
||||||
};
|
};
|
||||||
|
|
||||||
class RscWeaponRangeFinderStrykerMGSGun {
|
class RscWeaponRangeFinderStrykerMGSGun {
|
||||||
onLoad = QUOTE([ARR_2('infoDisplayChanged', [ARR_2(_this select 0, 'Any')])] call FUNC(localEvent););
|
onLoad = QUOTE([ARR_2('ace_infoDisplayChanged', [ARR_2(_this select 0, 'Any')])] call CBA_fnc_localEvent;);
|
||||||
};
|
};
|
||||||
|
|
||||||
class RscOptics_strider_commander {
|
class RscOptics_strider_commander {
|
||||||
onLoad = QUOTE([ARR_2('infoDisplayChanged', [ARR_2(_this select 0, 'Any')])] call FUNC(localEvent););
|
onLoad = QUOTE([ARR_2('ace_infoDisplayChanged', [ARR_2(_this select 0, 'Any')])] call CBA_fnc_localEvent;);
|
||||||
};
|
};
|
||||||
|
|
||||||
class RscOptics_titan {
|
class RscOptics_titan {
|
||||||
onLoad = QUOTE([ARR_2('infoDisplayChanged', [ARR_2(_this select 0, 'Any')])] call FUNC(localEvent););
|
onLoad = QUOTE([ARR_2('ace_infoDisplayChanged', [ARR_2(_this select 0, 'Any')])] call CBA_fnc_localEvent;);
|
||||||
};
|
};
|
||||||
|
|
||||||
class RscOptics_punisher {
|
class RscOptics_punisher {
|
||||||
onLoad = QUOTE([ARR_2('infoDisplayChanged', [ARR_2(_this select 0, 'Any')])] call FUNC(localEvent););
|
onLoad = QUOTE([ARR_2('ace_infoDisplayChanged', [ARR_2(_this select 0, 'Any')])] call CBA_fnc_localEvent;);
|
||||||
};
|
};
|
||||||
|
|
||||||
class RscOptics_SDV_periscope {
|
class RscOptics_SDV_periscope {
|
||||||
onLoad = QUOTE([ARR_2('infoDisplayChanged', [ARR_2(_this select 0, 'Any')])] call FUNC(localEvent););
|
onLoad = QUOTE([ARR_2('ace_infoDisplayChanged', [ARR_2(_this select 0, 'Any')])] call CBA_fnc_localEvent;);
|
||||||
};
|
};
|
||||||
|
|
||||||
class RscUnitInfoParachute: RscUnitInfo {
|
class RscUnitInfoParachute: RscUnitInfo {
|
||||||
onLoad = QUOTE([ARR_4(""onLoad"",_this,""RscUnitInfo"",'IGUI')] call (uinamespace getvariable 'BIS_fnc_initDisplay'); uiNamespace setVariable [ARR_2('ACE_dlgParachute', _this select 0)]; [ARR_2('infoDisplayChanged', [ARR_2(_this select 0, 'Parachute')])] call FUNC(localEvent););
|
onLoad = QUOTE([ARR_4(""onLoad"",_this,""RscUnitInfo"",'IGUI')] call (uinamespace getvariable 'BIS_fnc_initDisplay'); uiNamespace setVariable [ARR_2('ACE_dlgParachute', _this select 0)]; [ARR_2('ace_infoDisplayChanged', [ARR_2(_this select 0, 'Parachute')])] call CBA_fnc_localEvent;);
|
||||||
};
|
};
|
||||||
|
|
||||||
class RscUnitVehicle {
|
class RscUnitVehicle {
|
||||||
onLoad = QUOTE([ARR_2('infoDisplayChanged', [ARR_2(_this select 0, 'Any')])] call FUNC(localEvent););
|
onLoad = QUOTE([ARR_2('ace_infoDisplayChanged', [ARR_2(_this select 0, 'Any')])] call CBA_fnc_localEvent;);
|
||||||
};
|
};
|
||||||
|
|
||||||
class RscOptics_LaserDesignator_02 {
|
class RscOptics_LaserDesignator_02 {
|
||||||
onLoad = QUOTE([ARR_2('infoDisplayChanged', [ARR_2(_this select 0, 'Any')])] call FUNC(localEvent););
|
onLoad = QUOTE([ARR_2('ace_infoDisplayChanged', [ARR_2(_this select 0, 'Any')])] call CBA_fnc_localEvent;);
|
||||||
};
|
};
|
||||||
|
|
||||||
class RscStaminaBar {
|
class RscStaminaBar {
|
||||||
@ -113,6 +113,6 @@ class RscInGameUI {
|
|||||||
};
|
};
|
||||||
|
|
||||||
class RscStanceInfo {
|
class RscStanceInfo {
|
||||||
onLoad = QUOTE([ARR_4(""onLoad"",_this,""RscStanceInfo"",'IGUI')] call (uinamespace getvariable 'BIS_fnc_initDisplay'); [ARR_2('infoDisplayChanged', [ARR_2(_this select 0, 'Stance')])] call FUNC(localEvent););
|
onLoad = QUOTE([ARR_4(""onLoad"",_this,""RscStanceInfo"",'IGUI')] call (uinamespace getvariable 'BIS_fnc_initDisplay'); [ARR_2('ace_infoDisplayChanged', [ARR_2(_this select 0, 'Stance')])] call CBA_fnc_localEvent;);
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
@ -236,7 +236,6 @@ PREP(dumpPerformanceCounters);
|
|||||||
PREP(dumpArray);
|
PREP(dumpArray);
|
||||||
|
|
||||||
PREP(globalEvent);
|
PREP(globalEvent);
|
||||||
PREP(_handleNetEvent);
|
|
||||||
PREP(addEventHandler);
|
PREP(addEventHandler);
|
||||||
PREP(objectEvent);
|
PREP(objectEvent);
|
||||||
PREP(targetEvent);
|
PREP(targetEvent);
|
||||||
|
@ -18,29 +18,29 @@
|
|||||||
//////////////////////////////////////////////////
|
//////////////////////////////////////////////////
|
||||||
|
|
||||||
//Status Effect EHs:
|
//Status Effect EHs:
|
||||||
["setStatusEffect", {_this call FUNC(statusEffect_set)}] call FUNC(addEventHandler);
|
[QGVAR(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);
|
["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);
|
["blockSprint", false, []] call FUNC(statusEffect_addType);
|
||||||
["setCaptive", true, [QEGVAR(captives,Handcuffed), QEGVAR(captives,Surrendered), QEGVAR(medical,unconscious)]] call FUNC(statusEffect_addType);
|
["setCaptive", true, [QEGVAR(captives,Handcuffed), QEGVAR(captives,Surrendered), "ace_unconscious"]] call FUNC(statusEffect_addType);
|
||||||
["blockDamage", false, ["fixCollision"]] call FUNC(statusEffect_addType);
|
["blockDamage", false, ["fixCollision"]] call FUNC(statusEffect_addType);
|
||||||
["blockEngine", false, ["ACE_Refuel"]] call FUNC(statusEffect_addType);
|
["blockEngine", false, ["ACE_Refuel"]] call FUNC(statusEffect_addType);
|
||||||
|
|
||||||
["forceWalk", {
|
[QGVAR(forceWalk), {
|
||||||
params ["_object", "_set"];
|
params ["_object", "_set"];
|
||||||
TRACE_2("forceWalk EH",_object,_set);
|
TRACE_2("forceWalk EH",_object,_set);
|
||||||
_object forceWalk (_set > 0);
|
_object forceWalk (_set > 0);
|
||||||
}] call FUNC(addEventHandler);
|
}] call CBA_fnc_addEventHandler;
|
||||||
["blockSprint", { //Name reversed from `allowSprint` because we want NOR logic
|
[QGVAR(blockSprint), { //Name reversed from `allowSprint` because we want NOR logic
|
||||||
params ["_object", "_set"];
|
params ["_object", "_set"];
|
||||||
TRACE_2("blockSprint EH",_object,_set);
|
TRACE_2("blockSprint EH",_object,_set);
|
||||||
_object allowSprint (_set == 0);
|
_object allowSprint (_set == 0);
|
||||||
}] call FUNC(addEventHandler);
|
}] call CBA_fnc_addEventHandler;
|
||||||
["setCaptive", {
|
[QGVAR(setCaptive), {
|
||||||
params ["_object", "_set"];
|
params ["_object", "_set"];
|
||||||
TRACE_2("setCaptive EH",_object,_set);
|
TRACE_2("setCaptive EH",_object,_set);
|
||||||
_object setCaptive (_set > 0);
|
_object setCaptive (_set > 0);
|
||||||
}] call FUNC(addEventHandler);
|
}] call CBA_fnc_addEventHandler;
|
||||||
["blockDamage", { //Name reversed from `allowDamage` because we want NOR logic
|
[QGVAR(blockDamage), { //Name reversed from `allowDamage` because we want NOR logic
|
||||||
params ["_object", "_set"];
|
params ["_object", "_set"];
|
||||||
if ((_object isKindOf "CAManBase") && {(["ace_medical"] call FUNC(isModLoaded))}) then {
|
if ((_object isKindOf "CAManBase") && {(["ace_medical"] call FUNC(isModLoaded))}) then {
|
||||||
TRACE_2("blockDamage EH (using medical)",_object,_set);
|
TRACE_2("blockDamage EH (using medical)",_object,_set);
|
||||||
@ -49,12 +49,12 @@
|
|||||||
TRACE_2("blockDamage EH (using allowDamage)",_object,_set);
|
TRACE_2("blockDamage EH (using allowDamage)",_object,_set);
|
||||||
_object allowDamage (_set == 0);
|
_object allowDamage (_set == 0);
|
||||||
};
|
};
|
||||||
}] call FUNC(addEventHandler);
|
}] call CBA_fnc_addEventHandler;
|
||||||
["blockEngine", {
|
[QGVAR(blockEngine), {
|
||||||
params ["_vehicle", "_set"];
|
params ["_vehicle", "_set"];
|
||||||
_vehicle setVariable [QGVAR(blockEngine), _set > 0, true];
|
_vehicle setVariable [QGVAR(blockEngine), _set > 0, true];
|
||||||
_vehicle engineOn false;
|
_vehicle engineOn false;
|
||||||
}] call FUNC(addEventHandler);
|
}] call CBA_fnc_addEventHandler;
|
||||||
|
|
||||||
//Add a fix for BIS's zeus remoteControl module not reseting variables on DC when RC a unit
|
//Add a fix for BIS's zeus remoteControl module not reseting variables on DC when RC a unit
|
||||||
//This variable is used for isPlayer checks
|
//This variable is used for isPlayer checks
|
||||||
@ -75,7 +75,7 @@ if (isServer) then {
|
|||||||
};
|
};
|
||||||
|
|
||||||
// Listens for global "SettingChanged" events, to update the force status locally
|
// Listens for global "SettingChanged" events, to update the force status locally
|
||||||
["SettingChanged", {
|
["ace_settingChanged", {
|
||||||
params ["_name", "_value", "_force"];
|
params ["_name", "_value", "_force"];
|
||||||
|
|
||||||
if (_force) then {
|
if (_force) then {
|
||||||
@ -85,46 +85,54 @@ if (isServer) then {
|
|||||||
|
|
||||||
_settingData set [6, _force];
|
_settingData set [6, _force];
|
||||||
};
|
};
|
||||||
}] call FUNC(addEventhandler);
|
}] call CBA_fnc_addEventHandler;
|
||||||
|
|
||||||
|
|
||||||
// Event to log Fix Headbug output
|
// Event to log Fix Headbug output
|
||||||
["HeadbugFixUsed", {
|
[QGVAR(headbugFixUsed), {
|
||||||
params ["_profileName", "_animation"];
|
params ["_profileName", "_animation"];
|
||||||
ACE_LOGINFO_2("Headbug Used: Name: %1, Animation: %2",_profileName,_animation);
|
ACE_LOGINFO_2("Headbug Used: Name: %1, Animation: %2",_profileName,_animation);
|
||||||
}] call FUNC(addEventHandler);
|
}] call CBA_fnc_addEventHandler;
|
||||||
|
|
||||||
["fixCollision", FUNC(fixCollision)] call FUNC(addEventhandler);
|
[QGVAR(fixCollision), FUNC(fixCollision)] call CBA_fnc_addEventHandler;
|
||||||
["fixFloating", FUNC(fixFloating)] call FUNC(addEventhandler);
|
[QGVAR(fixFloating), FUNC(fixFloating)] call CBA_fnc_addEventHandler;
|
||||||
["fixPosition", FUNC(fixPosition)] call FUNC(addEventhandler);
|
[QGVAR(fixPosition), FUNC(fixPosition)] call CBA_fnc_addEventHandler;
|
||||||
|
|
||||||
["loadPersonEvent", FUNC(loadPersonLocal)] call FUNC(addEventhandler);
|
["ace_loadPersonEvent", FUNC(loadPersonLocal)] call CBA_fnc_addEventHandler;
|
||||||
["unloadPersonEvent", FUNC(unloadPersonLocal)] call FUNC(addEventhandler);
|
["ace_unloadPersonEvent", FUNC(unloadPersonLocal)] call CBA_fnc_addEventHandler;
|
||||||
|
|
||||||
["lockVehicle", {
|
[QGVAR(lockVehicle), {
|
||||||
_this setVariable [QGVAR(lockStatus), locked _this];
|
_this setVariable [QGVAR(lockStatus), locked _this];
|
||||||
_this lock 2;
|
_this lock 2;
|
||||||
}] call FUNC(addEventhandler);
|
}] call CBA_fnc_addEventHandler;
|
||||||
|
|
||||||
["unlockVehicle", {
|
[QGVAR(unlockVehicle), {
|
||||||
_this lock (_this getVariable [QGVAR(lockStatus), locked _this]);
|
_this lock (_this getVariable [QGVAR(lockStatus), locked _this]);
|
||||||
}] call FUNC(addEventhandler);
|
}] call CBA_fnc_addEventHandler;
|
||||||
|
|
||||||
["setDir", {(_this select 0) setDir (_this select 1)}] call FUNC(addEventhandler);
|
[QGVAR(setDir), {(_this select 0) setDir (_this select 1)}] call CBA_fnc_addEventHandler;
|
||||||
["setFuel", {(_this select 0) setFuel (_this select 1)}] call FUNC(addEventhandler);
|
[QGVAR(setFuel), {(_this select 0) setFuel (_this select 1)}] call CBA_fnc_addEventHandler;
|
||||||
["engineOn", {(_this select 0) engineOn (_this select 1)}] call FUNC(addEventhandler);
|
[QGVAR(engineOn), {(_this select 0) engineOn (_this select 1)}] call CBA_fnc_addEventHandler;
|
||||||
["setSpeaker", {(_this select 0) setSpeaker (_this select 1)}] call FUNC(addEventhandler);
|
[QGVAR(setSpeaker), {(_this select 0) setSpeaker (_this select 1)}] call CBA_fnc_addEventHandler;
|
||||||
["selectLeader", {(_this select 0) selectLeader (_this select 1)}] call FUNC(addEventHandler);
|
[QGVAR(selectLeader), {(_this select 0) selectLeader (_this select 1)}] call CBA_fnc_addEventHandler;
|
||||||
["setVelocity", {(_this select 0) setVelocity (_this select 1)}] call FUNC(addEventHandler);
|
[QGVAR(setVelocity), {(_this select 0) setVelocity (_this select 1)}] call CBA_fnc_addEventHandler;
|
||||||
["playMove", {(_this select 0) playMove (_this select 1)}] call FUNC(addEventHandler);
|
[QGVAR(playMove), {(_this select 0) playMove (_this select 1)}] call CBA_fnc_addEventHandler;
|
||||||
["playMoveNow", {(_this select 0) playMoveNow (_this select 1)}] call FUNC(addEventHandler);
|
[QGVAR(playMoveNow), {(_this select 0) playMoveNow (_this select 1)}] call CBA_fnc_addEventHandler;
|
||||||
["switchMove", {(_this select 0) switchMove (_this select 1)}] call FUNC(addEventHandler);
|
[QGVAR(switchMove), {(_this select 0) switchMove (_this select 1)}] call CBA_fnc_addEventHandler;
|
||||||
["setVectorDirAndUp", {(_this select 0) setVectorDirAndUp (_this select 1)}] call FUNC(addEventHandler);
|
[QGVAR(setVectorDirAndUp), {(_this select 0) setVectorDirAndUp (_this select 1)}] call CBA_fnc_addEventHandler;
|
||||||
["setVanillaHitPointDamage", {(_this select 0) setHitPointDamage (_this select 1)}] call FUNC(addEventHandler);
|
[QGVAR(setVanillaHitPointDamage), {(_this select 0) setHitPointDamage (_this select 1)}] call CBA_fnc_addEventHandler;
|
||||||
|
|
||||||
|
// Request framework
|
||||||
|
[QGVAR(requestCallback), FUNC(requestCallback)] call CBA_fnc_addEventHandler;
|
||||||
|
[QGVAR(receiveRequest), FUNC(receiveRequest)] call CBA_fnc_addEventHandler;
|
||||||
|
|
||||||
|
[QGVAR(systemChatGlobal), {systemChat _this}] call CBA_fnc_addEventHandler;
|
||||||
|
|
||||||
if (isServer) then {
|
if (isServer) then {
|
||||||
["hideObjectGlobal", {(_this select 0) hideObjectGlobal (_this select 1)}] call FUNC(addEventHandler);
|
[QGVAR(hideObjectGlobal), {(_this select 0) hideObjectGlobal (_this select 1)}] call CBA_fnc_addEventHandler;
|
||||||
["enableSimulationGlobal", {(_this select 0) enableSimulationGlobal (_this select 1)}] call FUNC(addEventHandler);
|
[QGVAR(enableSimulationGlobal), {(_this select 0) enableSimulationGlobal (_this select 1)}] call CBA_fnc_addEventHandler;
|
||||||
|
["ace_setOwner", {(_this select 0) setOwner (_this select 1)}] call CBA_fnc_addEventHandler;
|
||||||
|
[QGVAR(serverLog), FUNC(serverLog)] call CBA_fnc_addEventHandler;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
@ -132,23 +140,19 @@ if (isServer) then {
|
|||||||
// Set up remote execution
|
// Set up remote execution
|
||||||
//////////////////////////////////////////////////
|
//////////////////////////////////////////////////
|
||||||
|
|
||||||
// ACE events
|
|
||||||
"ACEg" addPublicVariableEventHandler {_this call FUNC(_handleNetEvent)};
|
|
||||||
"ACEc" addPublicVariableEventHandler {_this call FUNC(_handleNetEvent)};
|
|
||||||
|
|
||||||
// Synced ACE events
|
// Synced ACE events
|
||||||
// Handle JIP scenario
|
// Handle JIP scenario
|
||||||
if (!isServer) then {
|
if (!isServer) then {
|
||||||
["PlayerJip", {
|
["ace_playerJIP", {
|
||||||
ACE_LOGINFO("JIP event synchronization initialized");
|
ACE_LOGINFO("JIP event synchronization initialized");
|
||||||
["SEH_all", [player]] call FUNC(serverEvent);
|
["ACEa", [player]] call CBA_fnc_serverEvent;
|
||||||
}] call FUNC(addEventHandler);
|
}] call CBA_fnc_addEventHandler;
|
||||||
} else {
|
} else {
|
||||||
["SEH_all", FUNC(_handleRequestAllSyncedEvents)] call FUNC(addEventHandler);
|
["ACEa", FUNC(_handleRequestAllSyncedEvents)] call CBA_fnc_addEventHandler;
|
||||||
};
|
};
|
||||||
|
|
||||||
["SEH", FUNC(_handleSyncedEvent)] call FUNC(addEventHandler);
|
["ACEe", FUNC(_handleSyncedEvent)] call CBA_fnc_addEventHandler;
|
||||||
["SEH_s", FUNC(_handleRequestSyncedEvent)] call FUNC(addEventHandler);
|
["ACEs", FUNC(_handleRequestSyncedEvent)] call CBA_fnc_addEventHandler;
|
||||||
|
|
||||||
if (isServer) then {
|
if (isServer) then {
|
||||||
[FUNC(syncedEventPFH), 0.5, []] call CBA_fnc_addPerFrameHandler;
|
[FUNC(syncedEventPFH), 0.5, []] call CBA_fnc_addPerFrameHandler;
|
||||||
@ -181,16 +185,16 @@ call FUNC(checkFiles);
|
|||||||
|
|
||||||
|
|
||||||
//////////////////////////////////////////////////
|
//////////////////////////////////////////////////
|
||||||
// Set up SettingsInitialized eventhandler
|
// Set up ace_settingsInitialized eventhandler
|
||||||
//////////////////////////////////////////////////
|
//////////////////////////////////////////////////
|
||||||
|
|
||||||
["SettingsInitialized", {
|
["ace_settingsInitialized", {
|
||||||
[
|
[
|
||||||
GVAR(checkPBOsAction),
|
GVAR(checkPBOsAction),
|
||||||
GVAR(checkPBOsCheckAll),
|
GVAR(checkPBOsCheckAll),
|
||||||
GVAR(checkPBOsWhitelist)
|
GVAR(checkPBOsWhitelist)
|
||||||
] call FUNC(checkPBOs)
|
] call FUNC(checkPBOs)
|
||||||
}] call FUNC(addEventHandler);
|
}] call CBA_fnc_addEventHandler;
|
||||||
|
|
||||||
// Create a pfh to wait until all postinits are ready and settings are initialized
|
// Create a pfh to wait until all postinits are ready and settings are initialized
|
||||||
[{
|
[{
|
||||||
@ -217,7 +221,7 @@ call FUNC(checkFiles);
|
|||||||
[] call FUNC(readSettingsFromParamsArray);
|
[] call FUNC(readSettingsFromParamsArray);
|
||||||
};
|
};
|
||||||
// Event so that ACE_Modules have their settings loaded:
|
// Event so that ACE_Modules have their settings loaded:
|
||||||
["InitSettingsFromModules", []] call FUNC(localEvent);
|
[QGVAR(initSettingsFromModules), []] call CBA_fnc_localEvent;
|
||||||
|
|
||||||
if (isServer) then {
|
if (isServer) then {
|
||||||
// Publish all settings data after all configs and modules are read
|
// Publish all settings data after all configs and modules are read
|
||||||
@ -233,7 +237,7 @@ call FUNC(checkFiles);
|
|||||||
ACE_LOGINFO("Settings initialized.");
|
ACE_LOGINFO("Settings initialized.");
|
||||||
|
|
||||||
//Event that settings are safe to use:
|
//Event that settings are safe to use:
|
||||||
["SettingsInitialized", []] call FUNC(localEvent);
|
["ace_settingsInitialized", []] call CBA_fnc_localEvent;
|
||||||
|
|
||||||
//Set init finished and run all delayed functions:
|
//Set init finished and run all delayed functions:
|
||||||
GVAR(settingsInitFinished) = true;
|
GVAR(settingsInitFinished) = true;
|
||||||
@ -266,12 +270,21 @@ call FUNC(assignedItemFix);
|
|||||||
enableCamShake true;
|
enableCamShake true;
|
||||||
|
|
||||||
|
|
||||||
|
//FUNC(showHud) needs to be refreshed if it was set during mission init
|
||||||
|
["ace_infoDisplayChanged", {
|
||||||
|
GVAR(showHudHash) params ["", "_masks"];
|
||||||
|
if (!(_masks isEqualTo [])) then {
|
||||||
|
[] call FUNC(showHud);
|
||||||
|
};
|
||||||
|
}] call CBA_fnc_addEventHandler;
|
||||||
|
|
||||||
|
|
||||||
//////////////////////////////////////////////////
|
//////////////////////////////////////////////////
|
||||||
// Eventhandler to set player names
|
// Eventhandler to set player names
|
||||||
//////////////////////////////////////////////////
|
//////////////////////////////////////////////////
|
||||||
|
|
||||||
// Set the name for the current player
|
// Set the name for the current player
|
||||||
["playerChanged", {
|
["ace_playerChanged", {
|
||||||
params ["_newPlayer","_oldPlayer"];
|
params ["_newPlayer","_oldPlayer"];
|
||||||
|
|
||||||
if (alive _newPlayer) then {
|
if (alive _newPlayer) then {
|
||||||
@ -281,7 +294,7 @@ enableCamShake true;
|
|||||||
if (alive _oldPlayer) then {
|
if (alive _oldPlayer) then {
|
||||||
[_oldPlayer] call FUNC(setName);
|
[_oldPlayer] call FUNC(setName);
|
||||||
};
|
};
|
||||||
}] call FUNC(addEventhandler);
|
}] call CBA_fnc_addEventHandler;
|
||||||
|
|
||||||
|
|
||||||
//////////////////////////////////////////////////
|
//////////////////////////////////////////////////
|
||||||
@ -313,7 +326,7 @@ GVAR(OldIsCamera) = false;
|
|||||||
uiNamespace setVariable ["ACE_player", _data];
|
uiNamespace setVariable ["ACE_player", _data];
|
||||||
|
|
||||||
// Raise ACE event locally
|
// Raise ACE event locally
|
||||||
["playerChanged", [ACE_player, _oldPlayer]] call FUNC(localEvent);
|
["ace_playerChanged", [ACE_player, _oldPlayer]] call CBA_fnc_localEvent;
|
||||||
};
|
};
|
||||||
|
|
||||||
// "playerVehicleChanged" event
|
// "playerVehicleChanged" event
|
||||||
@ -321,7 +334,7 @@ GVAR(OldIsCamera) = false;
|
|||||||
if !(_data isEqualTo GVAR(OldPlayerVehicle)) then {
|
if !(_data isEqualTo GVAR(OldPlayerVehicle)) then {
|
||||||
// Raise ACE event locally
|
// Raise ACE event locally
|
||||||
GVAR(OldPlayerVehicle) = _data;
|
GVAR(OldPlayerVehicle) = _data;
|
||||||
["playerVehicleChanged", [ACE_player, _data]] call FUNC(localEvent);
|
["ace_playerVehicleChanged", [ACE_player, _data]] call CBA_fnc_localEvent;
|
||||||
};
|
};
|
||||||
|
|
||||||
// "playerTurretChanged" event
|
// "playerTurretChanged" event
|
||||||
@ -329,7 +342,7 @@ GVAR(OldIsCamera) = false;
|
|||||||
if !(_data isEqualTo GVAR(OldPlayerTurret)) then {
|
if !(_data isEqualTo GVAR(OldPlayerTurret)) then {
|
||||||
// Raise ACE event locally
|
// Raise ACE event locally
|
||||||
GVAR(OldPlayerTurret) = _data;
|
GVAR(OldPlayerTurret) = _data;
|
||||||
["playerTurretChanged", [ACE_player, _data]] call FUNC(localEvent);
|
["ace_playerTurretChanged", [ACE_player, _data]] call CBA_fnc_localEvent;
|
||||||
};
|
};
|
||||||
|
|
||||||
// "playerWeaponChanged" event
|
// "playerWeaponChanged" event
|
||||||
@ -337,7 +350,7 @@ GVAR(OldIsCamera) = false;
|
|||||||
if (_data != GVAR(OldPlayerWeapon)) then {
|
if (_data != GVAR(OldPlayerWeapon)) then {
|
||||||
// Raise ACE event locally
|
// Raise ACE event locally
|
||||||
GVAR(OldPlayerWeapon) = _data;
|
GVAR(OldPlayerWeapon) = _data;
|
||||||
["playerWeaponChanged", [ACE_player, _data]] call FUNC(localEvent);
|
["ace_playerWeaponChanged", [ACE_player, _data]] call CBA_fnc_localEvent;
|
||||||
};
|
};
|
||||||
|
|
||||||
// "playerInventoryChanged" event
|
// "playerInventoryChanged" event
|
||||||
@ -369,7 +382,7 @@ GVAR(OldIsCamera) = false;
|
|||||||
|
|
||||||
if !(_data isEqualTo GVAR(OldPlayerInventoryNoAmmo)) then {
|
if !(_data isEqualTo GVAR(OldPlayerInventoryNoAmmo)) then {
|
||||||
GVAR(OldPlayerInventoryNoAmmo) = _data;
|
GVAR(OldPlayerInventoryNoAmmo) = _data;
|
||||||
["playerInventoryChanged", [ACE_player, [ACE_player, false] call FUNC(getAllGear)]] call FUNC(localEvent);
|
["ace_playerInventoryChanged", [ACE_player, [ACE_player, false] call FUNC(getAllGear)]] call CBA_fnc_localEvent;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -378,7 +391,7 @@ GVAR(OldIsCamera) = false;
|
|||||||
if !(_data isEqualTo GVAR(OldPlayerVisionMode)) then {
|
if !(_data isEqualTo GVAR(OldPlayerVisionMode)) then {
|
||||||
// Raise ACE event locally
|
// Raise ACE event locally
|
||||||
GVAR(OldPlayerVisionMode) = _data;
|
GVAR(OldPlayerVisionMode) = _data;
|
||||||
["playerVisionModeChanged", [ACE_player, _data]] call FUNC(localEvent);
|
["ace_playerVisionModeChanged", [ACE_player, _data]] call CBA_fnc_localEvent;
|
||||||
};
|
};
|
||||||
|
|
||||||
// "cameraViewChanged" event
|
// "cameraViewChanged" event
|
||||||
@ -386,7 +399,7 @@ GVAR(OldIsCamera) = false;
|
|||||||
if !(_data isEqualTo GVAR(OldCameraView)) then {
|
if !(_data isEqualTo GVAR(OldCameraView)) then {
|
||||||
// Raise ACE event locally
|
// Raise ACE event locally
|
||||||
GVAR(OldCameraView) = _data;
|
GVAR(OldCameraView) = _data;
|
||||||
["cameraViewChanged", [ACE_player, _data]] call FUNC(localEvent);
|
["ace_cameraViewChanged", [ACE_player, _data]] call CBA_fnc_localEvent;
|
||||||
};
|
};
|
||||||
|
|
||||||
// "visibleMapChanged" event
|
// "visibleMapChanged" event
|
||||||
@ -394,7 +407,7 @@ GVAR(OldIsCamera) = false;
|
|||||||
if (!_data isEqualTo GVAR(OldVisibleMap)) then {
|
if (!_data isEqualTo GVAR(OldVisibleMap)) then {
|
||||||
// Raise ACE event locally
|
// Raise ACE event locally
|
||||||
GVAR(OldVisibleMap) = _data;
|
GVAR(OldVisibleMap) = _data;
|
||||||
["visibleMapChanged", [ACE_player, _data]] call FUNC(localEvent);
|
["ace_visibleMapChanged", [ACE_player, _data]] call CBA_fnc_localEvent;
|
||||||
};
|
};
|
||||||
|
|
||||||
// "activeCameraChanged" event
|
// "activeCameraChanged" event
|
||||||
@ -402,7 +415,7 @@ GVAR(OldIsCamera) = false;
|
|||||||
if !(_data isEqualTo GVAR(OldIsCamera)) then {
|
if !(_data isEqualTo GVAR(OldIsCamera)) then {
|
||||||
// Raise ACE event locally
|
// Raise ACE event locally
|
||||||
GVAR(OldIsCamera) = _data;
|
GVAR(OldIsCamera) = _data;
|
||||||
["activeCameraChanged", [ACE_player, _data]] call FUNC(localEvent);
|
["ace_activeCameraChanged", [ACE_player, _data]] call CBA_fnc_localEvent;
|
||||||
};
|
};
|
||||||
|
|
||||||
END_COUNTER(stateChecker);
|
END_COUNTER(stateChecker);
|
||||||
@ -413,18 +426,18 @@ GVAR(OldIsCamera) = false;
|
|||||||
// Eventhandlers for player controlled machines
|
// Eventhandlers for player controlled machines
|
||||||
//////////////////////////////////////////////////
|
//////////////////////////////////////////////////
|
||||||
|
|
||||||
["displayTextStructured", {_this call FUNC(displayTextStructured)}] call FUNC(addEventhandler);
|
[QGVAR(displayTextStructured), {_this call FUNC(displayTextStructured)}] call CBA_fnc_addEventHandler;
|
||||||
["displayTextPicture", {_this call FUNC(displayTextPicture)}] call FUNC(addEventhandler);
|
[QGVAR(displayTextPicture), {_this call FUNC(displayTextPicture)}] call CBA_fnc_addEventHandler;
|
||||||
|
|
||||||
["medical_onUnconscious", {
|
["ace_unconscious", {
|
||||||
params ["_unit", "_isUnconscious"];
|
params ["_unit", "_isUnconscious"];
|
||||||
|
|
||||||
if (local _unit && {!_isUnconscious}) then {
|
if (local _unit && {!_isUnconscious}) then {
|
||||||
[_unit, false, QFUNC(loadPerson), west /* dummy side */] call FUNC(switchToGroupSide);
|
[_unit, false, QFUNC(loadPerson), west /* dummy side */] call FUNC(switchToGroupSide);
|
||||||
};
|
};
|
||||||
}] call FUNC(addEventhandler);
|
}] call CBA_fnc_addEventHandler;
|
||||||
|
|
||||||
["useItem", DFUNC(useItem)] call FUNC(addEventHandler);
|
["ace_useItem", DFUNC(useItem)] call CBA_fnc_addEventHandler;
|
||||||
|
|
||||||
|
|
||||||
//////////////////////////////////////////////////
|
//////////////////////////////////////////////////
|
||||||
@ -462,7 +475,7 @@ if (didJip) then {
|
|||||||
// We are jipping! Get ready and wait, and throw the event
|
// We are jipping! Get ready and wait, and throw the event
|
||||||
[{
|
[{
|
||||||
if(!isNull player && GVAR(settingsInitFinished)) then {
|
if(!isNull player && GVAR(settingsInitFinished)) then {
|
||||||
["PlayerJip", [player]] call FUNC(localEvent);
|
["ace_playerJIP", [player]] call CBA_fnc_localEvent;
|
||||||
[_this select 1] call CBA_fnc_removePerFrameHandler;
|
[_this select 1] call CBA_fnc_removePerFrameHandler;
|
||||||
};
|
};
|
||||||
}, 0, []] call CBA_fnc_addPerFrameHandler;
|
}, 0, []] call CBA_fnc_addPerFrameHandler;
|
||||||
|
@ -5,10 +5,6 @@ ADDON = false;
|
|||||||
|
|
||||||
#include "XEH_PREP.hpp"
|
#include "XEH_PREP.hpp"
|
||||||
|
|
||||||
//ACE events global variables
|
|
||||||
GVAR(eventsLocation) = createLocation ["ACE_HashLocation", [-10000,-10000,-10000], 0, 0];
|
|
||||||
GVAR(eventsLocation) setText QGVAR(eventsLocation);
|
|
||||||
|
|
||||||
// backwards comp
|
// backwards comp
|
||||||
DFUNC(canUseWeapon) = {
|
DFUNC(canUseWeapon) = {
|
||||||
ACE_DEPRECATED("ace_common_fnc_canUseWeapon","3.7.0","CBA_fnc_canUseWeapon");
|
ACE_DEPRECATED("ace_common_fnc_canUseWeapon","3.7.0","CBA_fnc_canUseWeapon");
|
||||||
|
@ -13,6 +13,70 @@ class CfgPatches {
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// This class will be deprecated in version 3.8.0
|
||||||
|
class ACE_newEvents {
|
||||||
|
// Status effect events
|
||||||
|
forceWalk = QGVAR(forceWalk);
|
||||||
|
blockSprint = QGVAR(blockSprint);
|
||||||
|
setCaptive = QGVAR(setCaptive);
|
||||||
|
blockDamage = QGVAR(blockDamage);
|
||||||
|
blockEngine = QGVAR(blockEngine);
|
||||||
|
|
||||||
|
// Public listenable events
|
||||||
|
PlayerJip = "ace_playerJIP";
|
||||||
|
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";
|
||||||
|
SettingChanged = "ace_settingChanged";
|
||||||
|
firedNonPlayerVehicle = "ace_firedNonPlayerVehicle";
|
||||||
|
firedPlayerVehicleNonLocal = "ace_firedPlayerVehicleNonLocal";
|
||||||
|
firedPlayerVehicle = "ace_firedPlayerVehicle";
|
||||||
|
firedNonPlayer = "ace_firedNonPlayer";
|
||||||
|
firedPlayerNonLocal = "ace_firedPlayerNonLocal";
|
||||||
|
firedPlayer = "ace_firedPlayer";
|
||||||
|
unloadPersonEvent = "ace_unloadPersonEvent";
|
||||||
|
loadPersonEvent = "ace_loadPersonEvent";
|
||||||
|
useItem = "ace_useItem";
|
||||||
|
infoDisplayChanged = "ace_infoDisplayChanged";
|
||||||
|
|
||||||
|
// Internal callable events
|
||||||
|
setStatusEffect = QGVAR(setStatusEffect);
|
||||||
|
HeadbugFixUsed = QGVAR(headbugFixUsed);
|
||||||
|
InitSettingsFromModules = QGVAR(initSettingsFromModules);
|
||||||
|
enableSimulationGlobal = QGVAR(enableSimulationGlobal);
|
||||||
|
hideObjectGlobal = QGVAR(hideObjectGlobal);
|
||||||
|
fixPosition = QGVAR(fixPosition);
|
||||||
|
fixFloating = QGVAR(fixFloating);
|
||||||
|
fixCollision = QGVAR(fixCollision);
|
||||||
|
unlockVehicle = QGVAR(unlockVehicle);
|
||||||
|
lockVehicle = QGVAR(lockVehicle);
|
||||||
|
displayTextPicture = QGVAR(displayTextPicture);
|
||||||
|
displayTextStructured = QGVAR(displayTextStructured);
|
||||||
|
setVanillaHitPointDamage = QGVAR(setVanillaHitPointDamage);
|
||||||
|
setVectorDirAndUp = QGVAR(setVectorDirAndUp);
|
||||||
|
switchMove = QGVAR(switchMove);
|
||||||
|
playMoveNow = QGVAR(playMoveNow);
|
||||||
|
playMove = QGVAR(playMove);
|
||||||
|
setVelocity = QGVAR(setVelocity);
|
||||||
|
selectLeader = QGVAR(selectLeader);
|
||||||
|
setSpeaker = QGVAR(setSpeaker);
|
||||||
|
engineOn = QGVAR(engineOn);
|
||||||
|
setFuel = QGVAR(setFuel);
|
||||||
|
setDir = QGVAR(setDir);
|
||||||
|
|
||||||
|
// Events framework
|
||||||
|
SEH_s = "ACEs";
|
||||||
|
SEH = "ACEe";
|
||||||
|
SEH_all = "ACEa";
|
||||||
|
};
|
||||||
|
|
||||||
#include "CfgEventHandlers.hpp"
|
#include "CfgEventHandlers.hpp"
|
||||||
|
|
||||||
#include "CfgLocationTypes.hpp"
|
#include "CfgLocationTypes.hpp"
|
||||||
|
@ -1,81 +0,0 @@
|
|||||||
/*
|
|
||||||
* Author: jaynus
|
|
||||||
* Internal net event handler.
|
|
||||||
*
|
|
||||||
* Arguments:
|
|
||||||
* None
|
|
||||||
*
|
|
||||||
* Return Value:
|
|
||||||
* None
|
|
||||||
*
|
|
||||||
* Public: No
|
|
||||||
*/
|
|
||||||
#include "script_component.hpp"
|
|
||||||
|
|
||||||
params ["_eventType", "_event"];
|
|
||||||
|
|
||||||
if (_eventType == "ACEg") then {
|
|
||||||
_event params ["_eventName", "_eventArgs"];
|
|
||||||
|
|
||||||
private _eventFunctions = GVAR(eventsLocation) getVariable _eventName;
|
|
||||||
if (!isNil "_eventFunctions") then {
|
|
||||||
|
|
||||||
#ifdef DEBUG_EVENTS
|
|
||||||
ACE_LOGINFO_1("* Net Event %1",_eventName);
|
|
||||||
ACE_LOGINFO_1(" args=%1",_eventArgs);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
{
|
|
||||||
if (!isNil "_x") then {
|
|
||||||
_eventArgs call CALLSTACK_NAMED(_x, FORMAT_2("Net Event %1 ID: %2",_eventName,_forEachIndex));
|
|
||||||
#ifdef DEBUG_EVENTS_CALLSTACK
|
|
||||||
ACE_LOGINFO_1(" ID: %1",_forEachIndex);
|
|
||||||
#endif
|
|
||||||
};
|
|
||||||
} forEach _eventFunctions;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
if (_eventType == "ACEc") then {
|
|
||||||
if (isServer) then {
|
|
||||||
_event params ["_eventName", "_eventTargets", "_eventArgs"];
|
|
||||||
|
|
||||||
private _sentEvents = [];
|
|
||||||
|
|
||||||
if (!IS_ARRAY(_eventTargets)) then {
|
|
||||||
_eventTargets = [_eventTargets];
|
|
||||||
};
|
|
||||||
|
|
||||||
//If not multiplayer, and there are targets, then just run localy
|
|
||||||
if (!isMultiplayer && {count _eventTargets > 0}) exitWith {
|
|
||||||
ACEg = [_eventName, _eventArgs];
|
|
||||||
["ACEg", ACEg] call FUNC(_handleNetEvent);
|
|
||||||
};
|
|
||||||
|
|
||||||
private _serverFlagged = false;
|
|
||||||
|
|
||||||
{
|
|
||||||
private _owner = _x;
|
|
||||||
|
|
||||||
if (IS_OBJECT(_x)) then {
|
|
||||||
_owner = owner _x;
|
|
||||||
};
|
|
||||||
if !(_owner in _sentEvents) then {
|
|
||||||
_sentEvents pushBack _owner;
|
|
||||||
ACEg = [_eventName, _eventArgs];
|
|
||||||
|
|
||||||
if (isDedicated || {_x != ACE_player}) then {
|
|
||||||
if (isDedicated && {local _x} && {!_serverFlagged}) then {
|
|
||||||
_serverFlagged = true;
|
|
||||||
["ACEg", ACEg] call FUNC(_handleNetEvent);
|
|
||||||
} else {
|
|
||||||
_owner publicVariableClient "ACEg";
|
|
||||||
};
|
|
||||||
} else {
|
|
||||||
["ACEg", ACEg] call FUNC(_handleNetEvent);
|
|
||||||
};
|
|
||||||
};
|
|
||||||
false
|
|
||||||
} count _eventTargets;
|
|
||||||
};
|
|
||||||
};
|
|
@ -18,7 +18,7 @@ params ["_client"];
|
|||||||
private _eventEntry = HASH_GET(GVAR(syncedEvents),_x);
|
private _eventEntry = HASH_GET(GVAR(syncedEvents),_x);
|
||||||
_eventEntry params ["", "_eventLog"];
|
_eventEntry params ["", "_eventLog"];
|
||||||
|
|
||||||
["SEH_s", _client, [_x, _eventLog]] call FUNC(targetEvent);
|
["ACEs", [_x, _eventLog], _client] call CBA_fnc_targetEvent;
|
||||||
false
|
false
|
||||||
} count (GVAR(syncedEvents) select 0);
|
} count (GVAR(syncedEvents) select 0);
|
||||||
|
|
||||||
|
@ -30,7 +30,7 @@ if (isServer) then {
|
|||||||
private _eventEntry = HASH_GET(GVAR(syncedEvents),_eventName);
|
private _eventEntry = HASH_GET(GVAR(syncedEvents),_eventName);
|
||||||
_eventEntry params ["", "_eventLog"];
|
_eventEntry params ["", "_eventLog"];
|
||||||
|
|
||||||
["SEH_s", _client, [_eventName, _eventLog]] call FUNC(targetEvent);
|
["ACEs", [_eventName, _eventLog], _client] call CBA_fnc_targetEvent;
|
||||||
} else {
|
} else {
|
||||||
params ["_eventName", "_eventLog"];
|
params ["_eventName", "_eventLog"];
|
||||||
|
|
||||||
|
@ -1,25 +1,14 @@
|
|||||||
/*
|
#define DEBUG_MODE_FULL
|
||||||
* Author: Nou
|
|
||||||
* Add an event handler.
|
|
||||||
*
|
|
||||||
* Arguments:
|
|
||||||
* 0: Event name <STRING>
|
|
||||||
* 1: Event code <CODE>
|
|
||||||
*
|
|
||||||
* Return Value:
|
|
||||||
* Event handler ID number (for use with fnc_removeEventHandler) <NUMBER>
|
|
||||||
*
|
|
||||||
* Public: Yes
|
|
||||||
*/
|
|
||||||
#include "script_component.hpp"
|
#include "script_component.hpp"
|
||||||
|
|
||||||
params ["_eventName", "_eventCode"];
|
params ["_eventName", "_eventCode"];
|
||||||
|
|
||||||
private _eventFunctions = GVAR(eventsLocation) getVariable _eventName;
|
private _newName = getText (configFile >> "ACE_newEvents" >> _eventName);
|
||||||
|
if (_newName != "") then {
|
||||||
if (isNil "_eventFunctions") then {
|
TRACE_2("Switching Names",_eventName,_newName);
|
||||||
_eventFunctions = [];
|
_eventName = _newName;
|
||||||
GVAR(eventsLocation) setVariable [_eventName, _eventFunctions];
|
|
||||||
};
|
};
|
||||||
|
|
||||||
_eventFunctions pushBack _eventCode // Return event function count
|
[_eventName, _eventCode] call CBA_fnc_addEventHandler;
|
||||||
|
|
||||||
|
ACE_DEPRECATED("ace_common_fnc_addEventHandler","3.8.0","CBA_fnc_addEventHandler");
|
||||||
|
@ -37,4 +37,4 @@ missionNamespace setVariable [_name, _value];
|
|||||||
GVAR(settings) pushBack _this;
|
GVAR(settings) pushBack _this;
|
||||||
|
|
||||||
// Raise event locally
|
// Raise event locally
|
||||||
["SettingChanged", [_name, _value]] call FUNC(localEvent);
|
["ace_settingChanged", [_name, _value]] call CBA_fnc_localEvent;
|
||||||
|
@ -24,7 +24,7 @@ if (HASH_HASKEY(GVAR(syncedEvents),_name)) exitWith {
|
|||||||
false
|
false
|
||||||
};
|
};
|
||||||
|
|
||||||
private _eventId = [_name, FUNC(_handleSyncedEvent)] call FUNC(addEventHandler);
|
private _eventId = [_name, FUNC(_handleSyncedEvent)] call CBA_fnc_addEventHandler;
|
||||||
private _data = [_handler, [], _ttl, _eventId];
|
private _data = [_handler, [], _ttl, _eventId];
|
||||||
|
|
||||||
HASH_SET(GVAR(syncedEvents),_name,_data);
|
HASH_SET(GVAR(syncedEvents),_name,_data);
|
||||||
|
@ -28,7 +28,7 @@ GVAR(AssignedItemsShownItems) = [
|
|||||||
ACE_isGPSEnabled
|
ACE_isGPSEnabled
|
||||||
];
|
];
|
||||||
|
|
||||||
["playerInventoryChanged", {
|
["ace_playerInventoryChanged", {
|
||||||
params ["_unit"];
|
params ["_unit"];
|
||||||
|
|
||||||
private _assignedItems = getUnitLoadout _unit param [9, ["","","","","",""]]; // ["ItemMap","ItemGPS","ItemRadio","ItemCompass","ItemWatch","NVGoggles"]
|
private _assignedItems = getUnitLoadout _unit param [9, ["","","","","",""]]; // ["ItemMap","ItemGPS","ItemRadio","ItemCompass","ItemWatch","NVGoggles"]
|
||||||
@ -48,4 +48,4 @@ GVAR(AssignedItemsShownItems) = [
|
|||||||
showWatch _showWatch;
|
showWatch _showWatch;
|
||||||
showRadio _showRadio;
|
showRadio _showRadio;
|
||||||
showGPS (_showGPS || {cameraOn == getConnectedUAV _unit}); //If player is activly controling a UAV, showGPS controls showing the map (m key)
|
showGPS (_showGPS || {cameraOn == getConnectedUAV _unit}); //If player is activly controling a UAV, showGPS controls showing the map (m key)
|
||||||
}] call FUNC(addEventHandler);
|
}] call CBA_fnc_addEventHandler;
|
||||||
|
@ -46,7 +46,7 @@ if ((_namespace getVariable [_uid, [-99999]]) select 0 < diag_tickTime) then {
|
|||||||
} forEach _cacheList;
|
} forEach _cacheList;
|
||||||
// Empty the list
|
// Empty the list
|
||||||
missionNamespace setVariable [_varName, []];
|
missionNamespace setVariable [_varName, []];
|
||||||
}] call FUNC(addEventhandler);
|
}] call CBA_fnc_addEventHandler;
|
||||||
};
|
};
|
||||||
|
|
||||||
// Add this cache to the list of the event
|
// Add this cache to the list of the event
|
||||||
|
@ -61,7 +61,8 @@ if (!isServer) then {
|
|||||||
_error = _error + "Newer version; ";
|
_error = _error + "Newer version; ";
|
||||||
};
|
};
|
||||||
|
|
||||||
//[_error, "{systemChat _this}"] call FUNC(execRemoteFnc);
|
//[QGVAR(systemChatGlobal), _error] call CBA_fnc_globalEvent;
|
||||||
|
|
||||||
ACE_LOGERROR(_error);
|
ACE_LOGERROR(_error);
|
||||||
|
|
||||||
if (_mode < 2) then {
|
if (_mode < 2) then {
|
||||||
|
@ -28,9 +28,9 @@ _target setVariable [QGVAR(owner), _unit, true];
|
|||||||
// lock target object
|
// lock target object
|
||||||
if (_lockTarget) then {
|
if (_lockTarget) then {
|
||||||
if (!isNull _unit) then {
|
if (!isNull _unit) then {
|
||||||
["lockVehicle", _target, _target] call FUNC(targetEvent);
|
[QGVAR(lockVehicle), _target, _target] call CBA_fnc_targetEvent;
|
||||||
} else {
|
} else {
|
||||||
["unlockVehicle", _target, _target] call FUNC(targetEvent);
|
[QGVAR(unlockVehicle), _target, _target] call CBA_fnc_targetEvent;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -5,17 +5,22 @@
|
|||||||
* Arguments:
|
* Arguments:
|
||||||
* 0: Text <ANY>
|
* 0: Text <ANY>
|
||||||
* 1: Image <STRING>
|
* 1: Image <STRING>
|
||||||
* 2: Image color (default: [0, 0, 0, 0]) <ARRAY>
|
* 2: Image color <ARRAY> (default: [1, 1, 1])
|
||||||
* 3: Target Unit. Will only display if target is the player controlled object (default: ACE_player) <OBJECT>
|
* 3: Target Unit. Will only display if target is the player controlled object <OBJECT> (default: ACE_player)
|
||||||
|
* 4: Size <NUMBER> (default: 2)
|
||||||
*
|
*
|
||||||
* Return Value:
|
* Return Value:
|
||||||
* None
|
* None
|
||||||
*
|
*
|
||||||
|
* Example:
|
||||||
|
* ["text", "image", [1, 1, 1], ACE_player, 2] call ace_common_fnc_displayTextPicture
|
||||||
|
* ["text", "image", nil, nil, 3] call ace_common_fnc_displayTextPicture
|
||||||
|
*
|
||||||
* Public: Yes
|
* Public: Yes
|
||||||
*/
|
*/
|
||||||
#include "script_component.hpp"
|
#include "script_component.hpp"
|
||||||
|
|
||||||
params ["_text", "_image", ["_imageColor", [1,1,1]], ["_target", ACE_player]];
|
params [["_text", ""], ["_image", "", [""]], ["_imageColor", [1,1,1], [[]]], ["_target", ACE_player, [objNull]], ["_size", 2, [0]]];
|
||||||
|
|
||||||
if (_target != ACE_player) exitWith {};
|
if (_target != ACE_player) exitWith {};
|
||||||
|
|
||||||
@ -41,4 +46,4 @@ if (typeName _text != "TEXT") then {
|
|||||||
|
|
||||||
_text = composeText [parseText format ["<img size='2' align='center' color='%2' image='%1'/>", _image, _imageColor call BIS_fnc_colorRGBtoHTML], lineBreak, _text];
|
_text = composeText [parseText format ["<img size='2' align='center' color='%2' image='%1'/>", _image, _imageColor call BIS_fnc_colorRGBtoHTML], lineBreak, _text];
|
||||||
|
|
||||||
[_text, 2] call FUNC(displayTextStructured);
|
[_text, _size] call FUNC(displayTextStructured);
|
||||||
|
@ -4,17 +4,20 @@
|
|||||||
*
|
*
|
||||||
* Arguments:
|
* Arguments:
|
||||||
* 0: Text <ANY>
|
* 0: Text <ANY>
|
||||||
* 1: Size of the textbox (default: 1.5) <NUMBER>
|
* 1: Size of the textbox <NUMBER> (default: 1.5)
|
||||||
* 2: Target Unit. Will only display if target is the player controlled object (default: ACE_player) <OBJECT>
|
* 2: Target Unit. Will only display if target is the player controlled object <OBJECT> (default: ACE_player)
|
||||||
*
|
*
|
||||||
* Return Value:
|
* Return Value:
|
||||||
* None
|
* None
|
||||||
*
|
*
|
||||||
|
* Example:
|
||||||
|
*
|
||||||
|
*
|
||||||
* Public: Yes
|
* Public: Yes
|
||||||
*/
|
*/
|
||||||
#include "script_component.hpp"
|
#include "script_component.hpp"
|
||||||
|
|
||||||
params ["_text", ["_size", 1.5], ["_target", ACE_player]];
|
params [["_text", ""], ["_size", 1.5, [0]], ["_target", ACE_player, [objNull]]];
|
||||||
|
|
||||||
if (_target != ACE_player) exitWith {};
|
if (_target != ACE_player) exitWith {};
|
||||||
|
|
||||||
|
@ -41,34 +41,34 @@ TRACE_2("",local _unit,vehicle _unit);
|
|||||||
switch (_priority) do {
|
switch (_priority) do {
|
||||||
case 0: {
|
case 0: {
|
||||||
if (_unit == vehicle _unit) then {
|
if (_unit == vehicle _unit) then {
|
||||||
["playMove", _unit, [_unit, _animation]] call FUNC(objectEvent);
|
[QGVAR(playMove), [_unit, _animation], _unit] call CBA_fnc_targetEvent;
|
||||||
} else {
|
} else {
|
||||||
// Execute on all machines. PlayMove and PlayMoveNow are bugged: They have no global effects when executed on remote machines inside vehicles.
|
// 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 FUNC(globalEvent);
|
[QGVAR(playMove), [_unit, _animation]] call CBA_fnc_globalEvent;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
case 1: {
|
case 1: {
|
||||||
if (_unit == vehicle _unit) then {
|
if (_unit == vehicle _unit) then {
|
||||||
["playMoveNow", _unit, [_unit, _animation]] call FUNC(objectEvent);
|
[QGVAR(playMoveNow), [_unit, _animation], _unit] call CBA_fnc_targetEvent;
|
||||||
} else {
|
} else {
|
||||||
// Execute on all machines. PlayMove and PlayMoveNow are bugged: They have no global effects when executed on remote machines inside vehicles.
|
// 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 FUNC(globalEvent);
|
[QGVAR(playMoveNow), [_unit, _animation]] call CBA_fnc_globalEvent;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
case 2: {
|
case 2: {
|
||||||
// try playMoveNow first
|
// try playMoveNow first
|
||||||
if (_unit == vehicle _unit) then {
|
if (_unit == vehicle _unit) then {
|
||||||
["playMoveNow", _unit, [_unit, _animation]] call FUNC(objectEvent);
|
[QGVAR(playMoveNow), [_unit, _animation], _unit] call CBA_fnc_targetEvent;
|
||||||
} else {
|
} else {
|
||||||
// Execute on all machines. PlayMove and PlayMoveNow are bugged: They have no global effects when executed on remote machines inside vehicles.
|
// 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 FUNC(globalEvent);
|
[QGVAR(playMoveNow), [_unit, _animation]] call CBA_fnc_globalEvent;
|
||||||
};
|
};
|
||||||
|
|
||||||
// if animation doesn't respond, do switchMove
|
// if animation doesn't respond, do switchMove
|
||||||
if (animationState _unit != _animation) then {
|
if (animationState _unit != _animation) then {
|
||||||
TRACE_1("did not respond to playMoveNow",animationState _unit);
|
TRACE_1("did not respond to playMoveNow",animationState _unit);
|
||||||
// Execute on all machines. SwitchMove has local effects.
|
// Execute on all machines. SwitchMove has local effects.
|
||||||
["switchMove", [_unit, _animation]] call FUNC(globalEvent);
|
[QGVAR(switchMove), [_unit, _animation]] call CBA_fnc_globalEvent;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
default {};
|
default {};
|
||||||
|
@ -26,12 +26,12 @@ TRACE_7("firedEH:",_unit, _weapon, _muzzle, _mode, _ammo, _magazine, _projectile
|
|||||||
if (_unit isKindOf "CAManBase") then {
|
if (_unit isKindOf "CAManBase") then {
|
||||||
// The unit it on foot
|
// The unit it on foot
|
||||||
if (_unit == ACE_player) then {
|
if (_unit == ACE_player) then {
|
||||||
["firedPlayer", _this] call FUNC(localEvent);
|
["ace_firedPlayer", _this] call CBA_fnc_localEvent;
|
||||||
} else {
|
} else {
|
||||||
if ([_unit] call EFUNC(common,isPlayer)) then {
|
if ([_unit] call EFUNC(common,isPlayer)) then {
|
||||||
["firedPlayerNonLocal", _this] call FUNC(localEvent);
|
["ace_firedPlayerNonLocal", _this] call CBA_fnc_localEvent;
|
||||||
} else {
|
} else {
|
||||||
["firedNonPlayer", _this] call FUNC(localEvent);
|
["ace_firedNonPlayer", _this] call CBA_fnc_localEvent;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
} else {
|
} else {
|
||||||
@ -55,12 +55,12 @@ if (_unit isKindOf "CAManBase") then {
|
|||||||
};
|
};
|
||||||
|
|
||||||
if (_gunner == ACE_player) then {
|
if (_gunner == ACE_player) then {
|
||||||
["firedPlayerVehicle", _this] call FUNC(localEvent);
|
["ace_firedPlayerVehicle", _this] call CBA_fnc_localEvent;
|
||||||
} else {
|
} else {
|
||||||
if ([_gunner] call EFUNC(common,isPlayer)) then {
|
if ([_gunner] call EFUNC(common,isPlayer)) then {
|
||||||
["firedPlayerVehicleNonLocal", _this] call FUNC(localEvent);
|
["ace_firedPlayerVehicleNonLocal", _this] call CBA_fnc_localEvent;
|
||||||
} else {
|
} else {
|
||||||
["firedNonPlayerVehicle", _this] call FUNC(localEvent);
|
["ace_firedNonPlayerVehicle", _this] call CBA_fnc_localEvent;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
@ -21,7 +21,7 @@ if (!local _object) exitWith {};
|
|||||||
if (_object isKindOf "CAManBase") exitWith {};
|
if (_object isKindOf "CAManBase") exitWith {};
|
||||||
|
|
||||||
//We need to manually set allowDamage to true for setHitIndex to function
|
//We need to manually set allowDamage to true for setHitIndex to function
|
||||||
["blockDamage", [_object, 0]] call FUNC(localEvent);
|
[QGVAR(blockDamage), [_object, 0]] call CBA_fnc_localEvent;
|
||||||
|
|
||||||
// save and restore hitpoints, see below why
|
// save and restore hitpoints, see below why
|
||||||
private _hitPointDamages = getAllHitPointsDamage _object;
|
private _hitPointDamages = getAllHitPointsDamage _object;
|
||||||
@ -41,4 +41,4 @@ _object setDamage damage _object;
|
|||||||
//manually re-enable allowDamage to previous setting (ref statusEffect_funcs)
|
//manually re-enable allowDamage to previous setting (ref statusEffect_funcs)
|
||||||
private _effectVarName = format [QGVAR(effect_%1), "blockDamage"];
|
private _effectVarName = format [QGVAR(effect_%1), "blockDamage"];
|
||||||
private _effectNumber = _object getVariable [_effectVarName, 0];
|
private _effectNumber = _object getVariable [_effectVarName, 0];
|
||||||
["blockDamage", [_object, _effectNumber]] call FUNC(localEvent);
|
[QGVAR(blockDamage), [_object, _effectNumber]] call CBA_fnc_localEvent;
|
||||||
|
@ -1,21 +1,14 @@
|
|||||||
/*
|
#define DEBUG_MODE_FULL
|
||||||
* Author: Nou
|
|
||||||
* Execute a global event on all clients, including self.
|
|
||||||
*
|
|
||||||
* Arguments:
|
|
||||||
* 0: Event name <STRING>
|
|
||||||
* 1: Event args <ANY>
|
|
||||||
*
|
|
||||||
* Return Value:
|
|
||||||
* None
|
|
||||||
*
|
|
||||||
* Public: Yes
|
|
||||||
*/
|
|
||||||
#include "script_component.hpp"
|
#include "script_component.hpp"
|
||||||
|
|
||||||
params ["_eventName", "_eventArgs"];
|
params ["_eventName", "_eventArgs"];
|
||||||
|
|
||||||
ACEg = [_eventName, _eventArgs];
|
private _newName = getText (configFile >> "ACE_newEvents" >> _eventName);
|
||||||
publicVariable "ACEg";
|
if (_newName != "") then {
|
||||||
|
TRACE_2("Switching Names",_eventName,_newName);
|
||||||
|
_eventName = _newName;
|
||||||
|
};
|
||||||
|
|
||||||
["ACEg", ACEg] call FUNC(_handleNetEvent);
|
[_eventName, _eventArgs] call CBA_fnc_globalEvent;
|
||||||
|
|
||||||
|
ACE_DEPRECATED("ace_common_fnc_globalEvent","3.8.0","CBA_fnc_globalEvent");
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* Author: commy2
|
* Author: commy2
|
||||||
* Move unit to kneeling position.
|
* Move unit to kneeling position (only if not yet prone).
|
||||||
*
|
*
|
||||||
* Arguments:
|
* Arguments:
|
||||||
* 0: Unit <OBJECT>
|
* 0: Unit <OBJECT>
|
||||||
@ -14,7 +14,8 @@
|
|||||||
|
|
||||||
params ["_unit"];
|
params ["_unit"];
|
||||||
|
|
||||||
if (stance _unit == "PRONE") exitWith {};
|
// Animation changes even inside vehicle post-1.60
|
||||||
|
if (stance _unit == "PRONE" || {vehicle ACE_player != ACE_player}) exitWith {};
|
||||||
|
|
||||||
[
|
[
|
||||||
_unit,
|
_unit,
|
||||||
|
@ -17,8 +17,8 @@
|
|||||||
private _unit = ACE_player;
|
private _unit = ACE_player;
|
||||||
private _anim = animationState _unit;
|
private _anim = animationState _unit;
|
||||||
|
|
||||||
["HeadbugFixUsed", [profileName, _anim]] call FUNC(serverEvent);
|
[QGVAR(headbugFixUsed), [profileName, _anim]] call CBA_fnc_serverEvent;
|
||||||
["HeadbugFixUsed", [profileName, _anim]] call FUNC(localEvent);
|
[QGVAR(headbugFixUsed), [profileName, _anim]] call CBA_fnc_localEvent;
|
||||||
|
|
||||||
if (_unit != vehicle _unit || {!([_unit, objNull, ["isNotSitting"]] call FUNC(canInteractWith))}) exitWith {false};
|
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 {
|
if !(isObjectHidden _unit) then {
|
||||||
["hideObjectGlobal", [_unit, true]] call FUNC(serverEvent);
|
[QGVAR(hideObjectGlobal), [_unit, true]] call CBA_fnc_serverEvent;
|
||||||
};
|
};
|
||||||
|
@ -32,7 +32,7 @@ private _nearVehicles = nearestObjects [_unit, ["Car", "Air", "Tank", "Ship_F"],
|
|||||||
|
|
||||||
if (!isNull _vehicle) then {
|
if (!isNull _vehicle) then {
|
||||||
[_unit, true, GROUP_SWITCH_ID, side group _caller] call FUNC(switchToGroupSide);
|
[_unit, true, GROUP_SWITCH_ID, side group _caller] call FUNC(switchToGroupSide);
|
||||||
["loadPersonEvent", _unit, [_unit, _vehicle, _caller]] call FUNC(objectEvent);
|
["ace_loadPersonEvent", [_unit, _vehicle, _caller], _unit] call CBA_fnc_targetEvent;
|
||||||
};
|
};
|
||||||
|
|
||||||
_vehicle
|
_vehicle
|
||||||
|
@ -1,36 +1,13 @@
|
|||||||
/*
|
|
||||||
* Author: Nou
|
|
||||||
* Execute a local event on this client only.
|
|
||||||
*
|
|
||||||
* Arguments:
|
|
||||||
* 0: Event name (string)
|
|
||||||
* 1: Event args (any)
|
|
||||||
*
|
|
||||||
* Return Value:
|
|
||||||
* None
|
|
||||||
*
|
|
||||||
* Public: No
|
|
||||||
*/
|
|
||||||
#include "script_component.hpp"
|
#include "script_component.hpp"
|
||||||
|
|
||||||
params ["_eventName", "_eventArgs"];
|
params ["_eventName", "_eventArgs"];
|
||||||
|
|
||||||
private _eventFunctions = GVAR(eventsLocation) getVariable _eventName;
|
private _newName = getText (configFile >> "ACE_newEvents" >> _eventName);
|
||||||
|
if (_newName != "") then {
|
||||||
if (!isNil "_eventFunctions") then {
|
TRACE_2("Switching Names",_eventName,_newName);
|
||||||
|
_eventName = _newName;
|
||||||
#ifdef DEBUG_EVENTS
|
|
||||||
ACE_LOGINFO_1("* Local Event: %1",_eventName);
|
|
||||||
ACE_LOGINFO_1(" args=%1",_eventArgs);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
{
|
|
||||||
if (!isNil "_x") then {
|
|
||||||
_eventArgs call CALLSTACK_NAMED(_x,FORMAT_2("Local Event %1 ID: %2",_eventName,_forEachIndex));
|
|
||||||
|
|
||||||
#ifdef DEBUG_EVENTS_CALLSTACK
|
|
||||||
ACE_LOGINFO_1(" ID: %1",_forEachIndex);
|
|
||||||
#endif
|
|
||||||
};
|
|
||||||
} forEach _eventFunctions;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
[_eventName, _eventArgs] call CBA_fnc_localEvent;
|
||||||
|
|
||||||
|
ACE_DEPRECATED("ace_common_fnc_localEvent","3.8.0","CBA_fnc_localEvent");
|
||||||
|
@ -29,6 +29,6 @@ private _speaker = speaker _unit;
|
|||||||
|
|
||||||
if (_speaker == "ACE_NoVoice") exitWith {};
|
if (_speaker == "ACE_NoVoice") exitWith {};
|
||||||
|
|
||||||
["setSpeaker", [_unit, "ACE_NoVoice"]] call FUNC(globalEvent);
|
[QGVAR(setSpeaker), [_unit, "ACE_NoVoice"]] call CBA_fnc_globalEvent;
|
||||||
|
|
||||||
_unit setVariable ["ACE_OriginalSpeaker", _speaker, true];
|
_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
|
// setSpeaker gets overwritten after init on remote units; if unit is muted, setSpeaker again
|
||||||
if (count (_unit getVariable [QGVAR(muteUnitReasons), []]) > 0) then {
|
if (count (_unit getVariable [QGVAR(muteUnitReasons), []]) > 0) then {
|
||||||
["setSpeaker", [_unit, "ACE_NoVoice"]] call FUNC(localEvent);
|
[QGVAR(setSpeaker), [_unit, "ACE_NoVoice"]] call CBA_fnc_localEvent;
|
||||||
};
|
};
|
||||||
|
@ -18,4 +18,4 @@ params ["_unit"];
|
|||||||
_unit setVariable [QGVAR(muteUnitReasons), _unit getVariable [QGVAR(muteUnitReasons), []], true];
|
_unit setVariable [QGVAR(muteUnitReasons), _unit getVariable [QGVAR(muteUnitReasons), []], true];
|
||||||
|
|
||||||
// fix mp issues with respawning and the speaker
|
// fix mp issues with respawning and the speaker
|
||||||
["setSpeaker", [_unit, speaker _unit]] call FUNC(globalEvent);
|
[QGVAR(setSpeaker), [_unit, speaker _unit]] call CBA_fnc_globalEvent;
|
||||||
|
@ -1,34 +1,13 @@
|
|||||||
/*
|
|
||||||
* Author: PabstMirror
|
|
||||||
* Execute an event where object is local.
|
|
||||||
* If local there is no network traffic/delay (Unlike targetEvent)
|
|
||||||
*
|
|
||||||
* Arguments:
|
|
||||||
* 0: Event name (STRING)
|
|
||||||
* 1: Event target <OBJECT>
|
|
||||||
* 2: Event args <ANY>
|
|
||||||
*
|
|
||||||
* Return Value:
|
|
||||||
* None
|
|
||||||
*
|
|
||||||
* Example:
|
|
||||||
* ["doThing", vehicle player, []] call ace_common_fnc_objectEvent
|
|
||||||
*
|
|
||||||
* Public: Yes
|
|
||||||
*/
|
|
||||||
#include "script_component.hpp"
|
#include "script_component.hpp"
|
||||||
|
|
||||||
params ["_eventName", "_eventTarget", "_eventArgs"];
|
params ["_eventName", "_eventTarget", "_eventArgs"];
|
||||||
|
|
||||||
#ifdef DEBUG_EVENTS
|
private _newName = getText (configFile >> "ACE_newEvents" >> _eventName);
|
||||||
ACE_LOGINFO_2("* Object Event: %1 - %2",_eventName,_eventTarget);
|
if (_newName != "") then {
|
||||||
ACE_LOGINFO_1(" args=%1",_eventArgs);
|
TRACE_2("Switching Names",_eventName,_newName);
|
||||||
#endif
|
_eventName = _newName;
|
||||||
|
|
||||||
if (local _eventTarget) then {
|
|
||||||
[_eventName, _eventArgs] call FUNC(localEvent);
|
|
||||||
} else {
|
|
||||||
_this call FUNC(targetEvent);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
nil
|
[_eventName, _eventArgs, _eventTargets] call CBA_fnc_targetEvent;
|
||||||
|
|
||||||
|
ACE_DEPRECATED("ace_common_fnc_objectEvent","3.8.0","CBA_fnc_targetEvent");
|
||||||
|
@ -20,7 +20,7 @@ if (!isNil "_info") then {
|
|||||||
_info params ["_caller", "_target", "_requestID", "_requestMessage", "_callBack"];
|
_info params ["_caller", "_target", "_requestID", "_requestMessage", "_callBack"];
|
||||||
|
|
||||||
private _replyParams = [_info, _accepted];
|
private _replyParams = [_info, _accepted];
|
||||||
[_replyParams, QFUNC(requestCallback), _caller, false] call FUNC(execRemoteFnc);
|
[QGVAR(requestCallback), _replyParams, _caller] call CBA_fnc_targetEvent;
|
||||||
_unit setVariable [_id, nil];
|
_unit setVariable [_id, nil];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -82,13 +82,13 @@ _ctrlPos set [1, ((0 + 29 * GVAR(settingProgressBarLocation)) * ((((safezoneW /
|
|||||||
|
|
||||||
if (_errorCode == 0) then {
|
if (_errorCode == 0) then {
|
||||||
if (_onFinish isEqualType "") then {
|
if (_onFinish isEqualType "") then {
|
||||||
[_onFinish, [_args, _elapsedTime, _totalTime, _errorCode]] call FUNC(localEvent);
|
[_onFinish, [_args, _elapsedTime, _totalTime, _errorCode]] call CBA_fnc_localEvent;
|
||||||
} else {
|
} else {
|
||||||
[_args, _elapsedTime, _totalTime, _errorCode] call _onFinish;
|
[_args, _elapsedTime, _totalTime, _errorCode] call _onFinish;
|
||||||
};
|
};
|
||||||
} else {
|
} else {
|
||||||
if (_onFail isEqualType "") then {
|
if (_onFail isEqualType "") then {
|
||||||
[_onFail, [_args, _elapsedTime, _totalTime, _errorCode]] call FUNC(localEvent);
|
[_onFail, [_args, _elapsedTime, _totalTime, _errorCode]] call CBA_fnc_localEvent;
|
||||||
} else {
|
} else {
|
||||||
[_args, _elapsedTime, _totalTime, _errorCode] call _onFail;
|
[_args, _elapsedTime, _totalTime, _errorCode] call _onFail;
|
||||||
};
|
};
|
||||||
|
@ -1,17 +1,14 @@
|
|||||||
/*
|
|
||||||
* Author: Nou
|
|
||||||
* Remove all events of a certain event type.
|
|
||||||
*
|
|
||||||
* Argument:
|
|
||||||
* 0: Event name <STRING>
|
|
||||||
*
|
|
||||||
* Return Value:
|
|
||||||
* None
|
|
||||||
*
|
|
||||||
* Public: Yes
|
|
||||||
*/
|
|
||||||
#include "script_component.hpp"
|
#include "script_component.hpp"
|
||||||
|
|
||||||
params ["_eventName"];
|
params ["_eventName"];
|
||||||
|
|
||||||
GVAR(eventsLocation) setVariable [_eventName, nil];
|
private _newName = getText (configFile >> "ACE_newEvents" >> _eventName);
|
||||||
|
if (_newName != "") then {
|
||||||
|
TRACE_2("Switching Names",_eventName,_newName);
|
||||||
|
_eventName = _newName;
|
||||||
|
};
|
||||||
|
|
||||||
|
CBA_events_eventNamespace setVariable [_eventName,nil];
|
||||||
|
CBA_events_eventHashes setVariable [_eventName,nil];
|
||||||
|
|
||||||
|
ACE_DEPRECATED("ace_common_fnc_removeAllEventHandlers","3.8.0","N/A (remove events individually w/ CBA_fnc_removeEventHandler)");
|
||||||
|
@ -1,23 +1,13 @@
|
|||||||
/*
|
|
||||||
* Author: Nou
|
|
||||||
* Remove an event handler.
|
|
||||||
*
|
|
||||||
* Argument:
|
|
||||||
* 0: Event name <STRING>
|
|
||||||
* 1: Event code <NUMBER>
|
|
||||||
*
|
|
||||||
* Return Value:
|
|
||||||
* None
|
|
||||||
*
|
|
||||||
* Public: Yes
|
|
||||||
*/
|
|
||||||
#include "script_component.hpp"
|
#include "script_component.hpp"
|
||||||
|
|
||||||
params ["_eventName", "_eventCodeIndex"];
|
params ["_eventName", "_eventCode"];
|
||||||
|
|
||||||
private _eventFunctions = GVAR(eventsLocation) getVariable _eventName;
|
private _newName = getText (configFile >> "ACE_newEvents" >> _eventName);
|
||||||
|
if (_newName != "") then {
|
||||||
|
TRACE_2("Switching Names",_eventName,_newName);
|
||||||
|
_eventName = _newName;
|
||||||
|
};
|
||||||
|
|
||||||
if (isNil "_eventFunctions") exitWith {TRACE_1("eventName not found",_eventName);};
|
[_eventName, _eventCode] call CBA_fnc_removeEventHandler;
|
||||||
if ((_eventCodeIndex < 0) || {(count _eventFunctions) <= _eventCodeIndex}) exitWith {TRACE_2("index out of bounds",_eventName,_eventCodeIndex);};
|
|
||||||
|
|
||||||
_eventFunctions set [_eventCodeIndex, nil];
|
ACE_DEPRECATED("ace_common_fnc_removeEventHandler","3.8.0","CBA_fnc_removeEventHandler");
|
||||||
|
@ -22,5 +22,5 @@ if (!HASH_HASKEY(GVAR(syncedEvents),_name)) exitWith {
|
|||||||
private _data = HASH_GET(GVAR(syncedEvents),_name);
|
private _data = HASH_GET(GVAR(syncedEvents),_name);
|
||||||
_data params ["", "", "", "_eventId"];
|
_data params ["", "", "", "_eventId"];
|
||||||
|
|
||||||
[_eventId] call FUNC(removeEventHandler);
|
[_eventId] call CBA_fnc_removeEventHandler;
|
||||||
HASH_REM(GVAR(syncedEvents),_name);
|
HASH_REM(GVAR(syncedEvents),_name);
|
||||||
|
@ -17,4 +17,4 @@ params ["_eventName"];
|
|||||||
// Only JIP machines on initialization send this off, requesting sync on events with the serverCommand
|
// Only JIP machines on initialization send this off, requesting sync on events with the serverCommand
|
||||||
if (isServer) exitWith {false};
|
if (isServer) exitWith {false};
|
||||||
|
|
||||||
["SEH_s", [_eventName, ACE_player] ] call FUNC(serverEvent);
|
["ACEs", [_eventName, ACE_player]] call CBA_fnc_serverEvent;
|
||||||
|
@ -20,7 +20,7 @@ params ["_caller", "_target", "_requestID", "_requestMessage", "_callBack"];
|
|||||||
|
|
||||||
if (isPlayer _target) then {
|
if (isPlayer _target) then {
|
||||||
// Pass request on to target locality for player accept/decline.
|
// Pass request on to target locality for player accept/decline.
|
||||||
[[_caller, _target, _requestID, _requestMessage, _callBack], QFUNC(receiveRequest), _target, false] call FUNC(execRemoteFnc);
|
[QGVAR(receiveRequest), [_caller, _target, _requestID, _requestMessage, _callBack], _target] call CBA_fnc_targetEvent;
|
||||||
} else {
|
} else {
|
||||||
// accept it, since it's an AI.
|
// accept it, since it's an AI.
|
||||||
[_caller, _target, true] call compile _callBack;
|
[_caller, _target, true] call compile _callBack;
|
||||||
|
@ -1,29 +1,13 @@
|
|||||||
/*
|
|
||||||
* Author: Nou
|
|
||||||
* Execute a event only on the server.
|
|
||||||
*
|
|
||||||
* Argument:
|
|
||||||
* 0: Event name <STRING>
|
|
||||||
* 1: Event args <ANY>
|
|
||||||
*
|
|
||||||
* Return Value:
|
|
||||||
* None
|
|
||||||
*
|
|
||||||
* Public: Yes
|
|
||||||
*/
|
|
||||||
#include "script_component.hpp"
|
#include "script_component.hpp"
|
||||||
|
|
||||||
params ["_eventName", "_eventArgs"];
|
params ["_eventName", "_eventArgs"];
|
||||||
|
|
||||||
#ifdef DEBUG_EVENTS
|
private _newName = getText (configFile >> "ACE_newEvents" >> _eventName);
|
||||||
ACE_LOGINFO_1("* Server Event: %1",_eventName);
|
if (_newName != "") then {
|
||||||
ACE_LOGINFO_1(" args=%1",_eventArgs);
|
TRACE_2("Switching Names",_eventName,_newName);
|
||||||
#endif
|
_eventName = _newName;
|
||||||
|
|
||||||
ACEg = [_eventName, _eventArgs];
|
|
||||||
|
|
||||||
if (!isServer) then {
|
|
||||||
publicVariableServer "ACEg";
|
|
||||||
} else {
|
|
||||||
["ACEg", ACEg] call FUNC(_handleNetEvent);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
[_eventName, _eventArgs] call CBA_fnc_serverEvent;
|
||||||
|
|
||||||
|
ACE_DEPRECATED("ace_common_fnc_serverEvent","3.8.0","CBA_fnc_serverEvent");
|
||||||
|
@ -20,5 +20,5 @@ params [["_msg", "", [""]]];
|
|||||||
if (isServer) then {
|
if (isServer) then {
|
||||||
diag_log text _msg;
|
diag_log text _msg;
|
||||||
} else {
|
} else {
|
||||||
[_this, QFUNC(serverLog), 1] call FUNC(execRemoteFnc);
|
[QGVAR(serverLog), _this] call CBA_fnc_serverEvent;
|
||||||
};
|
};
|
||||||
|
@ -78,8 +78,8 @@ if (isServer && {_broadcastChanges}) then {
|
|||||||
publicVariable _name;
|
publicVariable _name;
|
||||||
|
|
||||||
// Raise event globally, this publicizes eventual changes in _force status so clients can update it locally
|
// Raise event globally, this publicizes eventual changes in _force status so clients can update it locally
|
||||||
["SettingChanged", [_name, _value, _force]] call FUNC(globalEvent);
|
["ace_settingChanged", [_name, _value, _force]] call CBA_fnc_globalEvent;
|
||||||
} else {
|
} else {
|
||||||
// Raise event locally
|
// Raise event locally
|
||||||
["SettingChanged", [_name, _value, _force]] call FUNC(localEvent);
|
["ace_settingChanged", [_name, _value, _force]] call CBA_fnc_localEvent;
|
||||||
};
|
};
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
* Adds a status effect that will be handled.
|
* Adds a status effect that will be handled.
|
||||||
*
|
*
|
||||||
* Arguments:
|
* Arguments:
|
||||||
* 0: Status Effect Name, this should match a corisponding event name <STRING>
|
* 0: Status Effect Name, this should match a corresponding event name <STRING>
|
||||||
* 1: Send event globaly <BOOL>
|
* 1: Send event globaly <BOOL>
|
||||||
* 2: Common Effect Reaons to pre-seed durring init <ARRAY>
|
* 2: Common Effect Reaons to pre-seed durring init <ARRAY>
|
||||||
*
|
*
|
||||||
@ -30,8 +30,6 @@ GVAR(statusEffect_isGlobal) pushBack _isGlobal;
|
|||||||
//We add reasons at any time, but more efficenet to add all common ones at one time during init
|
//We add reasons at any time, but more efficenet to add all common ones at one time during init
|
||||||
if (isServer && {!(_commonReasonsArray isEqualTo [])}) then {
|
if (isServer && {!(_commonReasonsArray isEqualTo [])}) then {
|
||||||
//Switch case to lower:
|
//Switch case to lower:
|
||||||
{
|
_commonReasonsArray = _commonReasonsArray apply { toLower _x };
|
||||||
_commonReasonsArray set [_forEachIndex, toLower _x];
|
|
||||||
} forEach _commonReasonsArray;
|
|
||||||
missionNamespace setVariable [(format [QGVAR(statusEffects_%1), _name]), _commonReasonsArray, true];
|
missionNamespace setVariable [(format [QGVAR(statusEffects_%1), _name]), _commonReasonsArray, true];
|
||||||
};
|
};
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
*
|
*
|
||||||
* Arguments:
|
* Arguments:
|
||||||
* 0: Object <OBJECT>
|
* 0: Object <OBJECT>
|
||||||
* 1: Effect name (or "" or send all) <STRING>
|
* 1: Effect name (or "" to send all) <STRING>
|
||||||
*
|
*
|
||||||
* Return Value:
|
* Return Value:
|
||||||
* Nothing
|
* Nothing
|
||||||
@ -30,18 +30,13 @@ if (isNull _object) exitWith {};
|
|||||||
//We only do anything if the effect has been defined at some point in the game for this unit
|
//We only do anything if the effect has been defined at some point in the game for this unit
|
||||||
TRACE_2("checking if event is nil",_x,_effectNumber);
|
TRACE_2("checking if event is nil",_x,_effectNumber);
|
||||||
if (_effectNumber != -1) then {
|
if (_effectNumber != -1) then {
|
||||||
|
private _eventName = format [QGVAR(%1), _x];
|
||||||
if (GVAR(statusEffect_isGlobal) select _forEachIndex) then {
|
if (GVAR(statusEffect_isGlobal) select _forEachIndex) then {
|
||||||
TRACE_2("Sending Global Event", _object, _effectNumber);
|
TRACE_2("Sending Global Event", _object, _effectNumber);
|
||||||
[_x, [_object, _effectNumber]] call FUNC(globalEvent);
|
[_eventName, [_object, _effectNumber]] call CBA_fnc_globalEvent;
|
||||||
} else {
|
} else {
|
||||||
if (local _object) then {
|
TRACE_2("Sending Target Event", _object, _effectNumber);
|
||||||
//If local, send directly to bypass network delay of targetEvent call
|
[_eventName, [_object, _effectNumber], _object] call CBA_fnc_targetEvent;
|
||||||
TRACE_2("Sending Target Local Event", _object, _effectNumber);
|
|
||||||
[_x, [_object, _effectNumber]] call FUNC(localEvent);
|
|
||||||
} else {
|
|
||||||
TRACE_2("Sending Target Non-Local Event", _object, _effectNumber);
|
|
||||||
[_x, [_object], [_object, _effectNumber]] call FUNC(targetEvent);
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
@ -23,4 +23,4 @@ if (!HASH_HASKEY(GVAR(syncedEvents),_name)) exitWith {
|
|||||||
|
|
||||||
private _eventData = [_name, _args, _ttl];
|
private _eventData = [_name, _args, _ttl];
|
||||||
|
|
||||||
["SEH", _eventData] call FUNC(globalEvent);
|
["ACEe", _eventData] call CBA_fnc_globalEvent;
|
||||||
|
@ -1,33 +1,13 @@
|
|||||||
/*
|
|
||||||
* Author: Nou
|
|
||||||
* Execute a event only on specific clients.
|
|
||||||
*
|
|
||||||
* Arguments:
|
|
||||||
* 0: Event name (STRING)
|
|
||||||
* 1: Event targets <OBJECT, ARRAY>
|
|
||||||
* 2: Event args <ANY>
|
|
||||||
*
|
|
||||||
* Note: If local executor is in list of targets, event will execute with
|
|
||||||
* network delay, and not immediatly.
|
|
||||||
*
|
|
||||||
* Return Value:
|
|
||||||
* None
|
|
||||||
*
|
|
||||||
* Public: Yes
|
|
||||||
*/
|
|
||||||
#include "script_component.hpp"
|
#include "script_component.hpp"
|
||||||
|
|
||||||
params ["_eventName", "_eventTargets", "_eventArgs"];
|
params ["_eventName", "_eventTargets", "_eventArgs"];
|
||||||
|
|
||||||
#ifdef DEBUG_EVENTS
|
private _newName = getText (configFile >> "ACE_newEvents" >> _eventName);
|
||||||
ACE_LOGINFO_2("* Target Event: %1 - %2",_eventName,_eventTargets);
|
if (_newName != "") then {
|
||||||
ACE_LOGINFO_1(" args=%1",_eventArgs);
|
TRACE_2("Switching Names",_eventName,_newName);
|
||||||
#endif
|
_eventName = _newName;
|
||||||
|
|
||||||
ACEc = [_eventName, _eventTargets, _eventArgs];
|
|
||||||
|
|
||||||
if (!isServer) then {
|
|
||||||
publicVariableServer "ACEc";
|
|
||||||
} else {
|
|
||||||
["ACEc", ACEc] call FUNC(_handleNetEvent);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
[_eventName,_eventArgs,_eventTargets] call CBA_fnc_targetEvent;
|
||||||
|
|
||||||
|
ACE_DEPRECATED("ace_common_fnc_targetEvent","3.8.0","CBA_fnc_targetEvent");
|
||||||
|
@ -28,5 +28,5 @@ if (_reason in _setHiddenReasons) then {
|
|||||||
};
|
};
|
||||||
|
|
||||||
if (_setHiddenReasons isEqualTo []) then {
|
if (_setHiddenReasons isEqualTo []) then {
|
||||||
["hideObjectGlobal",[_unit,false]] call FUNC(serverEvent);
|
[QGVAR(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 (speed _vehicle > 1 || {((getPos _vehicle) select 2) > 2}) exitWith {false};
|
||||||
|
|
||||||
if (!isNull _vehicle) then {
|
if (!isNull _vehicle) then {
|
||||||
["unloadPersonEvent", [_unit], [_unit, _vehicle]] call EFUNC(common,targetEvent);
|
["ace_unloadPersonEvent", [_unit, _vehicle], [_unit]] call CBA_fnc_targetEvent;
|
||||||
};
|
};
|
||||||
|
|
||||||
true
|
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);
|
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 {
|
if ((!isNull _unloader) && {[_unloader] call FUNC(isPlayer)}) then {
|
||||||
//display text saying there are no safe places to exit the vehicle
|
//display text saying there are no safe places to exit the vehicle
|
||||||
["displayTextStructured", [_unloader], [localize LSTRING(NoRoomToUnload)]] call FUNC(targetEvent);
|
[QGVAR(displayTextStructured), [localize LSTRING(NoRoomToUnload)], [_unloader]] call CBA_fnc_targetEvent;
|
||||||
};
|
};
|
||||||
false
|
false
|
||||||
};
|
};
|
||||||
|
@ -32,4 +32,4 @@ private _speaker = _unit getVariable ["ACE_OriginalSpeaker", ""];
|
|||||||
|
|
||||||
if (_speaker == "") exitWith {};
|
if (_speaker == "") exitWith {};
|
||||||
|
|
||||||
["setSpeaker", _unit, [_unit, _speaker]] call FUNC(targetEvent);
|
[QGVAR(setSpeaker), [_unit, _speaker], _unit] call CBA_fnc_targetEvent;
|
||||||
|
@ -100,7 +100,7 @@ if (!isServer) then {
|
|||||||
_error = _error call _fnc_cutComma;
|
_error = _error call _fnc_cutComma;
|
||||||
|
|
||||||
diag_log text _error;
|
diag_log text _error;
|
||||||
[_error, "{systemChat _this}"] call FUNC(execRemoteFnc);
|
[QGVAR(systemChatGlobal), _error] call CBA_fnc_globalEvent;
|
||||||
};
|
};
|
||||||
|
|
||||||
_missingAddonServer = false;
|
_missingAddonServer = false;
|
||||||
@ -117,7 +117,7 @@ if (!isServer) then {
|
|||||||
_error = _error call _fnc_cutComma;
|
_error = _error call _fnc_cutComma;
|
||||||
|
|
||||||
diag_log text _error;
|
diag_log text _error;
|
||||||
[_error, "{systemChat _this}"] call FUNC(execRemoteFnc);
|
[QGVAR(systemChatGlobal), _error] call CBA_fnc_globalEvent;
|
||||||
};
|
};
|
||||||
|
|
||||||
_oldVersionClient = false;
|
_oldVersionClient = false;
|
||||||
@ -134,7 +134,7 @@ if (!isServer) then {
|
|||||||
_error = _error call _fnc_cutComma;
|
_error = _error call _fnc_cutComma;
|
||||||
|
|
||||||
diag_log text _error;
|
diag_log text _error;
|
||||||
[_error, "{systemChat _this}"] call FUNC(execRemoteFnc);
|
[QGVAR(systemChatGlobal), _error] call CBA_fnc_globalEvent;
|
||||||
};
|
};
|
||||||
|
|
||||||
_oldVersionServer = false;
|
_oldVersionServer = false;
|
||||||
@ -151,7 +151,7 @@ if (!isServer) then {
|
|||||||
_error = _error call _fnc_cutComma;
|
_error = _error call _fnc_cutComma;
|
||||||
|
|
||||||
diag_log text _error;
|
diag_log text _error;
|
||||||
[_error, "{systemChat _this}"] call FUNC(execRemoteFnc);
|
[QGVAR(systemChatGlobal), _error] call CBA_fnc_globalEvent;
|
||||||
};
|
};
|
||||||
|
|
||||||
ACE_Version_ClientErrors = [_missingAddon, _missingAddonServer, _oldVersionClient, _oldVersionServer];
|
ACE_Version_ClientErrors = [_missingAddon, _missingAddonServer, _oldVersionClient, _oldVersionServer];
|
||||||
|
@ -803,6 +803,7 @@
|
|||||||
<Spanish>No hay espacio para descargar.</Spanish>
|
<Spanish>No hay espacio para descargar.</Spanish>
|
||||||
<French>Pas de place pour décharger</French>
|
<French>Pas de place pour décharger</French>
|
||||||
<Czech>Nedostatek místa k vyložení</Czech>
|
<Czech>Nedostatek místa k vyložení</Czech>
|
||||||
|
<Portuguese>Sem espaço para descarregar</Portuguese>
|
||||||
</Key>
|
</Key>
|
||||||
</Package>
|
</Package>
|
||||||
</Project>
|
</Project>
|
@ -1 +0,0 @@
|
|||||||
#include "\z\ace\addons\common\script_component.hpp"
|
|
@ -1,78 +0,0 @@
|
|||||||
// ----------------------------------------------------------------------------
|
|
||||||
#define DEBUG_MODE_FULL
|
|
||||||
#include "script_component.hpp"
|
|
||||||
|
|
||||||
#ifndef TEST_DEFINED_AND_OP
|
|
||||||
if (true) exitWith {};
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// ----------------------------------------------------------------------------
|
|
||||||
|
|
||||||
LOG('Testing EventHandlers');
|
|
||||||
|
|
||||||
TEST_DEFINED(QFUNC(_handleNetEvent),"");
|
|
||||||
TEST_DEFINED(QFUNC(addEventHandler),"");
|
|
||||||
TEST_DEFINED(QFUNC(localEvent),"");
|
|
||||||
TEST_DEFINED(QFUNC(targetEvent),"");
|
|
||||||
TEST_DEFINED(QFUNC(globalEvent),"");
|
|
||||||
TEST_DEFINED(QFUNC(serverEvent),"");
|
|
||||||
TEST_DEFINED(QFUNC(removeAllEventHandlers),"");
|
|
||||||
TEST_DEFINED(QFUNC(removeEventHandler),"");
|
|
||||||
|
|
||||||
private _result = ["A", {}] call ace_common_fnc_addEventHandler;
|
|
||||||
private _expected = 0;
|
|
||||||
TEST_DEFINED_AND_OP(_result,==,_expected,"Adding first A EH");
|
|
||||||
|
|
||||||
_result = ["A", {GVAR(test_A2) = _this}] call ace_common_fnc_addEventHandler;
|
|
||||||
_expected = 1;
|
|
||||||
TEST_DEFINED_AND_OP(_result,==,_expected,"Adding second A EH");
|
|
||||||
|
|
||||||
_result = ["A", {GVAR(test_A3) = _this}] call ace_common_fnc_addEventHandler;
|
|
||||||
_expected = 2;
|
|
||||||
TEST_DEFINED_AND_OP(_result,==,_expected,"Adding third A EH");
|
|
||||||
|
|
||||||
GVAR(test_A2) = -1;
|
|
||||||
["A", 11] call FUNC(localEvent);
|
|
||||||
_expected = 11;
|
|
||||||
_result = GVAR(test_A2);
|
|
||||||
TEST_DEFINED_AND_OP(_result,==,_expected,"Test Local Event");
|
|
||||||
|
|
||||||
//Remove 2nd EH
|
|
||||||
["A", 1] call FUNC(removeEventHandler);
|
|
||||||
|
|
||||||
GVAR(test_A2) = -1;
|
|
||||||
GVAR(test_A3) = -1;
|
|
||||||
["A", 22] call FUNC(localEvent);
|
|
||||||
_expected = -1;
|
|
||||||
_result = GVAR(test_A2);
|
|
||||||
TEST_DEFINED_AND_OP(_result,==,_expected,"Test 2nd (removed) EH");
|
|
||||||
_expected = 22;
|
|
||||||
_result = GVAR(test_A3);
|
|
||||||
TEST_DEFINED_AND_OP(_result,==,_expected,"Test 3rd Event");
|
|
||||||
|
|
||||||
//Remove All EH:
|
|
||||||
["A"] call FUNC(removeAllEventHandlers);
|
|
||||||
|
|
||||||
GVAR(test_A3) = -1;
|
|
||||||
["A", 77] call FUNC(localEvent);
|
|
||||||
_expected = -1;
|
|
||||||
_result = GVAR(test_A3);
|
|
||||||
TEST_DEFINED_AND_OP(_result,==,_expected,"Test 3rd is removed after removeAll");
|
|
||||||
|
|
||||||
//Much harder to test network events
|
|
||||||
TRACE_2("testing network events",isServer,isDedicated);
|
|
||||||
|
|
||||||
["B", {GVAR(test_B) = _this}] call ace_common_fnc_addEventHandler;
|
|
||||||
|
|
||||||
GVAR(test_B) = -1;
|
|
||||||
["B", 33] call FUNC(globalEvent);
|
|
||||||
_expected = 33;
|
|
||||||
_result = GVAR(test_B);
|
|
||||||
TEST_DEFINED_AND_OP(_result,==,_expected,"Test globalEvent");
|
|
||||||
|
|
||||||
GVAR(test_B) = -1;
|
|
||||||
["B", 44] call FUNC(serverEvent);
|
|
||||||
_expected = if (isServer) then {44} else {-1};
|
|
||||||
_result = GVAR(test_B);
|
|
||||||
TEST_DEFINED_AND_OP(_result,==,_expected,"Test serverEvent");
|
|
||||||
|
|
@ -4,10 +4,10 @@ GVAR(placer) = objNull;
|
|||||||
GVAR(deployPFH) = -1;
|
GVAR(deployPFH) = -1;
|
||||||
|
|
||||||
// Deploy concertina wire if interact menu is opened
|
// Deploy concertina wire if interact menu is opened
|
||||||
["interactMenuOpened", {
|
["ace_interactMenuOpened", {
|
||||||
if (GVAR(deployPFH) != -1) then {
|
if (GVAR(deployPFH) != -1) then {
|
||||||
GVAR(placer) setVariable [QGVAR(wireDeployed), true];
|
GVAR(placer) setVariable [QGVAR(wireDeployed), true];
|
||||||
};
|
};
|
||||||
}] call EFUNC(common,addEventHandler);
|
}] call CBA_fnc_addEventHandler;
|
||||||
|
|
||||||
[QGVAR(vehicleDamage), {_this call FUNC(vehicleDamage)}] call EFUNC(common,addEventHandler);
|
[QGVAR(vehicleDamage), {_this call FUNC(vehicleDamage)}] call CBA_fnc_addEventHandler;
|
||||||
|
@ -15,3 +15,7 @@ class CfgPatches {
|
|||||||
|
|
||||||
#include "CfgEventHandlers.hpp"
|
#include "CfgEventHandlers.hpp"
|
||||||
#include "CfgVehicles.hpp"
|
#include "CfgVehicles.hpp"
|
||||||
|
|
||||||
|
class ACE_newEvents {
|
||||||
|
interactMenuOpened = "ace_interactMenuOpened";
|
||||||
|
};
|
||||||
|
@ -34,4 +34,4 @@ if (_distance > 14 || {_distance < 2}) exitWith {}; // Fix if shooting wire
|
|||||||
|
|
||||||
_vehicle = vehicle _killer;
|
_vehicle = vehicle _killer;
|
||||||
|
|
||||||
[QGVAR(vehicleDamage), [_vehicle], [_wire, _vehicle]] call EFUNC(common,targetEvent);
|
[QGVAR(vehicleDamage), [_wire, _vehicle], [_vehicle]] call CBA_fnc_targetEvent;
|
||||||
|
@ -30,4 +30,4 @@ GVAR(vectorConnected) = false;
|
|||||||
GVAR(noVectorData) = true;
|
GVAR(noVectorData) = true;
|
||||||
GVAR(vectorGrid) = "00000000";
|
GVAR(vectorGrid) = "00000000";
|
||||||
|
|
||||||
["RangerfinderData", FUNC(handleRangeFinderData)] call EFUNC(common,addEventHandler);
|
[QEGVAR(vector,rangefinderData), FUNC(handleRangeFinderData)] call CBA_fnc_addEventHandler;
|
||||||
|
@ -18,3 +18,7 @@ class CfgPatches {
|
|||||||
#include "CfgWeapons.hpp"
|
#include "CfgWeapons.hpp"
|
||||||
#include "Dialog.hpp"
|
#include "Dialog.hpp"
|
||||||
#include "RscTitles.hpp"
|
#include "RscTitles.hpp"
|
||||||
|
|
||||||
|
class ACE_newEvents {
|
||||||
|
RangerfinderData = QEGVAR(vector,rangefinderData);
|
||||||
|
};
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
#include "script_component.hpp"
|
#include "script_component.hpp"
|
||||||
|
|
||||||
["DisarmDropItems", FUNC(eventTargetStart)] call EFUNC(common,addEventHandler);
|
[QGVAR(dropItems), FUNC(eventTargetStart)] call CBA_fnc_addEventHandler;
|
||||||
["DisarmDebugCallback", FUNC(eventCallerFinish)] call EFUNC(common,addEventHandler);
|
[QGVAR(debugCallback), FUNC(eventCallerFinish)] call CBA_fnc_addEventHandler;
|
||||||
|
@ -18,3 +18,8 @@ class CfgPatches {
|
|||||||
#include "CfgWeapons.hpp"
|
#include "CfgWeapons.hpp"
|
||||||
|
|
||||||
#include "gui_disarm.hpp"
|
#include "gui_disarm.hpp"
|
||||||
|
|
||||||
|
class ACE_newEvents {
|
||||||
|
DisarmDebugCallback = QGVAR(debugCallback);
|
||||||
|
DisarmDropItems = QGVAR(dropItems);
|
||||||
|
};
|
||||||
|
@ -23,5 +23,5 @@ params ["_caller", "_target", "_errorMsg"];
|
|||||||
|
|
||||||
if (_errorMsg != "") then {
|
if (_errorMsg != "") then {
|
||||||
ACE_LOGINFO_2("%1 - eventTargetFinish: %2",CBA_missionTime,_this);
|
ACE_LOGINFO_2("%1 - eventTargetFinish: %2",CBA_missionTime,_this);
|
||||||
["DisarmDebugCallback", [_caller], [_caller, _target, _errorMsg]] call EFUNC(common,targetEvent);
|
[QGVAR(debugCallback), [_caller, _target, _errorMsg], [_caller]] call CBA_fnc_targetEvent;
|
||||||
};
|
};
|
||||||
|
@ -42,7 +42,7 @@ GVAR(disarmTarget) = _target;
|
|||||||
if (isNull GVAR(disarmTarget)) exitWith {ERROR("disarmTarget is null");};
|
if (isNull GVAR(disarmTarget)) exitWith {ERROR("disarmTarget is null");};
|
||||||
|
|
||||||
TRACE_2("Debug: Droping %1 from %2",_data,GVAR(disarmTarget));
|
TRACE_2("Debug: Droping %1 from %2",_data,GVAR(disarmTarget));
|
||||||
["DisarmDropItems", [GVAR(disarmTarget)], [ACE_player, GVAR(disarmTarget), [_data]]] call EFUNC(common,targetEvent);
|
[QGVAR(dropItems), [ACE_player, GVAR(disarmTarget), [_data]], [GVAR(disarmTarget)]] call CBA_fnc_targetEvent;
|
||||||
|
|
||||||
false //not sure what this does
|
false //not sure what this does
|
||||||
}];
|
}];
|
||||||
|
@ -3,13 +3,13 @@
|
|||||||
|
|
||||||
if (!hasInterface) exitWith {};
|
if (!hasInterface) exitWith {};
|
||||||
|
|
||||||
["playerInventoryChanged", {
|
["ace_playerInventoryChanged", {
|
||||||
params ["_unit"];
|
params ["_unit"];
|
||||||
[_unit] call FUNC(takeLoadedATWeapon);
|
[_unit] call FUNC(takeLoadedATWeapon);
|
||||||
[_unit] call FUNC(updateInventoryDisplay);
|
[_unit] call FUNC(updateInventoryDisplay);
|
||||||
}] call EFUNC(common,addEventHandler);
|
}] call CBA_fnc_addEventHandler;
|
||||||
|
|
||||||
// Register fire event handler
|
// Register fire event handler
|
||||||
// Only for the local player and for AI. Non-local players will handle it themselves
|
// Only for the local player and for AI. Non-local players will handle it themselves
|
||||||
["firedPlayer", DFUNC(replaceATWeapon)] call EFUNC(common,addEventHandler);
|
["ace_firedPlayer", DFUNC(replaceATWeapon)] call CBA_fnc_addEventHandler;
|
||||||
["firedNonPlayer", DFUNC(replaceATWeapon)] call EFUNC(common,addEventHandler);
|
["ace_firedNonPlayer", DFUNC(replaceATWeapon)] call CBA_fnc_addEventHandler;
|
||||||
|
@ -20,11 +20,11 @@ if (isNil "ACE_maxWeightCarry") then {
|
|||||||
["isNotCarrying", {!((_this select 0) getVariable [QGVAR(isCarrying), false])}] call EFUNC(common,addCanInteractWithCondition);
|
["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.
|
// release object on player change. This does work when returning to lobby, but not when hard disconnecting.
|
||||||
["playerChanged", {_this call FUNC(handlePlayerChanged)}] call EFUNC(common,addEventhandler);
|
["ace_playerChanged", {_this call FUNC(handlePlayerChanged)}] call CBA_fnc_addEventHandler;
|
||||||
["playerVehicleChanged", {[ACE_player, objNull] call FUNC(handlePlayerChanged)}] call EFUNC(common,addEventhandler);
|
["ace_playerVehicleChanged", {[ACE_player, objNull] call FUNC(handlePlayerChanged)}] call CBA_fnc_addEventHandler;
|
||||||
["playerWeaponChanged", {_this call FUNC(handlePlayerWeaponChanged)}] call EFUNC(common,addEventhandler);
|
["ace_playerWeaponChanged", {_this call FUNC(handlePlayerWeaponChanged)}] call CBA_fnc_addEventHandler;
|
||||||
|
|
||||||
// handle waking up dragged unit and falling unconscious while dragging
|
// handle waking up dragged unit and falling unconscious while dragging
|
||||||
["medical_onUnconscious", {_this call FUNC(handleUnconscious)}] call EFUNC(common,addEventhandler);
|
["ace_unconscious", {_this call FUNC(handleUnconscious)}] call CBA_fnc_addEventHandler;
|
||||||
|
|
||||||
//@todo Captivity?
|
//@todo Captivity?
|
||||||
|
@ -44,7 +44,7 @@ if (_target isKindOf "CAManBase") then {
|
|||||||
_target attachTo [_unit, _position];
|
_target attachTo [_unit, _position];
|
||||||
|
|
||||||
};
|
};
|
||||||
["setDir", _target, [_target, _direction]] call EFUNC(common,targetEvent);
|
[QEGVAR(common,setDir), [_target, _direction], _target] call CBA_fnc_targetEvent;
|
||||||
|
|
||||||
_unit setVariable [QGVAR(isCarrying), true, true];
|
_unit setVariable [QGVAR(isCarrying), true, true];
|
||||||
_unit setVariable [QGVAR(carriedObject), _target, true];
|
_unit setVariable [QGVAR(carriedObject), _target, true];
|
||||||
|
@ -33,7 +33,7 @@ _position = _position vectorAdd [0, 0, _offset];
|
|||||||
// attach object
|
// attach object
|
||||||
TRACE_3("attaching",_position,_offset,_direction);
|
TRACE_3("attaching",_position,_offset,_direction);
|
||||||
_target attachTo [_unit, _position];
|
_target attachTo [_unit, _position];
|
||||||
["setDir", _target, [_target, _direction]] call EFUNC(common,targetEvent);
|
[QEGVAR(common,setDir), [_target, _direction], _target] call CBA_fnc_targetEvent;
|
||||||
|
|
||||||
if (_target isKindOf "CAManBase") then {
|
if (_target isKindOf "CAManBase") then {
|
||||||
[_target, "AinjPpneMrunSnonWnonDb_still", 0, true] call EFUNC(common,doAnimation);
|
[_target, "AinjPpneMrunSnonWnonDb_still", 0, true] call EFUNC(common,doAnimation);
|
||||||
|
@ -30,8 +30,8 @@ if !(_unit getVariable ["ACE_isUnconscious", false]) then {
|
|||||||
};
|
};
|
||||||
|
|
||||||
// prevent collision damage
|
// prevent collision damage
|
||||||
["fixCollision", _unit] call EFUNC(common,localEvent);
|
[QEGVAR(common,fixCollision), _unit] call CBA_fnc_localEvent;
|
||||||
["fixCollision", _target, _target] call EFUNC(common,targetEvent);
|
[QEGVAR(common,fixCollision), _target, _target] call CBA_fnc_targetEvent;
|
||||||
|
|
||||||
// release object
|
// release object
|
||||||
detach _target;
|
detach _target;
|
||||||
@ -62,8 +62,8 @@ _unit setVariable [QGVAR(draggedObject), objNull, true];
|
|||||||
[objNull, _target, true] call EFUNC(common,claim);
|
[objNull, _target, true] call EFUNC(common,claim);
|
||||||
|
|
||||||
if !(_target isKindOf "CAManBase") then {
|
if !(_target isKindOf "CAManBase") then {
|
||||||
["fixPosition", _target, _target] call EFUNC(common,targetEvent);
|
[QEGVAR(common,fixPosition), _target, _target] call CBA_fnc_targetEvent;
|
||||||
["fixFloating", _target, _target] call EFUNC(common,targetEvent);
|
[QEGVAR(common,fixFloating), _target, _target] call CBA_fnc_targetEvent;
|
||||||
};
|
};
|
||||||
|
|
||||||
if (_unit getVariable ["ACE_isUnconscious", false]) then {
|
if (_unit getVariable ["ACE_isUnconscious", false]) then {
|
||||||
|
@ -25,8 +25,8 @@ TRACE_2("params",_unit,_target);
|
|||||||
private _inBuilding = [_unit] call FUNC(isObjectOnObject);
|
private _inBuilding = [_unit] call FUNC(isObjectOnObject);
|
||||||
|
|
||||||
// prevent collision damage
|
// prevent collision damage
|
||||||
["fixCollision", _unit] call EFUNC(common,localEvent);
|
[QEGVAR(common,fixCollision), _unit] call CBA_fnc_localEvent;
|
||||||
["fixCollision", _target, _target] call EFUNC(common,targetEvent);
|
[QEGVAR(common,fixCollision), _target, _target] call CBA_fnc_targetEvent;
|
||||||
|
|
||||||
// release object
|
// release object
|
||||||
detach _target;
|
detach _target;
|
||||||
@ -67,8 +67,8 @@ _unit setVariable [QGVAR(carriedObject), objNull, true];
|
|||||||
[objNull, _target, true] call EFUNC(common,claim);
|
[objNull, _target, true] call EFUNC(common,claim);
|
||||||
|
|
||||||
if !(_target isKindOf "CAManBase") then {
|
if !(_target isKindOf "CAManBase") then {
|
||||||
["fixPosition", _target, _target] call EFUNC(common,targetEvent);
|
[QEGVAR(common,fixPosition), _target, _target] call CBA_fnc_targetEvent;
|
||||||
["fixFloating", _target, _target] call EFUNC(common,targetEvent);
|
[QEGVAR(common,fixFloating), _target, _target] call CBA_fnc_targetEvent;
|
||||||
};
|
};
|
||||||
|
|
||||||
// recreate UAV crew
|
// recreate UAV crew
|
||||||
|
@ -42,6 +42,6 @@ _carriedItem attachTo [_unit];
|
|||||||
|
|
||||||
//reset the carry direction
|
//reset the carry direction
|
||||||
private _direction = _carriedItem getVariable [QGVAR(carryDirection), 0];
|
private _direction = _carriedItem getVariable [QGVAR(carryDirection), 0];
|
||||||
["setDir", _carriedItem, [_carriedItem, _direction]] call EFUNC(common,targetEvent);
|
[QEGVAR(common,setDir), [_carriedItem, _direction], _carriedItem] call CBA_fnc_targetEvent;
|
||||||
|
|
||||||
true
|
true
|
||||||
|
@ -44,31 +44,24 @@ class CfgVehicles {
|
|||||||
class CBA_Extended_EventHandlers: CBA_Extended_EventHandlers {};
|
class CBA_Extended_EventHandlers: CBA_Extended_EventHandlers {};
|
||||||
};
|
};
|
||||||
|
|
||||||
author = "ACE";
|
author = ECSTRING(common,Author);
|
||||||
_generalMacro = "ACE_DefuseObject";
|
_generalMacro = "ACE_DefuseObject";
|
||||||
displayName = "ACE Defuse Helper";
|
displayName = "ACE Defuse Helper";
|
||||||
mapSize = 0.2;
|
|
||||||
icon = "iconObject_1x2";
|
|
||||||
model = "\A3\Weapons_f\dummyweapon.p3d";
|
model = "\A3\Weapons_f\dummyweapon.p3d";
|
||||||
scope = 1;
|
scope = 1;
|
||||||
vehicleClass = "Cargo";
|
|
||||||
class ACE_Actions {
|
class ACE_Actions {
|
||||||
class ACE_MainActions {
|
|
||||||
selection = "";
|
|
||||||
distance = 1;
|
|
||||||
condition = "true";
|
|
||||||
class ACE_Defuse {
|
class ACE_Defuse {
|
||||||
|
distance = 1;
|
||||||
displayName = CSTRING(Defuse);
|
displayName = CSTRING(Defuse);
|
||||||
condition = QUOTE([ARR_2(_player,_target)] call FUNC(canDefuse));
|
condition = QUOTE([ARR_2(_player,_target)] call FUNC(canDefuse));
|
||||||
statement = QUOTE([ARR_2(_player,_target)] call FUNC(startDefuse););
|
statement = QUOTE([ARR_2(_player,_target)] call FUNC(startDefuse););
|
||||||
exceptions[] = {"isNotSwimming"};
|
exceptions[] = {"isNotSwimming"};
|
||||||
showDisabled = 0;
|
|
||||||
icon = QPATHTOF(UI\Defuse_ca.paa);
|
icon = QPATHTOF(UI\Defuse_ca.paa);
|
||||||
priority = 0.8;
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
class ACE_Explosives_Place: Items_base_F {
|
class ACE_Explosives_Place: Items_base_F {
|
||||||
class EventHandlers {
|
class EventHandlers {
|
||||||
class CBA_Extended_EventHandlers: CBA_Extended_EventHandlers {};
|
class CBA_Extended_EventHandlers: CBA_Extended_EventHandlers {};
|
||||||
|
@ -16,19 +16,20 @@
|
|||||||
#include "script_component.hpp"
|
#include "script_component.hpp"
|
||||||
|
|
||||||
//Event for setting explosive placement angle/pitch:
|
//Event for setting explosive placement angle/pitch:
|
||||||
[QGVAR(place), {_this call FUNC(setPosition)}] call EFUNC(common,addEventHandler);
|
[QGVAR(place), {_this call FUNC(setPosition)}] call CBA_fnc_addEventHandler;
|
||||||
|
[QGVAR(startDefuse), FUNC(startDefuse)] call CBA_fnc_addEventHandler;
|
||||||
|
|
||||||
//When getting knocked out in medical, trigger deadman explosives:
|
//When getting knocked out in medical, trigger deadman explosives:
|
||||||
//Event is global, only run on server (ref: ace_medical_fnc_setUnconscious)
|
//Event is global, only run on server (ref: ace_medical_fnc_setUnconscious)
|
||||||
if (isServer) then {
|
if (isServer) then {
|
||||||
["medical_onUnconscious", {
|
["ace_unconscious", {
|
||||||
params ["_unit", "_isUnconscious"];
|
params ["_unit", "_isUnconscious"];
|
||||||
if (!_isUnconscious) exitWith {};
|
if (!_isUnconscious) exitWith {};
|
||||||
TRACE_1("Knocked Out, Doing Deadman", _unit);
|
TRACE_1("Knocked Out, Doing Deadman", _unit);
|
||||||
[_unit] call FUNC(onIncapacitated);
|
[_unit] call FUNC(onIncapacitated);
|
||||||
}] call EFUNC(common,addEventHandler);
|
}] call CBA_fnc_addEventHandler;
|
||||||
|
|
||||||
["clientRequestsOrientations", {
|
[QGVAR(clientRequestOrientations), {
|
||||||
params ["_logic"];
|
params ["_logic"];
|
||||||
TRACE_1("clientRequestsOrientations received:",_logic);
|
TRACE_1("clientRequestsOrientations received:",_logic);
|
||||||
// Filter the array before sending it
|
// Filter the array before sending it
|
||||||
@ -37,8 +38,8 @@ if (isServer) then {
|
|||||||
(!isNull _explosive && {alive _explosive})
|
(!isNull _explosive && {alive _explosive})
|
||||||
};
|
};
|
||||||
TRACE_1("serverSendsOrientations sent:",GVAR(explosivesOrientations));
|
TRACE_1("serverSendsOrientations sent:",GVAR(explosivesOrientations));
|
||||||
["serverSendsOrientations", _logic, [GVAR(explosivesOrientations)]] call EFUNC(common,targetEvent);
|
[QGVAR(serverSendOrientations), [GVAR(explosivesOrientations)], _logic] call CBA_fnc_targetEvent;
|
||||||
}] call EFUNC(common,addEventHandler);
|
}] call CBA_fnc_addEventHandler;
|
||||||
};
|
};
|
||||||
|
|
||||||
if (!hasInterface) exitWith {};
|
if (!hasInterface) exitWith {};
|
||||||
@ -51,7 +52,7 @@ GVAR(CurrentSpeedDial) = 0;
|
|||||||
// In case we are a JIP client, ask the server for orientation of any previously
|
// In case we are a JIP client, ask the server for orientation of any previously
|
||||||
// placed mine.
|
// placed mine.
|
||||||
if (didJIP) then {
|
if (didJIP) then {
|
||||||
["serverSendsOrientations", {
|
[QGVAR(serverSendOrientations), {
|
||||||
params ["_explosivesOrientations"];
|
params ["_explosivesOrientations"];
|
||||||
TRACE_1("serverSendsOrientations received:",_explosivesOrientations);
|
TRACE_1("serverSendsOrientations received:",_explosivesOrientations);
|
||||||
{
|
{
|
||||||
@ -61,15 +62,15 @@ if (didJIP) then {
|
|||||||
} forEach _explosivesOrientations;
|
} forEach _explosivesOrientations;
|
||||||
deleteVehicle GVAR(localLogic);
|
deleteVehicle GVAR(localLogic);
|
||||||
GVAR(localLogic) = nil;
|
GVAR(localLogic) = nil;
|
||||||
}] call EFUNC(common,addEventHandler);
|
}] call CBA_fnc_addEventHandler;
|
||||||
|
|
||||||
// Create a logic to get the client ID
|
// Create a logic to get the client ID
|
||||||
GVAR(localLogic) = ([sideLogic] call CBA_fnc_getSharedGroup) createUnit ["Logic", [0,0,0], [], 0, "NONE"];
|
GVAR(localLogic) = ([sideLogic] call CBA_fnc_getSharedGroup) createUnit ["Logic", [0,0,0], [], 0, "NONE"];
|
||||||
TRACE_1("clientRequestsOrientations sent:",GVAR(localLogic));
|
TRACE_1("clientRequestsOrientations sent:",GVAR(localLogic));
|
||||||
["clientRequestsOrientations", [GVAR(localLogic)]] call EFUNC(common,serverEvent);
|
[QGVAR(clientRequestOrientations), [GVAR(localLogic)]] call CBA_fnc_serverEvent;
|
||||||
};
|
};
|
||||||
|
|
||||||
["interactMenuOpened", {
|
["ace_interactMenuOpened", {
|
||||||
//Cancel placement if interact menu opened
|
//Cancel placement if interact menu opened
|
||||||
if (GVAR(pfeh_running)) then {
|
if (GVAR(pfeh_running)) then {
|
||||||
GVAR(placeAction) = PLACE_CANCEL;
|
GVAR(placeAction) = PLACE_CANCEL;
|
||||||
@ -78,4 +79,4 @@ if (didJIP) then {
|
|||||||
//Show defuse actions on CfgAmmos (allMines):
|
//Show defuse actions on CfgAmmos (allMines):
|
||||||
_this call FUNC(interactEH);
|
_this call FUNC(interactEH);
|
||||||
|
|
||||||
}] call EFUNC(common,addEventHandler);
|
}] call CBA_fnc_addEventHandler;
|
||||||
|
@ -43,3 +43,8 @@ class CfgMineTriggers {
|
|||||||
mineTriggerRange = 1;
|
mineTriggerRange = 1;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
class ACE_newEvents {
|
||||||
|
clientRequestsOrientations = QGVAR(clientRequestOrientations);
|
||||||
|
serverSendsOrientations = QGVAR(serverSendOrientations);
|
||||||
|
};
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user