Cleanup Merge and remoteFnc events

This commit is contained in:
PabstMirror 2016-06-02 19:59:18 -05:00
parent d7f9c52c2f
commit db78dd53a8
17 changed files with 20 additions and 20 deletions

View File

@ -113,6 +113,6 @@ class RscInGameUI {
};
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;);
};
};

View File

@ -189,10 +189,10 @@ call FUNC(checkFiles);
//////////////////////////////////////////////////
// Set up SettingsInitialized eventhandler
// Set up ace_settingsInitialized eventhandler
//////////////////////////////////////////////////
["SettingsInitialized", {
["ace_settingsInitialized", {
[
GVAR(checkPBOsAction),
GVAR(checkPBOsCheckAll),

View File

@ -20,7 +20,7 @@ if (!isNil "_info") then {
_info params ["_caller", "_target", "_requestID", "_requestMessage", "_callBack"];
private _replyParams = [_info, _accepted];
[QGVAR(requestCallback), _caller, _replyParams] call FUNC(objectEvent);
[QGVAR(requestCallback), _replyParams, _caller] call CBA_fnc_targetEvent;
_unit setVariable [_id, nil];
};

View File

@ -20,7 +20,7 @@ params ["_caller", "_target", "_requestID", "_requestMessage", "_callBack"];
if (isPlayer _target) then {
// Pass request on to target locality for player accept/decline.
[QGVAR(receiveRequest), _target, [_caller, _target, _requestID, _requestMessage, _callBack]] call FUNC(objectEvent);
[QGVAR(receiveRequest), [_caller, _target, _requestID, _requestMessage, _callBack], _target] call CBA_fnc_targetEvent;
} else {
// accept it, since it's an AI.
[_caller, _target, true] call compile _callBack;

View File

@ -17,7 +17,7 @@
//Event for setting explosive placement angle/pitch:
[QGVAR(place), {_this call FUNC(setPosition)}] call CBA_fnc_addEventHandler;
[QGVAR(startDefuse), FUNC(startDefuse)] call EFUNC(common,addEventHandler);
[QGVAR(startDefuse), FUNC(startDefuse)] call CBA_fnc_addEventHandler;
//When getting knocked out in medical, trigger deadman explosives:
//Event is global, only run on server (ref: ace_medical_fnc_setUnconscious)

View File

@ -44,7 +44,7 @@ if (STANCE _unit == "Prone") then {
if (ACE_player != _unit) then {
// If the unit is a player, call the function on the player.
if (isPlayer _unit) then {
[QGVAR(startDefuse), _unit, [_unit, _target]] call EFUNC(common,objectEvent);
[QGVAR(startDefuse), [_unit, _target], _unit] call CBA_fnc_targetEvent;
} else {
_unit playActionNow _actionToPlay;
_unit disableAI "MOVE";

View File

@ -264,7 +264,7 @@ GVAR(lastHeartBeatSound) = CBA_missionTime;
}, 0, []] call CBA_fnc_addPerFrameHandler;
};
["SettingsInitialized", {
["ace_settingsInitialized", {
// Networked litter (need to wait for GVAR(litterCleanUpDelay) to be set)
[QGVAR(createLitter), FUNC(handleCreateLitter), GVAR(litterCleanUpDelay)] call EFUNC(common,addSyncedEventHandler);

View File

@ -20,7 +20,7 @@ params ["_unit", "_item"];
TRACE_2("params",_unit,_item);
if ([_unit, _item] call EFUNC(common,hasItem)) exitWith {
[QGVAR(useItem), _unit, [_unit, _item]] call EFUNC(common,objectEvent);
[QGVAR(useItem), [_unit, _item], _unit] call CBA_fnc_targetEvent;
[true, _unit];
};

View File

@ -25,5 +25,5 @@ if (ACE_player == _unit && {GVAR(SavePreDeathGear)}) then {
};
if (missionNamespace getVariable [QGVAR(showFriendlyFireMessage), false]) then {
[QGVAR(showFriendlyFireMessageEvent), _this] call EFUNC(common,objectEvent);
[QGVAR(showFriendlyFireMessageEvent), _this] call CBA_fnc_globalEvent;
};

View File

@ -4,7 +4,7 @@
// Add interaction menu exception
["isNotSpectating", {!(GETVAR((_this select 0),GVAR(isStaged),false))}] call EFUNC(common,addCanInteractWithCondition);
["SettingsInitialized", {
["ace_settingsInitialized", {
GVAR(availableModes) = [[0,1,2], [1,2], [0], [1], [2]] select GVAR(restrictModes);
GVAR(availableVisions) = [[-2,-1,0,1], [-2,-1], [-2,0,1], [-2]] select GVAR(restrictVisions);
}] call CBA_fnc_addEventHandler;

View File

@ -23,7 +23,7 @@ private ["_vision","_pos"];
// When all are dead with respawn type "None" the mission should end
if ((_respawn == 0) && {{alive _x} count allPlayers <= 0}) exitWith {
["BIS_fnc_endMission", ["endDeath", false]] call EFUNC(common,globalEvent);
["BIS_fnc_endMission", ["endDeath", false]] call EFUNC(common,globalEvent); //???
};
// Some environment information can be used for the initial camera attributes

View File

@ -27,7 +27,7 @@ params [["_unit",player,[objNull]], ["_set",true,[true]]];
if !(_set || (GETVAR(_unit,GVAR(isStaged),false))) exitWith {};
if !(local _unit) exitWith {
[QGVAR(stageSpectator), _unit, [_unit, _set]] call EFUNC(common,objectEvent);
[QGVAR(stageSpectator), [_unit, _set], _unit] call CBA_fnc_targetEvent;
};
// Prevent unit falling into water

View File

@ -33,5 +33,5 @@ if (isServer) then {
params ["_unit", "_player"];
_unit setVariable [QGVAR(OriginalOwner), owner _unit, true];
_unit setOwner (owner _player);
}] call EFUNC(common,addEventHandler);
}] call CBA_fnc_addEventHandler;
};

View File

@ -40,7 +40,7 @@ if (_leave) exitWith {
// should switch locality
// This doesn't work anymore, because one's now able to switch to units from a different side
//[_unit] joinSilent group player;
[QGVAR(switchLocality), [_unit, player]] call EFUNC(common,serverEvent);
[QGVAR(switchLocality), [_unit, player]] call CBA_fnc_serverEvent;
[{
params ["_args", "_pfhId"];
@ -72,7 +72,7 @@ if (_leave) exitWith {
// set owner back to original owner
private _oldOwner = _oldUnit getVariable[QGVAR(OriginalOwner), -1];
if (_oldOwner > -1) then {
["setOwner", [_oldUnit, _oldOwner]] call EFUNC(common,serverEvent);
["ace_setOwner", [_oldUnit, _oldOwner]] call CBA_fnc_serverEvent;
};
[localize LSTRING(SwitchedUnit)] call EFUNC(common,displayTextStructured);

View File

@ -20,10 +20,10 @@ if (!hasInterface) exitWith {};
// Execute local event for when it's safe to modify UI through this API
// infoDisplayChanged can execute multiple times, make sure it only happens once
if (!GVAR(interfaceInitialized)) then {
["InterfaceInitialized", []] call CBA_fnc_localEvent
[QGVAR(InterfaceInitialized), []] call CBA_fnc_localEvent
GVAR(interfaceInitialized) = true;
};
}] call EFUNC(common,addEventHandler);
}] call CBA_fnc_addEventHandler;
// On changing settings
["ace_settingChanged", {

View File

@ -59,7 +59,7 @@ simulWeatherSync;
["ace_settingsInitialized",{
TRACE_1("SettingsInitialized",GVAR(syncRain));
TRACE_1("ace_settingsInitialized eh",GVAR(syncRain));
//Create a 0 sec delay PFEH to update rain every frame:
if (GVAR(syncRain)) then {

View File

@ -10,7 +10,7 @@ GVAR(rain_current_range) = -1+(random 2);
call FUNC(initWind);
["ace_settingsInitialized", {
TRACE_2("SettingsInitialized",GVAR(enableServerController),GVAR(serverUpdateInterval));
TRACE_2("ace_settingsInitialized eh",GVAR(enableServerController),GVAR(serverUpdateInterval));
if (GVAR(enableServerController)) then {
[FUNC(serverController), GVAR(serverUpdateInterval)] call CBA_fnc_addPerFrameHandler;