mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
BIS_fnc_ActivateAddons must run during mission init
This commit is contained in:
parent
3bd856dd4f
commit
0ca8a373d1
@ -66,7 +66,7 @@ class CfgVehicles {
|
||||
};
|
||||
|
||||
class ModuleCurator_F: Module_F {
|
||||
function = QUOTE(DFUNC(moduleCuratorDelay));
|
||||
function = QUOTE(DFUNC(bi_moduleCurator));
|
||||
};
|
||||
class ModuleMine_F: ModuleEmpty_F {
|
||||
function = QUOTE(DFUNC(bi_moduleMine));
|
||||
|
@ -152,16 +152,6 @@ if (_activated) then {
|
||||
_x radiochanneladd [_player];
|
||||
} foreach (_logic getvariable ["channels",[]]);
|
||||
|
||||
// Added by ACE_zeus to toggle ascension messages
|
||||
if (GVAR(zeusAscension)) then {
|
||||
//--- Sent notification to all assigned players
|
||||
{
|
||||
if (isplayer _x) then {
|
||||
[["CuratorAssign",[_name,name _player]],"bis_fnc_showNotification",_x] call bis_fnc_mp;
|
||||
};
|
||||
} foreach (curatoreditableobjects _logic);
|
||||
};
|
||||
|
||||
[_logic,"curatorUnitAssigned",[_logic,_player]] call bis_fnc_callscriptedeventhandler;
|
||||
|
||||
//--- Forced interface
|
||||
@ -192,16 +182,6 @@ if (_activated) then {
|
||||
};
|
||||
};
|
||||
|
||||
// Added by ACE_zeus 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];
|
||||
};
|
||||
};
|
||||
|
||||
//--- Activated all future addons
|
||||
_addons = [];
|
||||
{
|
||||
@ -217,18 +197,8 @@ if (_activated) then {
|
||||
} foreach (synchronizedobjects _logic);
|
||||
_addons call bis_fnc_activateaddons;
|
||||
|
||||
// Added by ACE_zeus to toggle eagle
|
||||
if (GVAR(zeusBird)) then {
|
||||
//--- Locality changed
|
||||
_logic addeventhandler [
|
||||
"local",
|
||||
{
|
||||
_logic = _this select 0;
|
||||
_bird = _logic getvariable ["bird",objnull];
|
||||
_bird setowner owner _logic;
|
||||
}
|
||||
];
|
||||
};
|
||||
// Added by ACE_zeus to delay ascension messages and bird code (so that settings can be changed)
|
||||
[{_this spawn DFUNC(moduleCuratorDelay);},_this] call EFUNC(common,execNextFrame);
|
||||
};
|
||||
|
||||
//--- Player
|
||||
|
@ -1,6 +1,6 @@
|
||||
/*
|
||||
* Author: SilentSpike
|
||||
* Function that delays the execution of the curator module function
|
||||
* Function executed at a delay to allow curator settings module to run first
|
||||
* Allows ascension and bird settings to be set by module beforehand
|
||||
*
|
||||
* Arguments:
|
||||
@ -16,4 +16,34 @@
|
||||
|
||||
#include "script_component.hpp"
|
||||
|
||||
[{_this spawn DFUNC(bi_moduleCurator);},_this] call EFUNC(common,execNextFrame);
|
||||
if (isServer) then {
|
||||
// Extracted from moduleCurator to toggle ascension messages
|
||||
if (GVAR(zeusAscension)) then {
|
||||
//--- Sent notification to all assigned players
|
||||
{
|
||||
if (isplayer _x) then {
|
||||
[["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;
|
||||
_bird = _logic getvariable ["bird",objnull];
|
||||
_bird setowner owner _logic;
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
Loading…
Reference in New Issue
Block a user