Merge branch 'cbaEventSystem' into removeLineDrawing

This commit is contained in:
PabstMirror 2016-06-07 11:12:52 -05:00
commit aea086b75e
152 changed files with 284 additions and 523 deletions

View File

@ -21,9 +21,3 @@ class CfgPatches {
class ACE_Extensions {
extensions[] += {"ace_advanced_ballistics"};
};
class ACE_newEvents {
SettingsInitialized = "ace_settingsInitialized";
firedPlayerNonLocal = "ace_firedPlayerNonLocal";
firedPlayer = "ace_firedPlayer";
};

View File

@ -32,7 +32,7 @@ if (isServer) then {
[QGVAR(setSurrendered), {_this call FUNC(setSurrendered)}] call CBA_fnc_addEventHandler;
//Medical Integration Events
["ace_medical_onUnconscious", {_this call ACE_Captives_fnc_handleOnUnconscious}] call CBA_fnc_addEventHandler;
["ace_unconscious", {_this call ACE_Captives_fnc_handleOnUnconscious}] call CBA_fnc_addEventHandler;
if (!hasInterface) exitWith {};

View File

@ -21,12 +21,9 @@ class CfgPatches {
#include "CfgEden.hpp"
class ACE_newEvents {
SettingsInitialized = "ace_settingsInitialized";
medical_onUnconscious = "ace_medical_onUnconscious";
SetSurrendered = QGVAR(setSurrendered);
SetHandcuffed = QGVAR(setHandcuffed);
MoveOutCaptive = QGVAR(moveOutCaptive);
MoveInCaptive = QGVAR(moveInCaptive);
playerChanged = "ace_playerChanged";
CaptiveStatusChanged = "ace_captiveStatusChanged";
};

View File

@ -1,6 +1,6 @@
/*
* Author: commy2, PabstMirror
* Handles the "medical_onUnconscious" event
* Handles the "ace_unconscious" event
*
* Arguments:
* 0: Unit <OBJECT>

View File

@ -13,7 +13,7 @@
private _itemName = getText (configFile >> "CfgVehicles" >> typeOf _item >> "displayName");
private _vehicleName = getText (configFile >> "CfgVehicles" >> typeOf _vehicle >> "displayName");
["ace_displayTextStructured", [[_hint, _itemName, _vehicleName], 3.0]] call CBA_fnc_localEvent;
[[_hint, _itemName, _vehicleName], 3.0] call EFUNC(common,displayTextStructured);
if (_loaded) then {
// Invoke listenable event
@ -34,7 +34,7 @@
private _itemName = getText (configFile >> "CfgVehicles" >> _itemClass >> "displayName");
private _vehicleName = getText (configFile >> "CfgVehicles" >> typeOf _vehicle >> "displayName");
["ace_displayTextStructured", [[_hint, _itemName, _vehicleName], 3.0]] call CBA_fnc_localEvent;
[[_hint, _itemName, _vehicleName], 3.0] call EFUNC(common,displayTextStructured);
if (_unloaded) then {
// Invoke listenable event

View File

@ -21,11 +21,9 @@ class CfgPatches {
class ACE_newEvents {
LoadCargo = "ace_loadCargo";
cargoUnloaded = "ace_cargoUnloaded";
displayTextStructured = "ace_displayTextStructured";
cargoLoaded = "ace_cargoLoaded";
AddCargoByClass = "ace_addCargoByClass";
ServerUnloadCargo = QGVAR(serverUnload);
UnloadCargo = "ace_unloadCargo";
hideObjectGlobal = "ace_hideObjectGlobal";
cargoAddedByClass = "ace_cargoAddedByClass";
};

View File

@ -35,7 +35,7 @@ _vehicle setVariable [QGVAR(space), _space - _itemSize, true];
if (_item isEqualType objNull) then {
detach _item;
_item attachTo [_vehicle,[0,0,-100]];
["ace_hideObjectGlobal", [_item, true]] call CBA_fnc_serverEvent;
[QEGVAR(common,hideObjectGlobal), [_item, true]] call CBA_fnc_serverEvent;
};
true

View File

@ -48,7 +48,7 @@ if ([_object, _vehicle] call FUNC(canLoadItemIn)) then {
} else {
private _displayName = getText (configFile >> "CfgVehicles" >> typeOf _object >> "displayName");
["ace_displayTextStructured", [[LSTRING(LoadingFailed), _displayName], 3.0]] call CBA_fnc_localEvent;
[[LSTRING(LoadingFailed), _displayName], 3.0] call EFUNC(common,displayTextStructured);
};
_return

View File

@ -47,5 +47,5 @@ if ([_item, GVAR(interactionVehicle), ACE_player] call FUNC(canUnloadItem)) then
private _itemClass = if (_item isEqualType "") then {_item} else {typeOf _item};
private _displayName = getText (configFile >> "CfgVehicles" >> _itemClass >> "displayName");
["ace_displayTextStructured", [[LSTRING(UnloadingFailed), _displayName], 3.0]] call CBA_fnc_localEvent;
[[LSTRING(UnloadingFailed), _displayName], 3.0] call EFUNC(common,displayTextStructured);
};

View File

@ -29,7 +29,7 @@ if ((count _emptyPosAGL) != 3) exitWith {
TRACE_4("Could not find unload pos",_vehicle,getPosASL _vehicle,isTouchingGround _vehicle,speed _vehicle);
if ((!isNull _unloader) && {_unloader == ACE_player}) then {
//display text saying there are no safe places to exit the vehicle
["ace_displayTextStructured", [localize ELSTRING(common,NoRoomToUnload)]] call CBA_fnc_localEvent;
[localize ELSTRING(common,NoRoomToUnload)] call EFUNC(common,displayTextStructured);
};
false
};

View File

@ -1,7 +1,7 @@
class RscInGameUI {
class RscUnitInfo {
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;);
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 {

View File

@ -18,29 +18,29 @@
//////////////////////////////////////////////////
//Status Effect EHs:
["ace_setStatusEffect", {_this call FUNC(statusEffect_set)}] call CBA_fnc_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);
["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);
["blockEngine", false, ["ACE_Refuel"]] call FUNC(statusEffect_addType);
["ace_forceWalk", {
[QGVAR(forceWalk), {
params ["_object", "_set"];
TRACE_2("forceWalk EH",_object,_set);
_object forceWalk (_set > 0);
}] 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"];
TRACE_2("blockSprint EH",_object,_set);
_object allowSprint (_set == 0);
}] call CBA_fnc_addEventHandler;
["setCaptive", {
[QGVAR(setCaptive), {
params ["_object", "_set"];
TRACE_2("setCaptive EH",_object,_set);
_object setCaptive (_set > 0);
}] 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"];
if ((_object isKindOf "CAManBase") && {(["ace_medical"] call FUNC(isModLoaded))}) then {
TRACE_2("blockDamage EH (using medical)",_object,_set);
@ -50,7 +50,7 @@
_object allowDamage (_set == 0);
};
}] call CBA_fnc_addEventHandler;
["blockEngine", {
[QGVAR(blockEngine), {
params ["_vehicle", "_set"];
_vehicle setVariable [QGVAR(blockEngine), _set > 0, true];
_vehicle engineOn false;
@ -75,7 +75,7 @@ if (isServer) then {
};
// Listens for global "SettingChanged" events, to update the force status locally
["SettingChanged", {
["ace_settingChanged", {
params ["_name", "_value", "_force"];
if (_force) then {
@ -89,38 +89,38 @@ if (isServer) then {
// Event to log Fix Headbug output
["HeadbugFixUsed", {
[QGVAR(headbugFixUsed), {
params ["_profileName", "_animation"];
ACE_LOGINFO_2("Headbug Used: Name: %1, Animation: %2",_profileName,_animation);
}] call CBA_fnc_addEventHandler;
["ace_fixCollision", FUNC(fixCollision)] call CBA_fnc_addEventHandler;
["ace_fixFloating", FUNC(fixFloating)] call CBA_fnc_addEventHandler;
["ace_fixPosition", FUNC(fixPosition)] call CBA_fnc_addEventHandler;
[QGVAR(fixCollision), FUNC(fixCollision)] call CBA_fnc_addEventHandler;
[QGVAR(fixFloating), FUNC(fixFloating)] call CBA_fnc_addEventHandler;
[QGVAR(fixPosition), FUNC(fixPosition)] call CBA_fnc_addEventHandler;
["ace_loadPersonEvent", FUNC(loadPersonLocal)] call CBA_fnc_addEventHandler;
["ace_unloadPersonEvent", FUNC(unloadPersonLocal)] call CBA_fnc_addEventHandler;
["lockVehicle", {
[QGVAR(lockVehicle), {
_this setVariable [QGVAR(lockStatus), locked _this];
_this lock 2;
}] call CBA_fnc_addEventHandler;
["unlockVehicle", {
[QGVAR(unlockVehicle), {
_this lock (_this getVariable [QGVAR(lockStatus), locked _this]);
}] call CBA_fnc_addEventHandler;
["ace_setDir", {(_this select 0) setDir (_this select 1)}] call CBA_fnc_addEventHandler;
["ace_setFuel", {(_this select 0) setFuel (_this select 1)}] call CBA_fnc_addEventHandler;
["ace_engineOn", {(_this select 0) engineOn (_this select 1)}] call CBA_fnc_addEventHandler;
["ace_setSpeaker", {(_this select 0) setSpeaker (_this select 1)}] call CBA_fnc_addEventHandler;
["ace_selectLeader", {(_this select 0) selectLeader (_this select 1)}] call CBA_fnc_addEventHandler;
["ace_setVelocity", {(_this select 0) setVelocity (_this select 1)}] call CBA_fnc_addEventHandler;
["ace_playMove", {(_this select 0) playMove (_this select 1)}] call CBA_fnc_addEventHandler;
["ace_playMoveNow", {(_this select 0) playMoveNow (_this select 1)}] call CBA_fnc_addEventHandler;
["ace_switchMove", {(_this select 0) switchMove (_this select 1)}] call CBA_fnc_addEventHandler;
["ace_setVectorDirAndUp", {(_this select 0) setVectorDirAndUp (_this select 1)}] call CBA_fnc_addEventHandler;
["ace_setVanillaHitPointDamage", {(_this select 0) setHitPointDamage (_this select 1)}] call CBA_fnc_addEventHandler;
[QGVAR(setDir), {(_this select 0) setDir (_this select 1)}] call CBA_fnc_addEventHandler;
[QGVAR(setFuel), {(_this select 0) setFuel (_this select 1)}] call CBA_fnc_addEventHandler;
[QGVAR(engineOn), {(_this select 0) engineOn (_this select 1)}] call CBA_fnc_addEventHandler;
[QGVAR(setSpeaker), {(_this select 0) setSpeaker (_this select 1)}] call CBA_fnc_addEventHandler;
[QGVAR(selectLeader), {(_this select 0) selectLeader (_this select 1)}] call CBA_fnc_addEventHandler;
[QGVAR(setVelocity), {(_this select 0) setVelocity (_this select 1)}] call CBA_fnc_addEventHandler;
[QGVAR(playMove), {(_this select 0) playMove (_this select 1)}] call CBA_fnc_addEventHandler;
[QGVAR(playMoveNow), {(_this select 0) playMoveNow (_this select 1)}] call CBA_fnc_addEventHandler;
[QGVAR(switchMove), {(_this select 0) switchMove (_this select 1)}] call CBA_fnc_addEventHandler;
[QGVAR(setVectorDirAndUp), {(_this select 0) setVectorDirAndUp (_this select 1)}] call CBA_fnc_addEventHandler;
[QGVAR(setVanillaHitPointDamage), {(_this select 0) setHitPointDamage (_this select 1)}] call CBA_fnc_addEventHandler;
// Request framework
[QGVAR(requestCallback), FUNC(requestCallback)] call CBA_fnc_addEventHandler;
@ -129,8 +129,8 @@ if (isServer) then {
[QGVAR(systemChatGlobal), {systemChat _this}] call CBA_fnc_addEventHandler;
if (isServer) then {
["ace_hideObjectGlobal", {(_this select 0) hideObjectGlobal (_this select 1)}] call CBA_fnc_addEventHandler;
["ace_enableSimulationGlobal", {(_this select 0) enableSimulationGlobal (_this select 1)}] call CBA_fnc_addEventHandler;
[QGVAR(hideObjectGlobal), {(_this select 0) hideObjectGlobal (_this select 1)}] call CBA_fnc_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;
};
@ -143,16 +143,16 @@ if (isServer) then {
// Synced ACE events
// Handle JIP scenario
if (!isServer) then {
["PlayerJip", {
["ace_playerJIP", {
ACE_LOGINFO("JIP event synchronization initialized");
["ace_SEH_all", [player]] call CBA_fnc_serverEvent;
["ACEa", [player]] call CBA_fnc_serverEvent;
}] call CBA_fnc_addEventHandler;
} else {
["ace_SEH_all", FUNC(_handleRequestAllSyncedEvents)] call CBA_fnc_addEventHandler;
["ACEa", FUNC(_handleRequestAllSyncedEvents)] call CBA_fnc_addEventHandler;
};
["ace_SEH", FUNC(_handleSyncedEvent)] call CBA_fnc_addEventHandler;
["ace_SEH_s", FUNC(_handleRequestSyncedEvent)] call CBA_fnc_addEventHandler;
["ACEe", FUNC(_handleSyncedEvent)] call CBA_fnc_addEventHandler;
["ACEs", FUNC(_handleRequestSyncedEvent)] call CBA_fnc_addEventHandler;
if (isServer) then {
[FUNC(syncedEventPFH), 0.5, []] call CBA_fnc_addPerFrameHandler;
@ -221,7 +221,7 @@ call FUNC(checkFiles);
[] call FUNC(readSettingsFromParamsArray);
};
// Event so that ACE_Modules have their settings loaded:
["ace_initSettingsFromModules", []] call CBA_fnc_localEvent;
[QGVAR(initSettingsFromModules), []] call CBA_fnc_localEvent;
if (isServer) then {
// Publish all settings data after all configs and modules are read
@ -284,7 +284,7 @@ enableCamShake true;
//////////////////////////////////////////////////
// Set the name for the current player
["playerChanged", {
["ace_playerChanged", {
params ["_newPlayer","_oldPlayer"];
if (alive _newPlayer) then {
@ -426,10 +426,10 @@ GVAR(OldIsCamera) = false;
// Eventhandlers for player controlled machines
//////////////////////////////////////////////////
["ace_displayTextStructured", {_this call FUNC(displayTextStructured)}] call CBA_fnc_addEventHandler;
["ace_displayTextPicture", {_this call FUNC(displayTextPicture)}] call CBA_fnc_addEventHandler;
[QGVAR(displayTextStructured), {_this call FUNC(displayTextStructured)}] call CBA_fnc_addEventHandler;
[QGVAR(displayTextPicture), {_this call FUNC(displayTextPicture)}] call CBA_fnc_addEventHandler;
["medical_onUnconscious", {
["ace_unconscious", {
params ["_unit", "_isUnconscious"];
if (local _unit && {!_isUnconscious}) then {
@ -475,7 +475,7 @@ if (didJip) then {
// We are jipping! Get ready and wait, and throw the event
[{
if(!isNull player && GVAR(settingsInitFinished)) then {
["ace_playerJip", [player]] call CBA_fnc_localEvent;
["ace_playerJIP", [player]] call CBA_fnc_localEvent;
[_this select 1] call CBA_fnc_removePerFrameHandler;
};
}, 0, []] call CBA_fnc_addPerFrameHandler;

View File

@ -15,11 +15,15 @@ class CfgPatches {
// This class will be deprecated in version 3.8.0
class ACE_newEvents {
forceWalk = "ace_forceWalk";
PlayerJip = "ace_playerJip";
useItem = "ace_useItem";
displayTextPicture = "ace_displayTextPicture";
displayTextStructured = "ace_displayTextStructured";
// 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";
@ -30,40 +34,47 @@ class ACE_newEvents {
playerVehicleChanged = "ace_playerVehicleChanged";
playerChanged = "ace_playerChanged";
SettingsInitialized = "ace_settingsInitialized";
InitSettingsFromModules = "ace_initSettingsFromModules";
SEH_s = "ace_SEH_s";
SEH = "ace_SEH";
SEH_all = "ace_SEH_all";
enableSimulationGlobal = "ace_enableSimulationGlobal";
hideObjectGlobal = "ace_hideObjectGlobal";
setVanillaHitPointDamage = "ace_setVanillaHitPointDamage";
setVectorDirAndUp = "ace_setVectorDirAndUp";
switchMove = "ace_switchMove";
playMoveNow = "ace_playMoveNow";
playMove = "ace_playMove";
setVelocity = "ace_setVelocity";
selectLeader = "ace_selectLeader";
setSpeaker = "ace_setSpeaker";
engineOn = "ace_engineOn";
setFuel = "ace_setFuel";
setDir = "ace_setDir";
unloadPersonEvent = "ace_unloadPersonEvent";
loadPersonEvent = "ace_loadPersonEvent";
fixPosition = "ace_fixPosition";
fixFloating = "ace_fixFloating";
fixCollision = "ace_fixCollision";
setStatusEffect = "ace_setStatusEffect";
SettingChanged = "ace_settingChanged";
HeadbugFixUsed = "ace_headbugFixUsed";
blockDamage = "ace_blockDamage";
firedNonPlayerVehicle = "ace_firedNonPlayerVehicle";
firedPlayerVehicleNonLocal = "ace_firedPlayerVehicleNonLocal";
firedPlayerVehicle = "ace_firedPlayerVehicle";
firedNonPlayer = "ace_firedNonPlayer";
firedPlayerNonLocal = "ace_firedPlayerNonLocal";
firedPlayer = "ace_firedPlayer";
unlockVehicle = "ace_unlockVehicle";
lockVehicle = "ace_lockVehicle";
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"

View File

@ -18,7 +18,7 @@ params ["_client"];
private _eventEntry = HASH_GET(GVAR(syncedEvents),_x);
_eventEntry params ["", "_eventLog"];
["ace_SEH_s", [_x, _eventLog], _client] call CBA_fnc_targetEvent;
["ACEs", [_x, _eventLog], _client] call CBA_fnc_targetEvent;
false
} count (GVAR(syncedEvents) select 0);

View File

@ -30,7 +30,7 @@ if (isServer) then {
private _eventEntry = HASH_GET(GVAR(syncedEvents),_eventName);
_eventEntry params ["", "_eventLog"];
["ace_SEH_s", [_eventName, _eventLog], _client] call CBA_fnc_targetEvent;
["ACEs", [_eventName, _eventLog], _client] call CBA_fnc_targetEvent;
} else {
params ["_eventName", "_eventLog"];

View File

@ -28,9 +28,9 @@ _target setVariable [QGVAR(owner), _unit, true];
// lock target object
if (_lockTarget) then {
if (!isNull _unit) then {
["ace_lockVehicle", _target, _target] call CBA_fnc_targetEvent;
[QGVAR(lockVehicle), _target, _target] call CBA_fnc_targetEvent;
} else {
["ace_unlockVehicle", _target, _target] call CBA_fnc_targetEvent;
[QGVAR(unlockVehicle), _target, _target] call CBA_fnc_targetEvent;
};
};

View File

@ -41,34 +41,34 @@ TRACE_2("",local _unit,vehicle _unit);
switch (_priority) do {
case 0: {
if (_unit == vehicle _unit) then {
["ace_playMove", [_unit, _animation], _unit] call CBA_fnc_targetEvent;
[QGVAR(playMove), [_unit, _animation], _unit] call CBA_fnc_targetEvent;
} else {
// Execute on all machines. PlayMove and PlayMoveNow are bugged: They have no global effects when executed on remote machines inside vehicles.
["ace_playMove", [_unit, _animation]] call CBA_fnc_globalEvent;
[QGVAR(playMove), [_unit, _animation]] call CBA_fnc_globalEvent;
};
};
case 1: {
if (_unit == vehicle _unit) then {
["ace_playMoveNow", [_unit, _animation], _unit] call CBA_fnc_targetEvent;
[QGVAR(playMoveNow), [_unit, _animation], _unit] call CBA_fnc_targetEvent;
} else {
// Execute on all machines. PlayMove and PlayMoveNow are bugged: They have no global effects when executed on remote machines inside vehicles.
["ace_playMoveNow", [_unit, _animation]] call CBA_fnc_globalEvent;
[QGVAR(playMoveNow), [_unit, _animation]] call CBA_fnc_globalEvent;
};
};
case 2: {
// try playMoveNow first
if (_unit == vehicle _unit) then {
["ace_playMoveNow", [_unit, _animation], _unit] call CBA_fnc_targetEvent;
[QGVAR(playMoveNow), [_unit, _animation], _unit] call CBA_fnc_targetEvent;
} else {
// Execute on all machines. PlayMove and PlayMoveNow are bugged: They have no global effects when executed on remote machines inside vehicles.
["ace_playMoveNow", [_unit, _animation]] call CBA_fnc_globalEvent;
[QGVAR(playMoveNow), [_unit, _animation]] call CBA_fnc_globalEvent;
};
// if animation doesn't respond, do switchMove
if (animationState _unit != _animation) then {
TRACE_1("did not respond to playMoveNow",animationState _unit);
// Execute on all machines. SwitchMove has local effects.
["ace_switchMove", [_unit, _animation]] call CBA_fnc_globalEvent;
[QGVAR(switchMove), [_unit, _animation]] call CBA_fnc_globalEvent;
};
};
default {};

View File

@ -21,7 +21,7 @@ if (!local _object) exitWith {};
if (_object isKindOf "CAManBase") exitWith {};
//We need to manually set allowDamage to true for setHitIndex to function
["ace_blockDamage", [_object, 0]] call CBA_fnc_localEvent;
[QGVAR(blockDamage), [_object, 0]] call CBA_fnc_localEvent;
// save and restore hitpoints, see below why
private _hitPointDamages = getAllHitPointsDamage _object;
@ -41,4 +41,4 @@ _object setDamage damage _object;
//manually re-enable allowDamage to previous setting (ref statusEffect_funcs)
private _effectVarName = format [QGVAR(effect_%1), "blockDamage"];
private _effectNumber = _object getVariable [_effectVarName, 0];
["ace_blockDamage", [_object, _effectNumber]] call CBA_fnc_localEvent;
[QGVAR(blockDamage), [_object, _effectNumber]] call CBA_fnc_localEvent;

View File

@ -17,8 +17,8 @@
private _unit = ACE_player;
private _anim = animationState _unit;
["ace_headbugFixUsed", [profileName, _anim]] call CBA_fnc_serverEvent;
["ace_headbugFixUsed", [profileName, _anim]] call CBA_fnc_localEvent;
[QGVAR(headbugFixUsed), [profileName, _anim]] call CBA_fnc_serverEvent;
[QGVAR(headbugFixUsed), [profileName, _anim]] call CBA_fnc_localEvent;
if (_unit != vehicle _unit || {!([_unit, objNull, ["isNotSitting"]] call FUNC(canInteractWith))}) exitWith {false};

View File

@ -28,5 +28,5 @@ if !(_reason in _setHiddenReasons) then {
};
if !(isObjectHidden _unit) then {
["ace_hideObjectGlobal", [_unit, true]] call CBA_fnc_serverEvent;
[QGVAR(hideObjectGlobal), [_unit, true]] call CBA_fnc_serverEvent;
};

View File

@ -29,6 +29,6 @@ private _speaker = speaker _unit;
if (_speaker == "ACE_NoVoice") exitWith {};
["ace_setSpeaker", [_unit, "ACE_NoVoice"]] call CBA_fnc_globalEvent;
[QGVAR(setSpeaker), [_unit, "ACE_NoVoice"]] call CBA_fnc_globalEvent;
_unit setVariable ["ACE_OriginalSpeaker", _speaker, true];

View File

@ -16,5 +16,5 @@ params ["_unit"];
// setSpeaker gets overwritten after init on remote units; if unit is muted, setSpeaker again
if (count (_unit getVariable [QGVAR(muteUnitReasons), []]) > 0) then {
["ace_setSpeaker", [_unit, "ACE_NoVoice"]] call CBA_fnc_localEvent;
[QGVAR(setSpeaker), [_unit, "ACE_NoVoice"]] call CBA_fnc_localEvent;
};

View File

@ -18,4 +18,4 @@ params ["_unit"];
_unit setVariable [QGVAR(muteUnitReasons), _unit getVariable [QGVAR(muteUnitReasons), []], true];
// fix mp issues with respawning and the speaker
["ace_setSpeaker", [_unit, speaker _unit]] call CBA_fnc_globalEvent;
[QGVAR(setSpeaker), [_unit, speaker _unit]] call CBA_fnc_globalEvent;

View File

@ -4,7 +4,7 @@
*
* Arguments:
* 0: eventName <STRING>
*
*
* Return Value:
* Boolean of success
*
@ -17,4 +17,4 @@ params ["_eventName"];
// Only JIP machines on initialization send this off, requesting sync on events with the serverCommand
if (isServer) exitWith {false};
["ace_SEH_s", [_eventName, ACE_player]] call CBA_fnc_serverEvent;
["ACEs", [_eventName, ACE_player]] call CBA_fnc_serverEvent;

View File

@ -3,7 +3,7 @@
* Adds a status effect that will be handled.
*
* 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>
* 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
if (isServer && {!(_commonReasonsArray isEqualTo [])}) then {
//Switch case to lower:
{
_commonReasonsArray set [_forEachIndex, toLower _x];
} forEach _commonReasonsArray;
_commonReasonsArray = _commonReasonsArray apply { toLower _x };
missionNamespace setVariable [(format [QGVAR(statusEffects_%1), _name]), _commonReasonsArray, true];
};

View File

@ -4,7 +4,7 @@
*
* Arguments:
* 0: Object <OBJECT>
* 1: Effect name (or "" or send all) <STRING>
* 1: Effect name (or "" to send all) <STRING>
*
* Return Value:
* 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
TRACE_2("checking if event is nil",_x,_effectNumber);
if (_effectNumber != -1) then {
private _eventName = format [QGVAR(%1), _x];
if (GVAR(statusEffect_isGlobal) select _forEachIndex) then {
TRACE_2("Sending Global Event", _object, _effectNumber);
[_x, [_object, _effectNumber]] call CBA_fnc_globalEvent;
[_eventName, [_object, _effectNumber]] call CBA_fnc_globalEvent;
} else {
if (local _object) then {
//If local, send directly to bypass network delay of targetEvent call
TRACE_2("Sending Target Local Event", _object, _effectNumber);
[_x, [_object, _effectNumber]] call CBA_fnc_localEvent;
} else {
TRACE_2("Sending Target Non-Local Event", _object, _effectNumber);
[_x, [_object, _effectNumber], [_object]] call CBA_fnc_targetEvent;
};
TRACE_2("Sending Target Event", _object, _effectNumber);
[_eventName, [_object, _effectNumber], _object] call CBA_fnc_targetEvent;
};
};
};

View File

@ -23,4 +23,4 @@ if (!HASH_HASKEY(GVAR(syncedEvents),_name)) exitWith {
private _eventData = [_name, _args, _ttl];
["ace_SEH", _eventData] call CBA_fnc_globalEvent;
["ACEe", _eventData] call CBA_fnc_globalEvent;

View File

@ -28,5 +28,5 @@ if (_reason in _setHiddenReasons) then {
};
if (_setHiddenReasons isEqualTo []) then {
["ace_hideObjectGlobal", [_unit,false]] call CBA_fnc_serverEvent;
[QGVAR(hideObjectGlobal), [_unit,false]] call CBA_fnc_serverEvent;
};

View File

@ -27,7 +27,7 @@ if (count _emptyPos != 3) exitwith {
ACE_LOGWARNING_4("Could not find unload pos %1-ASL: %2 isTouchingGround: %3 Speed: %4",_vehicle, getPosASL _vehicle, isTouchingGround _vehicle, speed _vehicle);
if ((!isNull _unloader) && {[_unloader] call FUNC(isPlayer)}) then {
//display text saying there are no safe places to exit the vehicle
["ace_displayTextStructured", [localize LSTRING(NoRoomToUnload)], [_unloader]] call CBA_fnc_targetEvent;
[QGVAR(displayTextStructured), [localize LSTRING(NoRoomToUnload)], [_unloader]] call CBA_fnc_targetEvent;
};
false
};

View File

@ -32,4 +32,4 @@ private _speaker = _unit getVariable ["ACE_OriginalSpeaker", ""];
if (_speaker == "") exitWith {};
["ace_setSpeaker", [_unit, _speaker], _unit] call CBA_fnc_targetEvent;
[QGVAR(setSpeaker), [_unit, _speaker], _unit] call CBA_fnc_targetEvent;

View File

@ -17,9 +17,3 @@ class CfgPatches {
#include "CfgWeapons.hpp"
#include "CfgMagazines.hpp"
#include "CfgVehicles.hpp"
class ACE_newEvents {
playerInventoryChanged = "ace_playerInventoryChanged";
firedNonPlayer = "ace_firedNonPlayer";
firedPlayer = "ace_firedPlayer";
};

View File

@ -25,6 +25,6 @@ if (isNil "ACE_maxWeightCarry") then {
["ace_playerWeaponChanged", {_this call FUNC(handlePlayerWeaponChanged)}] call CBA_fnc_addEventHandler;
// handle waking up dragged unit and falling unconscious while dragging
["ace_medical_onUnconscious", {_this call FUNC(handleUnconscious)}] call CBA_fnc_addEventHandler;
["ace_unconscious", {_this call FUNC(handleUnconscious)}] call CBA_fnc_addEventHandler;
//@todo Captivity?

View File

@ -16,14 +16,3 @@ class CfgPatches {
#include "CfgEventHandlers.hpp"
#include "CfgVehicles.hpp"
#include "CfgMovesBasic.hpp"
class ACE_newEvents {
medical_onUnconscious = "ace_medical_onUnconscious";
playerWeaponChanged = "ace_playerWeaponChanged";
playerVehicleChanged = "ace_playerVehicleChanged";
playerChanged = "ace_playerChanged";
setDir = "ace_setDir";
fixFloating = "ace_fixFloating";
fixPosition = "ace_fixPosition";
fixCollision = "ace_fixCollision";
};

View File

@ -44,7 +44,7 @@ if (_target isKindOf "CAManBase") then {
_target attachTo [_unit, _position];
};
["ace_setDir", [_target, _direction], _target] call CBA_fnc_targetEvent;
[QEGVAR(common,setDir), [_target, _direction], _target] call CBA_fnc_targetEvent;
_unit setVariable [QGVAR(isCarrying), true, true];
_unit setVariable [QGVAR(carriedObject), _target, true];

View File

@ -33,7 +33,7 @@ _position = _position vectorAdd [0, 0, _offset];
// attach object
TRACE_3("attaching",_position,_offset,_direction);
_target attachTo [_unit, _position];
["ace_setDir", [_target, _direction], _target] call CBA_fnc_targetEvent;
[QEGVAR(common,setDir), [_target, _direction], _target] call CBA_fnc_targetEvent;
if (_target isKindOf "CAManBase") then {
[_target, "AinjPpneMrunSnonWnonDb_still", 0, true] call EFUNC(common,doAnimation);

View File

@ -30,8 +30,8 @@ if !(_unit getVariable ["ACE_isUnconscious", false]) then {
};
// prevent collision damage
["ace_fixCollision", _unit] call CBA_fnc_localEvent;
["ace_fixCollision", _target, _target] call CBA_fnc_targetEvent;
[QEGVAR(common,fixCollision), _unit] call CBA_fnc_localEvent;
[QEGVAR(common,fixCollision), _target, _target] call CBA_fnc_targetEvent;
// release object
detach _target;
@ -62,8 +62,8 @@ _unit setVariable [QGVAR(draggedObject), objNull, true];
[objNull, _target, true] call EFUNC(common,claim);
if !(_target isKindOf "CAManBase") then {
["ace_fixPosition", _target, _target] call CBA_fnc_targetEvent;
["ace_fixFloating", _target, _target] call CBA_fnc_targetEvent;
[QEGVAR(common,fixPosition), _target, _target] call CBA_fnc_targetEvent;
[QEGVAR(common,fixFloating), _target, _target] call CBA_fnc_targetEvent;
};
if (_unit getVariable ["ACE_isUnconscious", false]) then {

View File

@ -25,8 +25,8 @@ TRACE_2("params",_unit,_target);
private _inBuilding = [_unit] call FUNC(isObjectOnObject);
// prevent collision damage
["ace_fixCollision", _unit] call CBA_fnc_localEvent;
["ace_fixCollision", _target, _target] call CBA_fnc_targetEvent;
[QEGVAR(common,fixCollision), _unit] call CBA_fnc_localEvent;
[QEGVAR(common,fixCollision), _target, _target] call CBA_fnc_targetEvent;
// release object
detach _target;
@ -67,8 +67,8 @@ _unit setVariable [QGVAR(carriedObject), objNull, true];
[objNull, _target, true] call EFUNC(common,claim);
if !(_target isKindOf "CAManBase") then {
["ace_fixPosition", _target, _target] call CBA_fnc_targetEvent;
["ace_fixFloating", _target, _target] call CBA_fnc_targetEvent;
[QEGVAR(common,fixPosition), _target, _target] call CBA_fnc_targetEvent;
[QEGVAR(common,fixFloating), _target, _target] call CBA_fnc_targetEvent;
};
// recreate UAV crew

View File

@ -42,6 +42,6 @@ _carriedItem attachTo [_unit];
//reset the carry direction
private _direction = _carriedItem getVariable [QGVAR(carryDirection), 0];
["ace_setDir", [_carriedItem, _direction], _carriedItem] call CBA_fnc_targetEvent;
[QEGVAR(common,setDir), [_carriedItem, _direction], _carriedItem] call CBA_fnc_targetEvent;
true

View File

@ -22,7 +22,7 @@
//When getting knocked out in medical, trigger deadman explosives:
//Event is global, only run on server (ref: ace_medical_fnc_setUnconscious)
if (isServer) then {
["ace_medical_onUnconscious", {
["ace_unconscious", {
params ["_unit", "_isUnconscious"];
if (!_isUnconscious) exitWith {};
TRACE_1("Knocked Out, Doing Deadman", _unit);

View File

@ -45,7 +45,6 @@ class CfgMineTriggers {
};
class ACE_newEvents {
medical_onUnconscious = "ace_medical_onUnconscious";
clientRequestsOrientations = QGVAR(clientRequestOrientations);
serverSendsOrientations = QGVAR(serverSendOrientations);
};

View File

@ -26,9 +26,3 @@ class CfgPatches {
class ACE_Extensions {
extensions[] += {"ace_fcs"};
};
class ACE_newEvents {
infoDisplayChanged = "ace_infoDisplayChanged";
firedPlayerVehicleNonLocal = "ace_firedPlayerVehicleNonLocal";
firedPlayerVehicle = "ace_firedPlayerVehicle";
};

View File

@ -17,7 +17,3 @@ class CfgPatches {
#include "ACE_Settings.hpp"
#include "CfgEventHandlers.hpp"
#include "CfgVehicles.hpp"
class ACE_newEvents {
SettingsInitialized = "ace_settingsInitialized";
};

View File

@ -15,12 +15,3 @@ class CfgPatches {
#include "CfgEventhandlers.hpp"
#include "CfgAmmo.hpp"
#include "ACE_Settings.hpp"
class ACE_newEvents {
SettingsInitialized = "ace_settingsInitialized";
firedNonPlayerVehicle = "ace_firedNonPlayerVehicle";
firedPlayerVehicleNonLocal = "ace_firedPlayerVehicleNonLocal";
firedPlayerVehicle = "ace_firedPlayerVehicle";
firedNonPlayer = "ace_firedNonPlayer";
firedPlayerNonLocal = "ace_firedPlayerNonLocal";
firedPlayer = "ace_firedPlayer";
};

View File

@ -17,7 +17,3 @@ class CfgPatches {
#include "CfgEventHandlers.hpp"
#include "CfgWeapons.hpp"
#include "CfgVehicles.hpp"
class ACE_newEvents {
SettingsInitialized = "ace_settingsInitialized";
};

View File

@ -271,10 +271,6 @@ class CfgCloudlets {
};
class ACE_newEvents {
playerInventoryChanged = "ace_playerInventoryChanged";
firedPlayer = "ace_firedPlayer";
activeCameraChanged = "ace_activeCameraChanged";
cameraViewChanged = "ace_cameraViewChanged";
GlassesChanged = "ace_glassesChanged";
GlassesCracked = "ace_glassesCracked";
};

View File

@ -22,8 +22,5 @@ class CfgPatches {
#include "Effects.hpp"
class ACE_newEvents {
firedNonPlayer = "ace_firedNonPlayer";
firedPlayerNonLocal = "ace_firedPlayerNonLocal";
firedPlayer = "ace_firedPlayer";
flashbangExplosion = "ace_flashbangExploded";
};

View File

@ -28,8 +28,8 @@ GVAR(volumeAttenuation) = 1;
[FUNC(updateVolume), 1, [false]] call CBA_fnc_addPerFrameHandler;
// Update veh attunation when player veh changes
["ace_playerVehicleChanged", {_this call FUNC(updatePlayerVehAttenuation);}] call CBA_fnc_addEventHandler;
["ace_playerTurretChanged", {_this call FUNC(updatePlayerVehAttenuation);}] call CBA_fnc_addEventHandler;
["ace_playerVehicleChanged", FUNC(updatePlayerVehAttenuation)] call CBA_fnc_addEventHandler;
["ace_playerTurretChanged", FUNC(updatePlayerVehAttenuation)] call CBA_fnc_addEventHandler;
// Reset deafness on respawn (or remote control player switch)
["ace_playerChanged", {

View File

@ -14,20 +14,8 @@ class CfgPatches {
};
#include "CfgEventHandlers.hpp"
#include "CfgVehicles.hpp"
#include "CfgSounds.hpp"
#include "CfgWeapons.hpp"
#include "CfgAmmo.hpp"
#include "ACE_Settings.hpp"
class ACE_newEvents {
SettingsInitialized = "ace_settingsInitialized";
playerInventoryChanged = "ace_playerInventoryChanged";
playerTurretChanged = "ace_playerTurretChanged";
playerVehicleChanged = "ace_playerVehicleChanged";
};

View File

@ -21,8 +21,3 @@ class CfgPatches {
#include "CfgWeapons.hpp"
#include "Dialog.hpp"
#include "RscTitles.hpp"
class ACE_newEvents {
firedPlayerNonLocal = "ace_firedPlayerNonLocal";
firedPlayer = "ace_firedPlayer";
};

View File

@ -41,7 +41,7 @@ GVAR(ParsedTextCached) = [];
// Listens for the falling unconscious event, just in case the menu needs to be closed
["ace_medical_onUnconscious", {
["ace_unconscious", {
// If no menu is open just quit
if (GVAR(openedMenuType) < 0) exitWith {};

View File

@ -26,8 +26,6 @@ class ACE_Extensions {
};
class ACE_newEvents {
SettingChanged = "ace_settingChanged";
playerChanged = "ace_playerChanged";
interactMenuOpened = "ace_interactMenuOpened";
clearConditionCaches = QGVAR(clearConditionCaches);
interactMenuClosed = "ace_interactMenuClosed";

View File

@ -24,10 +24,6 @@ class ACE_newEvents {
pardon = QGVAR(pardon);
tapShoulder = QGVAR(tapShoulder);
sendAway = QGVAR(sendAway);
setVelocity = "ace_setVelocity";
displayTextStructured = "ace_displayTextStructured";
CBA_teamColorChanged = "ace_CBA_teamColorChanged";
selectLeader = "ace_selectLeader";
lampTurnOff = QGVAR(lampTurnOff);
lampTurnOn = QGVAR(lampTurnOn);
};

View File

@ -17,4 +17,4 @@
params ["_unit"];
["ace_selectLeader", [group _unit, _unit], units group _unit] call CBA_fnc_targetEvent;
[QEGVAR(common,selectLeader), [group _unit, _unit], units group _unit] call CBA_fnc_targetEvent;

View File

@ -31,5 +31,5 @@ if (_unit == ACE_player) then {
_message = format [localize LSTRING(JoinedTeam), _team];
};
["ace_displayTextStructured", _message] call CBA_fnc_localEvent;
[_message] call EFUNC(common,displayTextStructured);
};

View File

@ -6,7 +6,7 @@
* 0: Unit that passes the magazine <OBJECT>
* 1: Unit to pass the magazine to <OBJECT>
* 2: Weapon classname <STRING>
*
*
* Return Value:
* None
*
@ -51,4 +51,4 @@ _target addMagazine [_magToPassClassName, _magToPassAmmoCount];
_playerName = [_player] call EFUNC(common,getName);
_magToPassDisplayName = getText (configFile >> "CfgMagazines" >> _magToPassClassName >> "displayName");
["ace_displayTextStructured", [[LSTRING(PassMagazineHint), _playerName, _magToPassDisplayName], 1.5, _target], [_target]] call CBA_fnc_targetEvent;
[QEGVAR(common,displayTextStructured), [[LSTRING(PassMagazineHint), _playerName, _magToPassDisplayName], 1.5, _target], [_target]] call CBA_fnc_targetEvent;

View File

@ -22,4 +22,4 @@ private _newVelocity = vectorDir _unit;
_newVelocity set [2, 0.25];
_newVelocity = _newVelocity vectorMultiply 2;
["ace_setVelocity", [_boat, _newVelocity], [_boat]] call CBA_fnc_targetEvent;
[QEGVAR(common,setVelocity), [_boat, _newVelocity], [_boat]] call CBA_fnc_targetEvent;

View File

@ -2,7 +2,7 @@
#include "script_component.hpp"
// fixes laser when being captured. Needed, because the selectionPosition of the right hand is used
[QEGVAR(captives,setHandcuffed), {if (_this select 1) then {(_this select 0) action ["GunLightOff", _this select 0]};}] call CBA_fnc_addEventHandler;
[QEGVAR(captives,setHandcuffed), {if (_this select 1) then {(_this select 0) action ["ace_gunLightOff", _this select 0]};}] call CBA_fnc_addEventHandler;
if (!hasInterface) exitWith {};

View File

@ -20,6 +20,6 @@ class CfgPatches {
#include "CfgJointRails.hpp"
class ACE_newEvents {
SettingsInitialized = "ace_settingsInitialized";
GunLightOff = "ace_gunLightOff";
SetHandcuffed = QEGVAR(captives,setHandcuffed);
};
};

View File

@ -17,7 +17,3 @@ class CfgPatches {
#include "CfgVehicles.hpp"
#include "CfgWeapons.hpp"
#include "CfgSounds.hpp"
class ACE_newEvents {
setFuel = "ace_setFuel";
};

View File

@ -24,7 +24,7 @@ _onFinish = {
(_this select 0) params ["_caller", "_target"];
_caller removeItem "ACE_UAVBattery";
playSound3D [QUOTE(PATHTO_R(sounds\exchange_battery.ogg)), objNull, false, getPosASL _caller, 1, 1, 10];
["ace_setFuel", [_target, 1], [_target]] call CBA_fnc_targetEvent; //setFuel is local
[QEGVAR(common,setFuel), [_target, 1], [_target]] call CBA_fnc_targetEvent; //setFuel is local
};
_onFailure = {

View File

@ -164,7 +164,3 @@ class RscDisplayServerGetReady: RscDisplayGetReady {
};
};
};
class ACE_newEvents {
visibleMapChanged = "ace_visibleMapChanged";
};

View File

@ -16,7 +16,3 @@ class CfgPatches {
#include "ACE_Settings.hpp"
#include "CfgEventHandlers.hpp"
#include "CfgVehicles.hpp"
class ACE_newEvents {
SettingsInitialized = "ace_settingsInitialized";
};

View File

@ -6,34 +6,32 @@ GVAR(heartBeatSounds_Fast) = ["ACE_heartbeat_fast_1", "ACE_heartbeat_fast_2", "A
GVAR(heartBeatSounds_Normal) = ["ACE_heartbeat_norm_1", "ACE_heartbeat_norm_2"];
GVAR(heartBeatSounds_Slow) = ["ACE_heartbeat_slow_1", "ACE_heartbeat_slow_2"];
["ace_medical_propagateWound", FUNC(onPropagateWound)] call CBA_fnc_addEventHandler;
["ace_medical_woundUpdateRequest", FUNC(onWoundUpdateRequest)] call CBA_fnc_addEventHandler;
["ace_interactMenuClosed", {[objNull, false] call FUNC(displayPatientInformation); }] call CBA_fnc_addEventHandler;
//Treatment EventHandlers:
["ace_actionCheckBloodPressureLocal", DFUNC(actionCheckBloodPressureLocal)] call CBA_fnc_addEventHandler;
["ace_actionCheckPulseLocal", DFUNC(actionCheckPulseLocal)] call CBA_fnc_addEventHandler;
["ace_addToInjuredCollection", DFUNC(addToInjuredCollection)] call CBA_fnc_addEventHandler;
["ace_addToMedicalLog", DFUNC(addToLog)] call CBA_fnc_addEventHandler;
["ace_addToTriageCard", DFUNC(addToTriageCard)] call CBA_fnc_addEventHandler;
["ace_setDead", DFUNC(setDead)] call CBA_fnc_addEventHandler;
["ace_setHitPointDamage", DFUNC(setHitPointDamage)] call CBA_fnc_addEventHandler;
["ace_setUnconscious", DFUNC(setUnconscious)] call CBA_fnc_addEventHandler;
["ace_treatmentAdvanced_bandageLocal", DFUNC(treatmentAdvanced_bandageLocal)] call CBA_fnc_addEventHandler;
["ace_treatmentAdvanced_CPRLocal", DFUNC(treatmentAdvanced_CPRLocal)] call CBA_fnc_addEventHandler;
["ace_treatmentAdvanced_fullHealLocal", DFUNC(treatmentAdvanced_fullHealLocal)] call CBA_fnc_addEventHandler;
["ace_treatmentAdvanced_medicationLocal", DFUNC(treatmentAdvanced_medicationLocal)] call CBA_fnc_addEventHandler;
["ace_treatmentBasic_bandageLocal", DFUNC(treatmentBasic_bandageLocal)] call CBA_fnc_addEventHandler;
["ace_treatmentBasic_bloodbagLocal", DFUNC(treatmentBasic_bloodbagLocal)] call CBA_fnc_addEventHandler;
["ace_treatmentBasic_morphineLocal", DFUNC(treatmentBasic_morphineLocal)] call CBA_fnc_addEventHandler;
["ace_treatmentIVLocal", DFUNC(treatmentIVLocal)] call CBA_fnc_addEventHandler;
["ace_treatmentTourniquetLocal", DFUNC(treatmentTourniquetLocal)] call CBA_fnc_addEventHandler;
["ace_actionPlaceInBodyBag", FUNC(actionPlaceInBodyBag)] call CBA_fnc_addEventHandler;
[QGVAR(actionCheckBloodPressureLocal), DFUNC(actionCheckBloodPressureLocal)] call CBA_fnc_addEventHandler;
[QGVAR(actionCheckPulseLocal), DFUNC(actionCheckPulseLocal)] call CBA_fnc_addEventHandler;
[QGVAR(addVitalLoop), DFUNC(addVitalLoop)] call CBA_fnc_addEventHandler;
[QGVAR(addToMedicalLog), DFUNC(addToLog)] call CBA_fnc_addEventHandler;
[QGVAR(addToTriageCard), DFUNC(addToTriageCard)] call CBA_fnc_addEventHandler;
[QGVAR(setDead), DFUNC(setDead)] call CBA_fnc_addEventHandler;
[QGVAR(setHitPointDamage), DFUNC(setHitPointDamage)] call CBA_fnc_addEventHandler;
[QGVAR(setUnconscious), DFUNC(setUnconscious)] call CBA_fnc_addEventHandler;
[QGVAR(treatmentAdvanced_bandageLocal), DFUNC(treatmentAdvanced_bandageLocal)] call CBA_fnc_addEventHandler;
[QGVAR(treatmentAdvanced_CPRLocal), DFUNC(treatmentAdvanced_CPRLocal)] call CBA_fnc_addEventHandler;
[QGVAR(treatmentAdvanced_fullHealLocal), DFUNC(treatmentAdvanced_fullHealLocal)] call CBA_fnc_addEventHandler;
[QGVAR(treatmentAdvanced_medicationLocal), DFUNC(treatmentAdvanced_medicationLocal)] call CBA_fnc_addEventHandler;
[QGVAR(treatmentBasic_bandageLocal), DFUNC(treatmentBasic_bandageLocal)] call CBA_fnc_addEventHandler;
[QGVAR(treatmentBasic_bloodbagLocal), DFUNC(treatmentBasic_bloodbagLocal)] call CBA_fnc_addEventHandler;
[QGVAR(treatmentBasic_morphineLocal), DFUNC(treatmentBasic_morphineLocal)] call CBA_fnc_addEventHandler;
[QGVAR(treatmentIVLocal), DFUNC(treatmentIVLocal)] call CBA_fnc_addEventHandler;
[QGVAR(treatmentTourniquetLocal), DFUNC(treatmentTourniquetLocal)] call CBA_fnc_addEventHandler;
[QGVAR(actionPlaceInBodyBag), FUNC(actionPlaceInBodyBag)] call CBA_fnc_addEventHandler;
//Handle Deleting Bodies on Server:
if (isServer) then {["ace_placedInBodyBag", FUNC(serverRemoveBody)] call CBA_fnc_addEventHandler;};
if (isServer) then {["ace_placedInBodyBag", FUNC(serverRemoveBody)] call CBA_fnc_addEventHandler;};
["ace_medical_onUnconscious", {
["ace_unconscious", {
params ["_unit", "_status"];
if (local _unit) then {
if (_status) then {
@ -297,7 +295,7 @@ GVAR(lastHeartBeatSound) = CBA_missionTime;
["ace_playerInventoryChanged", FUNC(itemCheck)] call CBA_fnc_addEventHandler;
if (hasInterface) then {
["PlayerJip", {
["ace_playerJIP", {
ACE_LOGINFO("JIP Medical init for player.");
[player] call FUNC(init);
}] call CBA_fnc_addEventHandler;

View File

@ -7,7 +7,7 @@ params ["_unit"];
// Reset captive status for respawning unit
if (!(_unit getVariable ["ACE_isUnconscious", false])) then {
[_unit, "setCaptive", QGVAR(unconscious), false] call EFUNC(common,statusEffect_set);
[_unit, "setCaptive", "ace_unconscious", false] call EFUNC(common,statusEffect_set);
};
// Remove maximum unconsciousness time handler

View File

@ -26,39 +26,30 @@ class CfgPatches {
#include "UI\triagecard.hpp"
class ACE_newEvents {
medical_onUnconscious = "ace_medical_onUnconscious";
playerInventoryChanged = "ace_playerInventoryChanged";
medical_onUnconscious = "ace_unconscious";
medical_treatmentSuccess = "ace_treatmentSuccess";
medical_onSetDead = "ace_killed";
Medical_onEnteredCardiacArrest = "ace_enteredCardiacArrest";
Medical_onItemAddedToTriageCard = "ace_itemAddedToTriageCard";
medical_onLogEntryAdded = "ace_medicalLogEntryAdded";
Medical_onHeartRateAdjustmentAdded = "ace_addedHeartRateAdjustment";
placedInBodyBag = "ace_placedInBodyBag";
actionPlaceInBodyBag = "ace_actionPlaceInBodyBag";
treatmentTourniquetLocal = "ace_treatmentTourniquetLocal";
treatmentIVLocal = "ace_treatmentIVLocal";
treatmentBasic_morphineLocal = "ace_treatmentBasic_morphineLocal";
treatmentBasic_bloodbagLocal = "ace_treatmentBasic_bloodbagLocal";
treatmentBasic_bandageLocal = "ace_treatmentBasic_bandageLocal";
treatmentAdvanced_medicationLocal = "ace_treatmentAdvanced_medicationLocal";
treatmentAdvanced_fullHealLocal = "ace_treatmentAdvanced_fullHealLocal";
treatmentAdvanced_CPRLocal = "ace_treatmentAdvanced_CPRLocal";
treatmentAdvanced_bandageLocal = "ace_treatmentAdvanced_bandageLocal";
setUnconscious = "ace_setUnconscious";
setHitPointDamage = "ace_setHitPointDamage";
setDead = "ace_setDead";
addToTriageCard = "ace_addToTriageCard";
addToMedicalLog = "ace_addToMedicalLog";
addToInjuredCollection = "ace_addToInjuredCollection";
actionCheckPulseLocal = "ace_actionCheckPulseLocal";
actionCheckBloodPressureLocal = "ace_actionCheckBloodPressureLocal";
interactMenuClosed = "ace_interactMenuClosed";
medical_woundUpdateRequest = "ace_medical_woundUpdateRequest";
medical_propagateWound = "ace_medical_propagateWound";
useItem = "ace_useItem";
medical_treatmentSuccess = "ace_medical_treatmentSuccess";
displayTextStructured = "ace_displayTextStructured";
medical_onSetDead = "ace_medical_onSetDead";
Medical_onEnteredCardiacArrest = "ace_medical_onEnteredCardiacArrest";
hideObjectGlobal = "ace_hideObjectGlobal";
addVitalLoop = "ace_addVitalLoop";
Medical_onItemAddedToTriageCard = "ace_medical_onItemAddedToTriageCard";
medical_onLogEntryAdded = "ace_medical_onLogEntryAdded";
Medical_onHeartRateAdjustmentAdded = "ace_medical_onHeartRateAdjustmentAdded";
unloadPersonEvent = "ace_unloadPersonEvent";
actionPlaceInBodyBag = QGVAR(actionPlaceInBodyBag);
treatmentTourniquetLocal = QGVAR(treatmentTourniquetLocal);
treatmentIVLocal = QGVAR(treatmentIVLocal);
treatmentBasic_morphineLocal = QGVAR(treatmentBasic_morphineLocal);
treatmentBasic_bloodbagLocal = QGVAR(treatmentBasic_bloodbagLocal);
treatmentBasic_bandageLocal = QGVAR(treatmentBasic_bandageLocal);
treatmentAdvanced_medicationLocal = QGVAR(treatmentAdvanced_medicationLocal);
treatmentAdvanced_fullHealLocal = QGVAR(treatmentAdvanced_fullHealLocal);
treatmentAdvanced_CPRLocal = QGVAR(treatmentAdvanced_CPRLocal);
treatmentAdvanced_bandageLocal = QGVAR(treatmentAdvanced_bandageLocal);
setUnconscious = QGVAR(setUnconscious);
setHitPointDamage = QGVAR(setHitPointDamage);
setDead = QGVAR(setDead);
addToTriageCard = QGVAR(addToTriageCard);
addToMedicalLog = QGVAR(addToMedicalLog);
actionCheckPulseLocal = QGVAR(actionCheckPulseLocal);
actionCheckBloodPressureLocal = QGVAR(actionCheckBloodPressureLocal);
addVitalLoop = QGVAR(addVitalLoop);
};

View File

@ -16,7 +16,7 @@
params ["_caller", "_target", "_selectionName"];
if (local _target) then {
["ace_actionCheckBloodPressureLocal", [_caller, _target, _selectionName]] call CBA_fnc_localEvent;
[QGVAR(actionCheckBloodPressureLocal), [_caller, _target, _selectionName]] call CBA_fnc_localEvent;
} else {
["ace_actionCheckBloodPressureLocal", [_caller, _target, _selectionName], _target] call CBA_fnc_targetEvent;
[QGVAR(actionCheckBloodPressureLocal), [_caller, _target, _selectionName], _target] call CBA_fnc_targetEvent;
};

View File

@ -57,7 +57,7 @@ if (_selectionName in ["hand_l","hand_r"] && {[_unit, _selectionName] call FUNC(
_logOutPut = "";
};
["ace_displayTextStructured", [[_output, [_target] call EFUNC(common,getName), round(_bloodPressureHigh),round(_bloodPressureLow)], 1.75, _caller], [_caller]] call CBA_fnc_targetEvent;
[QEGVAR(common,displayTextStructured), [[_output, [_target] call EFUNC(common,getName), round(_bloodPressureHigh),round(_bloodPressureLow)], 1.75, _caller], [_caller]] call CBA_fnc_targetEvent;
if (_logOutPut != "") then {
[_target,"activity", LSTRING(Check_Bloodpressure_Log), [[_caller, false, true] call EFUNC(common,getName), _logOutPut]] call FUNC(addToLog);

View File

@ -16,7 +16,7 @@
params ["_caller","_target", "_selectionName"];
if (local _target) then {
["ace_actionCheckPulseLocal", [_caller, _target, _selectionName]] call CBA_fnc_localEvent;
[QGVAR(actionCheckPulseLocal), [_caller, _target, _selectionName]] call CBA_fnc_localEvent;
} else {
["ace_actionCheckPulseLocal", [_caller, _target, _selectionName], _target] call CBA_fnc_targetEvent;
[QGVAR(actionCheckPulseLocal), [_caller, _target, _selectionName], _target] call CBA_fnc_targetEvent;
};

View File

@ -49,7 +49,7 @@ if (_selectionName in ["hand_l","hand_r"] && {[_unit, _selectionName] call FUNC(
_logOutPut = LSTRING(Check_Pulse_None);
};
["ace_displayTextStructured", [[_heartRateOutput, [_unit] call EFUNC(common,getName), round(_heartRate)], 1.5, _caller], [_caller]] call CBA_fnc_targetEvent;
[QEGVAR(common,displayTextStructured), [[_heartRateOutput, [_unit] call EFUNC(common,getName), round(_heartRate)], 1.5, _caller], [_caller]] call CBA_fnc_targetEvent;
if (_logOutPut != "") then {
[_unit,"activity", LSTRING(Check_Pulse_Log),[[_caller] call EFUNC(common,getName),_logOutPut]] call FUNC(addToLog);

View File

@ -19,7 +19,7 @@ params ["_caller", "_target"];
_output = [LSTRING(Check_Response_Unresponsive), LSTRING(Check_Response_Responsive)] select ([_target] call EFUNC(common,isAwake));
["ace_displayTextStructured", [[_output, [_target] call EFUNC(common,getName)], 2, _caller], [_caller]] call CBA_fnc_targetEvent;
[QEGVAR(common,displayTextStructured), [[_output, [_target] call EFUNC(common,getName)], 2, _caller], [_caller]] call CBA_fnc_targetEvent;
[_target,"activity",_output, [[_target, false, true] call EFUNC(common,getName)]] call FUNC(addToLog);
[_target,"quick_view",_output, [[_target, false, true] call EFUNC(common,getName)]] call FUNC(addToLog);

View File

@ -43,4 +43,4 @@ if (alive _target) then {
};
};
["ace_displayTextStructured", [_genericMessages, 3.0, _caller], [_caller]] call CBA_fnc_targetEvent;
[QEGVAR(common,displayTextStructured), [_genericMessages, 3.0, _caller], [_caller]] call CBA_fnc_targetEvent;

View File

@ -18,7 +18,7 @@ private "_vehicle";
params ["_caller", "_target"];
if ([_target] call EFUNC(common,isAwake)) exitWith {
["ace_displayTextStructured", [[LSTRING(CanNotLoaded), [_target] call EFUNC(common,getName)], 1.5, _caller], [_caller]] call CBA_fnc_targetEvent;
[QEGVAR(common,displayTextStructured), [[LSTRING(CanNotLoaded), [_target] call EFUNC(common,getName)], 1.5, _caller], [_caller]] call CBA_fnc_targetEvent;
};
if ([_target] call FUNC(isBeingCarried)) then {
[_caller, _target] call EFUNC(dragging,dropObject_carry);

View File

@ -22,7 +22,7 @@ TRACE_2("params",_caller,_target);
if (!local _target) exitWith {
TRACE_1("running where local",local _target);
["ace_actionPlaceInBodyBag", [_caller, _target], [_target]] call CBA_fnc_targetEvent;
[QGVAR(actionPlaceInBodyBag), [_caller, _target], [_target]] call CBA_fnc_targetEvent;
objNull
};

View File

@ -26,7 +26,7 @@ _tourniquets = _target getVariable [QGVAR(tourniquets), [0,0,0,0,0,0]];
// Check if there is a tourniquet on this bodypart
if ((_tourniquets select _part) == 0) exitWith {
_output = LSTRING(noTourniquetOnBodyPart);
["ace_displayTextStructured", [_output, 1.5, _caller], [_caller]] call CBA_fnc_targetEvent;
[QEGVAR(common,displayTextStructured), [_output, 1.5, _caller], [_caller]] call CBA_fnc_targetEvent;
};
// Removing the tourniquet
@ -44,7 +44,7 @@ TRACE_2("meds",_part,_delayedMedications);
_x params ["", "", "_medPartNum"];
if (_part == _medPartNum) then {
TRACE_1("delayed medication call after tourniquet removeal",_x);
["ace_treatmentAdvanced_medicationLocal", _x, [_target]] call CBA_fnc_targetEvent;
[QGVAR(treatmentAdvanced_medicationLocal), _x, [_target]] call CBA_fnc_targetEvent;
_delayedMedications set [_forEachIndex, -1];
_updatedArray = true;
};

View File

@ -22,4 +22,4 @@ params [["_unit", objNull, [objNull]], ["_value", 0, [0]], ["_time", 1, [0]], ["
_adjustment = _unit getVariable [QGVAR(heartRateAdjustments), []];
_adjustment pushBack [_value, _time, _callBack];
_unit setVariable [QGVAR(heartRateAdjustments), _adjustment ];
["ace_medical_onHeartRateAdjustmentAdded", [_unit, _value, _time]] call CBA_fnc_localEvent;
["ace_addedHeartRateAdjustment", [_unit, _value, _time]] call CBA_fnc_localEvent;

View File

@ -20,7 +20,7 @@ private ["_moment", "_logVarName", "_log","_newLog", "_logs"];
params ["_unit", "_type", "_message", "_arguments"];
if (!local _unit) exitWith {
["ace_addToMedicalLog", _this, _unit] call CBA_fnc_targetEvent;
[QGVAR(addToMedicalLog), _this, _unit] call CBA_fnc_targetEvent;
};
date params ["", "", "", "_hour", "_minute"];
@ -43,7 +43,7 @@ if (count _log >= 8) then {
_log pushBack [_message, _moment, _type, _arguments];
_unit setVariable [_logVarName, _log, true];
["ace_medical_onLogEntryAdded", [_unit, _type, _message, _arguments]] call CBA_fnc_localEvent;
["ace_medicalLogEntryAdded", [_unit, _type, _message, _arguments]] call CBA_fnc_localEvent;
_logs = _unit getVariable [QGVAR(allLogs), []];
if !(_logVarName in _logs) then {

View File

@ -18,7 +18,7 @@ private ["_log", "_inList", "_amount"];
params ["_unit", "_newItem"];
if (!local _unit) exitWith {
["ace_addToTriageCard", _this, _unit] call CBA_fnc_targetEvent;
[QGVAR(addToTriageCard), _this, _unit] call CBA_fnc_targetEvent;
};
_log = _unit getVariable [QGVAR(triageCard), []];
@ -41,4 +41,4 @@ if (!_inList) then {
_log pushBack [_newItem, 1, CBA_missionTime];
};
_unit setVariable [QGVAR(triageCard), _log, true];
["ace_medical_onItemAddedToTriageCard", [_unit, _newItem, _amount]] call CBA_fnc_localEvent;
["ace_itemAddedToTriageCard", [_unit, _newItem, _amount]] call CBA_fnc_localEvent;

View File

@ -18,7 +18,7 @@ params ["_unit", ["_force", false]];
if !([_unit] call FUNC(hasMedicalEnabled) || _force) exitWith {};
if !(local _unit) exitWith {
["ace_addVitalLoop", [_unit, _force], _unit] call CBA_fnc_targetEvent;
[QGVAR(addVitalLoop), [_unit, _force], _unit] call CBA_fnc_targetEvent;
};
// Quit if the unit already has a vital loop, or is dead, unless it's forced

View File

@ -42,7 +42,7 @@ if (_show) then {
if (ACE_player distance _target > MAX_DISTANCE) exitwith {
("ACE_MedicalRscDisplayInformation" call BIS_fnc_rscLayer) cutText ["","PLAIN"];
[_idPFH] call CBA_fnc_removePerFrameHandler;
["ace_displayTextStructured", [[LSTRING(DistanceToFar), [_target] call EFUNC(common,getName)], 1.75, ACE_player], [ACE_player]] call CBA_fnc_targetEvent;
[QEGVAR(common,displayTextStructured), [[LSTRING(DistanceToFar), [_target] call EFUNC(common,getName)], 1.75, ACE_player], [ACE_player]] call CBA_fnc_targetEvent;
};
disableSerialization;

View File

@ -21,7 +21,7 @@ params ["_target"];
TRACE_2("",_target,isPlayer _target);
//Hide the body globaly
["ace_hideObjectGlobal", [_target, true]] call CBA_fnc_serverEvent;
[QEGVAR(common,hideObjectGlobal), [_target, true]] call CBA_fnc_serverEvent;
if (isNil QGVAR(bodiesToDelete)) then {GVAR(bodiesToDelete) = [];};
GVAR(bodiesToDelete) pushBack _target;

View File

@ -21,7 +21,7 @@ if (_unit getVariable [QGVAR(inCardiacArrest),false]) exitWith {};
_unit setVariable [QGVAR(inCardiacArrest), true,true];
_unit setVariable [QGVAR(heartRate), 0];
["ace_medical_onEnteredCardiacArrest", [_unit]] call CBA_fnc_localEvent;
["ace_enteredCardiacArrest", [_unit]] call CBA_fnc_localEvent;
[_unit, true] call FUNC(setUnconscious);
_timeInCardiacArrest = 120 + round(random(600));

View File

@ -20,7 +20,7 @@ params ["_unit", ["_force", false], ["_delaySetDamage", false]];
if ((!alive _unit) || {_unit getVariable ["ACE_isDead", false]}) exitWith {true};
if (!local _unit) exitwith {
["ace_setDead", [_unit, _force], _unit] call CBA_fnc_targetEvent;
[QGVAR(setDead), [_unit, _force], _unit] call CBA_fnc_targetEvent;
false;
};
@ -51,7 +51,7 @@ if (isPLayer _unit) then {
_unit setVariable ["isDeadPlayer", true, true];
};
["ace_medical_onSetDead", [_unit]] call CBA_fnc_localEvent;
["ace_killed", [_unit]] call CBA_fnc_localEvent;
//Delay a frame before killing the unit via scripted damage
//to avoid triggering the "Killed" Event twice (and having the wrong killer)

View File

@ -26,7 +26,7 @@ params ["_unit", "_selection", "_damage", ["_disabled", false]];
// Unit isn't local, give function to machine where it is.
if !(local _unit) exitWith {
["ace_setHitPointDamage", _this, _unit] call CBA_fnc_targetEvent;
[QGVAR(setHitPointDamage), _this, _unit] call CBA_fnc_targetEvent;
};
// Check if overall damage adjustment is disabled

View File

@ -39,7 +39,7 @@ if !(_set) exitWith {
if !(!(isNull _unit) && {(_unit isKindOf "CAManBase") && ([_unit] call EFUNC(common,isAwake))}) exitWith{};
if (!local _unit) exitWith {
["ace_setUnconscious", [_unit, _set, _minWaitingTime, _force], _unit] call CBA_fnc_targetEvent;
[QGVAR(setUnconscious), [_unit, _set, _minWaitingTime, _force], _unit] call CBA_fnc_targetEvent;
};
_unit setVariable ["ACE_isUnconscious", true, true];
@ -96,12 +96,12 @@ if (GVAR(moveUnitsFromGroupOnUnconscious)) then {
};
// Delay Unconscious so the AI dont instant stop shooting on the unit #3121
if (GVAR(delayUnconCaptive) == 0) then {
[_unit, "setCaptive", QGVAR(unconscious), true] call EFUNC(common,statusEffect_set);
[_unit, "setCaptive", "ace_unconscious", true] call EFUNC(common,statusEffect_set);
} else {
[{
params ["_unit"];
if (_unit getVariable ["ACE_isUnconscious", false]) then {
[_unit, "setCaptive", QGVAR(unconscious), true] call EFUNC(common,statusEffect_set);
[_unit, "setCaptive", "ace_unconscious", true] call EFUNC(common,statusEffect_set);
};
},[_unit], GVAR(delayUnconCaptive)] call CBA_fnc_waitAndExecute;
};
@ -122,4 +122,4 @@ _startingTime = CBA_missionTime;
// unconscious can't talk
[_unit, "isUnconscious"] call EFUNC(common,muteUnit);
["ace_medical_onUnconscious", [_unit, true]] call CBA_fnc_globalEvent;
["ace_unconscious", [_unit, true]] call CBA_fnc_globalEvent;

View File

@ -239,7 +239,7 @@ if (_target != _caller) then {
};
if (_displayText != "") then {
["ace_displayTextStructured", [[_displayText, [_caller] call EFUNC(common,getName), [_target] call EFUNC(common,getName)], 1.5, _caller], [_caller]] call CBA_fnc_targetEvent;
[QEGVAR(common,displayTextStructured), [[_displayText, [_caller] call EFUNC(common,getName), [_target] call EFUNC(common,getName)], 1.5, _caller], [_caller]] call CBA_fnc_targetEvent;
};
true;

View File

@ -22,9 +22,9 @@ if (alive _target && {(_target getVariable [QGVAR(inCardiacArrest), false] || _t
[_target, "activity_view", LSTRING(Activity_cpr), [[_caller, false, true] call EFUNC(common,getName)]] call FUNC(addToLog);
if (local _target) then {
["ace_treatmentAdvanced_CPRLocal", [_caller, _target]] call CBA_fnc_localEvent;
[QGVAR(treatmentAdvanced_CPRLocal), [_caller, _target]] call CBA_fnc_localEvent;
} else {
["ace_treatmentAdvanced_CPRLocal", [_caller, _target], _target] call CBA_fnc_targetEvent;
[QGVAR(treatmentAdvanced_CPRLocal), [_caller, _target], _target] call CBA_fnc_targetEvent;
};
};
true;

View File

@ -27,9 +27,9 @@ if !([_target] call FUNC(hasMedicalEnabled)) exitWith {
};
if (local _target) then {
["ace_treatmentAdvanced_bandageLocal", [_target, _className, _selectionName, _specificSpot]] call CBA_fnc_localEvent;
[QGVAR(treatmentAdvanced_bandageLocal), [_target, _className, _selectionName, _specificSpot]] call CBA_fnc_localEvent;
} else {
["ace_treatmentAdvanced_bandageLocal", [_target, _className, _selectionName, _specificSpot], _target] call CBA_fnc_targetEvent;
[QGVAR(treatmentAdvanced_bandageLocal), [_target, _className, _selectionName, _specificSpot], _target] call CBA_fnc_targetEvent;
};
/* {

View File

@ -13,9 +13,9 @@
params ["_caller", "_target", "_selectionName", "_className", "_items"];
if (local _target) then {
["ace_treatmentAdvanced_fullHealLocal", [_caller, _target]] call CBA_fnc_localEvent;
[QGVAR(treatmentAdvanced_fullHealLocal), [_caller, _target]] call CBA_fnc_localEvent;
} else {
["ace_treatmentAdvanced_fullHealLocal", [_caller, _target], _target] call CBA_fnc_targetEvent;
[QGVAR(treatmentAdvanced_fullHealLocal), [_caller, _target], _target] call CBA_fnc_targetEvent;
};
true;

View File

@ -22,7 +22,7 @@ TRACE_5("params",_caller,_target,_selectionName,_className,_items);
private _part = [_selectionName] call FUNC(selectionNameToNumber);
["ace_treatmentAdvanced_medicationLocal", [_target, _className, _part], [_target]] call CBA_fnc_targetEvent;
[QGVAR(treatmentAdvanced_medicationLocal), [_target, _className, _part], [_target]] call CBA_fnc_targetEvent;
{
if (_x != "") then {

View File

@ -21,7 +21,7 @@ private ["_hitSelections", "_hitPoints", "_point", "_damage"];
params ["_caller", "_target", "_selection", "_className"];
if (local _target) then {
["ace_treatmentBasic_bandageLocal", [_target, _selection]] call CBA_fnc_localEvent;
[QGVAR(treatmentBasic_bandageLocal), [_target, _selection]] call CBA_fnc_localEvent;
} else {
["ace_treatmentBasic_bandageLocal", [_target, _selection], _target] call CBA_fnc_targetEvent;
[QGVAR(treatmentBasic_bandageLocal), [_target, _selection], _target] call CBA_fnc_targetEvent;
};

View File

@ -19,7 +19,7 @@
params ["_caller", "_target", "_treatmentClassname"];
if (local _target) then {
["ace_treatmentBasic_bloodbagLocal", [_target, _treatmentClassname]] call CBA_fnc_localEvent;
[QGVAR(treatmentBasic_bloodbagLocal), [_target, _treatmentClassname]] call CBA_fnc_localEvent;
} else {
["ace_treatmentBasic_bloodbagLocal", [_target, _treatmentClassname], _target] call CBA_fnc_targetEvent;
[QGVAR(treatmentBasic_bloodbagLocal), [_target, _treatmentClassname], _target] call CBA_fnc_targetEvent;
};

View File

@ -20,7 +20,7 @@
params ["_caller", "_target"];
if (local _target) then {
["ace_treatmentBasic_morphineLocal", [_target]] call CBA_fnc_localEvent;
[QGVAR(treatmentBasic_morphineLocal), [_target]] call CBA_fnc_localEvent;
} else {
["ace_treatmentBasic_morphineLocal", [_target], _target] call CBA_fnc_targetEvent;
[QGVAR(treatmentBasic_morphineLocal), [_target], _target] call CBA_fnc_targetEvent;
};

View File

@ -23,9 +23,9 @@ if (count _items == 0) exitWith {false};
_removeItem = _items select 0;
if (local _target) then {
["ace_treatmentIVLocal", [_target, _className]] call CBA_fnc_localEvent;
[QGVAR(treatmentIVLocal), [_target, _className]] call CBA_fnc_localEvent;
} else {
["ace_treatmentIVLocal", [_target, _className], _target] call CBA_fnc_targetEvent;
[QGVAR(treatmentIVLocal), [_target, _className], _target] call CBA_fnc_targetEvent;
};
[_target, _removeItem] call FUNC(addToTriageCard);

View File

@ -28,22 +28,22 @@ if (count _items == 0) exitWith {false};
_part = [_selectionName] call FUNC(selectionNameToNumber);
if (_part == 0 || _part == 1) exitWith {
// ["ace_displayTextStructured", ["You cannot apply a CAT on this body part!"], [_caller]] call CBA_fnc_targetEvent;
// [QEGVAR(common,displayTextStructured), ["You cannot apply a CAT on this body part!"], [_caller]] call CBA_fnc_targetEvent;
false;
};
_tourniquets = _target getVariable [QGVAR(tourniquets), [0,0,0,0,0,0]];
if ((_tourniquets select _part) > 0) exitWith {
_output = "There is already a tourniquet on this body part!"; // TODO localization
["ace_displayTextStructured", [_output, 1.5, _caller], [_caller]] call CBA_fnc_targetEvent;
[QEGVAR(common,displayTextStructured), [_output, 1.5, _caller], [_caller]] call CBA_fnc_targetEvent;
false;
};
_removeItem = _items select 0;
if (local _target) then {
["ace_treatmentTourniquetLocal", [_target, _removeItem, _selectionName]] call CBA_fnc_localEvent;
[QGVAR(treatmentTourniquetLocal), [_target, _removeItem, _selectionName]] call CBA_fnc_localEvent;
} else {
["ace_treatmentTourniquetLocal", [_target, _removeItem, _selectionName], _target] call CBA_fnc_targetEvent;
[QGVAR(treatmentTourniquetLocal), [_target, _removeItem, _selectionName], _target] call CBA_fnc_targetEvent;
};
[_target, _removeItem] call FUNC(addToTriageCard);

View File

@ -95,4 +95,4 @@ if (!(_target getVariable [QGVAR(addedToUnitLoop),false])) then {
[_target] call FUNC(addVitalLoop);
};
["ace_medical_treatmentSuccess", [_caller, _target, _selectionName, _className]] call CBA_fnc_localEvent;
["ace_treatmentSuccess", [_caller, _target, _selectionName, _className]] call CBA_fnc_localEvent;

View File

@ -33,15 +33,15 @@ if (!alive _unit) exitWith {
if (GVAR(moveUnitsFromGroupOnUnconscious)) then {
[_unit, false, "ACE_isUnconscious", side group _unit] call EFUNC(common,switchToGroupSide);
};
[_unit, "setCaptive", QGVAR(unconscious), false] call EFUNC(common,statusEffect_set);
[_unit, "setCaptive", "ace_unconscious", false] call EFUNC(common,statusEffect_set);
[_unit, false] call EFUNC(common,disableAI);
//_unit setUnitPos _originalPos;
_unit setUnconscious false;
[_unit, "isUnconscious"] call EFUNC(common,unmuteUnit);
["ace_medical_onUnconscious", [_unit, false]] call CBA_fnc_globalEvent;
["ace_unconscious", [_unit, false]] call CBA_fnc_globalEvent;
TRACE_3("ACE_DEBUG_Unconscious_Exit",_unit, (!alive _unit) , QGVAR(unconscious));
TRACE_3("ACE_DEBUG_Unconscious_Exit",_unit, (!alive _unit) , "ace_unconscious");
[_idPFH] call CBA_fnc_removePerFrameHandler;
};
@ -96,13 +96,13 @@ if !(_unit getVariable ["ACE_isUnconscious",false]) exitWith {
};
_unit setVariable [QGVAR(vehicleAwakeAnim), nil];
["ace_medical_onUnconscious", [_unit, false]] call CBA_fnc_globalEvent;
["ace_unconscious", [_unit, false]] call CBA_fnc_globalEvent;
// EXIT PFH
[_idPFH] call CBA_fnc_removePerFrameHandler;
};
if (!_hasMovedOut) then {
// Reset the unit back to the previous captive state.
[_unit, "setCaptive", QGVAR(unconscious), false] call EFUNC(common,statusEffect_set);
[_unit, "setCaptive", "ace_unconscious", false] call EFUNC(common,statusEffect_set);
// Swhich the unit back to its original group
//Unconscious units shouldn't be put in another group #527:

View File

@ -6,8 +6,7 @@ GVAR(MenuPFHID) = -1;
GVAR(lastOpenedOn) = -1;
GVAR(pendingReopen) = false;
["ace_medical_treatmentSuccess", {
["ace_treatmentSuccess", {
if (GVAR(openAfterTreatment) && {GVAR(pendingReopen)}) then {
GVAR(pendingReopen) = false;
[{
@ -16,7 +15,6 @@ GVAR(pendingReopen) = false;
};
}] call CBA_fnc_addEventHandler;
["ACE3 Common", QGVAR(displayMenuKeyPressed), localize LSTRING(DisplayMenuKey),
{
private _target = cursorTarget;
@ -37,4 +35,3 @@ GVAR(pendingReopen) = false;
false
},
[35, [false, false, false]], false, 0] call CBA_fnc_addKeybind;

View File

@ -19,7 +19,5 @@ class CfgPatches {
#include "CfgVehicles.hpp"
class ACE_newEvents {
medical_treatmentSuccess = "ace_medical_treatmentSuccess";
Medical_onMenuOpen = "ace_medical_onMenuOpen";
displayTextStructured = "ace_displayTextStructured";
Medical_onMenuOpen = "ace_medicalMenuOpened";
};

View File

@ -81,10 +81,10 @@ GVAR(MenuPFHID) = [{
closeDialog 314412;
//If we failed because of distance check, show UI message:
if ((ACE_player distance GVAR(INTERACTION_TARGET)) > GVAR(maxRange)) then {
["ace_displayTextStructured", [[ELSTRING(medical,DistanceToFar), [GVAR(INTERACTION_TARGET)] call EFUNC(common,getName)], 2, ACE_player]] call CBA_fnc_localEvent;
[[ELSTRING(medical,DistanceToFar), [GVAR(INTERACTION_TARGET)] call EFUNC(common,getName)], 2] call EFUNC(common,displayTextStructured);
};
};
}, 0, [_display]] call CBA_fnc_addPerFrameHandler;
["ace_medical_onMenuOpen", [ACE_player, _target]] call CBA_fnc_localEvent;
["ace_medicalMenuOpened", [ACE_player, _target]] call CBA_fnc_localEvent;

View File

@ -19,5 +19,5 @@
if (!hasInterface) exitWith {};
["ace_playerVehicleChanged", {_this call FUNC(handlePlayerVehicleChanged);}] call CBA_fnc_addEventHandler;
["ace_infoDisplayChanged", {_this call FUNC(turretDisplayLoaded);}] call CBA_fnc_addEventHandler;
["ace_playerVehicleChanged", FUNC(handlePlayerVehicleChanged)] call CBA_fnc_addEventHandler;
["ace_infoDisplayChanged", FUNC(turretDisplayLoaded)] call CBA_fnc_addEventHandler;

Some files were not shown because too many files have changed in this diff Show More