mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Another fix for moduleCurator
This commit is contained in:
parent
8120cef964
commit
84d06bac34
@ -152,6 +152,9 @@ if (_activated) then {
|
|||||||
_x radiochanneladd [_player];
|
_x radiochanneladd [_player];
|
||||||
} foreach (_logic getvariable ["channels",[]]);
|
} foreach (_logic getvariable ["channels",[]]);
|
||||||
|
|
||||||
|
// Added by ACE_zeus to delay ascension message at mission start
|
||||||
|
[{_this spawn DFUNC(moduleCuratorDelay);},[_logic,1]] call EFUNC(common,execNextFrame);
|
||||||
|
|
||||||
[_logic,"curatorUnitAssigned",[_logic,_player]] call bis_fnc_callscriptedeventhandler;
|
[_logic,"curatorUnitAssigned",[_logic,_player]] call bis_fnc_callscriptedeventhandler;
|
||||||
|
|
||||||
//--- Forced interface
|
//--- Forced interface
|
||||||
@ -197,8 +200,8 @@ if (_activated) then {
|
|||||||
} foreach (synchronizedobjects _logic);
|
} foreach (synchronizedobjects _logic);
|
||||||
_addons call bis_fnc_activateaddons;
|
_addons call bis_fnc_activateaddons;
|
||||||
|
|
||||||
// Added by ACE_zeus to delay ascension messages and bird code (so that settings can be changed)
|
// Added by ACE_zeus to delay bird code
|
||||||
[{_this spawn DFUNC(moduleCuratorDelay);},[_logic,_player]] call EFUNC(common,execNextFrame);
|
[{_this spawn DFUNC(moduleCuratorDelay);},[_logic,0]] call EFUNC(common,execNextFrame);
|
||||||
};
|
};
|
||||||
|
|
||||||
//--- Player
|
//--- Player
|
||||||
|
@ -5,7 +5,9 @@
|
|||||||
*
|
*
|
||||||
* Arguments:
|
* Arguments:
|
||||||
* 0: The module logic <LOGIC>
|
* 0: The module logic <LOGIC>
|
||||||
* 1: Zeus player <OBJECT>
|
* 1: Mode <NUMBER>
|
||||||
|
* 0 - Spawn bird
|
||||||
|
* 1 - Ascension message
|
||||||
*
|
*
|
||||||
* Return Value:
|
* Return Value:
|
||||||
* None <NIL>
|
* None <NIL>
|
||||||
@ -16,38 +18,41 @@
|
|||||||
#include "script_component.hpp"
|
#include "script_component.hpp"
|
||||||
|
|
||||||
if (isServer) then {
|
if (isServer) then {
|
||||||
private ["_logic","_player","_birdType","_bird"];
|
private ["_logic","_mode","_player","_birdType","_bird"];
|
||||||
|
|
||||||
_logic = _this select 0;
|
_logic = _this select 0;
|
||||||
_player = _this select 1;
|
_mode = _this select 1;
|
||||||
|
|
||||||
// Extracted from moduleCurator to toggle ascension messages
|
if (_mode == 1) then {
|
||||||
if (GVAR(zeusAscension)) then {
|
// Extracted from moduleCurator to toggle ascension messages
|
||||||
//--- Sent notification to all assigned players
|
_player = getAssignedCuratorUnit _logic;
|
||||||
{
|
if (GVAR(zeusAscension)) then {
|
||||||
if (isplayer _x) then {
|
//--- Sent notification to all assigned players
|
||||||
[["CuratorAssign",[_name,name _player]],"bis_fnc_showNotification",_x] call bis_fnc_mp;
|
|
||||||
};
|
|
||||||
} foreach (curatoreditableobjects _logic);
|
|
||||||
};
|
|
||||||
|
|
||||||
// Extracted from moduleCurator to toggle eagle
|
|
||||||
if (GVAR(zeusBird)) then {
|
|
||||||
//--- Create bird
|
|
||||||
_birdType = _logic getvariable ["birdType","eagle_f"];
|
|
||||||
if (_birdType != "") then {
|
|
||||||
_bird = createvehicle [_birdType,[100,100,100],[],0,"none"];
|
|
||||||
_logic setvariable ["bird",_bird,true];
|
|
||||||
};
|
|
||||||
|
|
||||||
//--- Locality changed
|
|
||||||
_logic addeventhandler [
|
|
||||||
"local",
|
|
||||||
{
|
{
|
||||||
_logic = _this select 0;
|
if (isplayer _x) then {
|
||||||
_bird = _logic getvariable ["bird",objnull];
|
[["CuratorAssign",[_name,name _player]],"bis_fnc_showNotification",_x] call bis_fnc_mp;
|
||||||
_bird setowner owner _logic;
|
};
|
||||||
}
|
} foreach (curatoreditableobjects _logic);
|
||||||
];
|
};
|
||||||
|
} else {
|
||||||
|
// Extracted from moduleCurator to toggle eagle
|
||||||
|
if (GVAR(zeusBird)) then {
|
||||||
|
//--- Create bird
|
||||||
|
_birdType = _logic getvariable ["birdType","eagle_f"];
|
||||||
|
if (_birdType != "") then {
|
||||||
|
_bird = createvehicle [_birdType,[100,100,100],[],0,"none"];
|
||||||
|
_logic setvariable ["bird",_bird,true];
|
||||||
|
};
|
||||||
|
|
||||||
|
//--- Locality changed
|
||||||
|
_logic addeventhandler [
|
||||||
|
"local",
|
||||||
|
{
|
||||||
|
_logic = _this select 0;
|
||||||
|
_bird = _logic getvariable ["bird",objnull];
|
||||||
|
_bird setowner owner _logic;
|
||||||
|
}
|
||||||
|
];
|
||||||
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user