Changed BI functions to check for settings

This commit is contained in:
SilentSpike 2015-05-11 16:23:46 +01:00
parent 3118666f80
commit 755581be40
5 changed files with 57 additions and 50 deletions

View File

@ -150,14 +150,15 @@ if (_activated) then {
_x radiochanneladd [_player];
} foreach (_logic getvariable ["channels",[]]);
/* Removed by ACE
//--- 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);
*/
// Added by ACE_zeus to toggle ascension messages
if (GETMVAR(QGVAR(zeusAscension),true)) 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;
@ -189,14 +190,15 @@ if (_activated) then {
};
};
/* Removed by ACE
//--- Create bird
_birdType = _logic getvariable ["birdType","eagle_f"];
if (_birdType != "") then {
_bird = createvehicle [_birdType,[100,100,100],[],0,"none"];
_logic setvariable ["bird",_bird,true];
// Added by ACE_zeus to toggle eagle
if (GETMVAR(QGVAR(zeusBird),true)) 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 = [];
@ -213,17 +215,18 @@ if (_activated) then {
} foreach (synchronizedobjects _logic);
_addons call bis_fnc_activateaddons;
/* Removed by ACE
//--- Locality changed
_logic addeventhandler [
"local",
{
_logic = _this select 0;
_bird = _logic getvariable ["bird",objnull];
_bird setowner owner _logic;
}
];
*/
// Added by ACE_zeus to toggle eagle
if (GETMVAR(QGVAR(zeusBird),true)) then {
//--- Locality changed
_logic addeventhandler [
"local",
{
_logic = _this select 0;
_bird = _logic getvariable ["bird",objnull];
_bird setowner owner _logic;
}
];
};
};
//--- Player

View File

@ -22,16 +22,20 @@ if (_activated) then {
_explosive = createvehicle [_explosive,position _logic,[],0,"none"];
_explosive attachto [_logic];
/* Removed by ACE
//--- Reveal the mine to curator's side
{
_side = (getassignedcuratorunit _x) call bis_fnc_objectSide;
_side revealmine _explosive;
} foreach (objectcurators _logic);
// Added by ACE_zeus to control if mines are revealed
_revealMines = GETMVAR(QGVAR(revealMines),2);
if (_revealMines > 0) then {
//--- Reveal the mine to curator's side
{
_side = (getassignedcuratorunit _x) call bis_fnc_objectSide;
_side revealmine _explosive;
} foreach (objectcurators _logic);
//--- Mark minefields in the map
[] spawn bis_fnc_drawMinefields;
*/
if (_revealMines > 1) then {
//--- Mark minefields in the map
[] spawn bis_fnc_drawMinefields;
};
};
//--- Show hint to curator who placed the object
[[["Curator","PlaceMines"],nil,nil,nil,nil,nil,nil,true],"bis_fnc_advHint",_logic] call bis_fnc_mp;

View File

@ -91,7 +91,6 @@ if (_activated) then {
};
default {["Ammo simulation '%1' is not supported",_simulation] call bis_fnc_error;};
};
/* Removed by ACE
_fnc_playRadio = {
if (_radio != "") then {
_entities = (getposatl _logic) nearentities ["All",100];
@ -110,7 +109,6 @@ if (_activated) then {
} foreach _entities;
};
};
*/
if (count _hint > 0) then {
[[_hint,nil,nil,nil,nil,nil,nil,true],"bis_fnc_advHint",objectcurators _logic] call bis_fnc_mp;
};
@ -136,10 +134,11 @@ if (_activated) then {
//--- Create sound source
_soundSource = if (_soundSourceClass != "") then {createSoundSource [_soundSourceClass,_pos,[],0]} else {objnull};
/* Removed by ACE
//--- Play radio warning
[] call _fnc_playRadio;
*/
// Added by ACE_zeus to toggle ordnance radio message
if (GETMVAR(QGVAR(radioOrdnance),true)) then {
//--- Play radio warning
[] call _fnc_playRadio;
};
//--- Update
if (_attach) then {

View File

@ -45,10 +45,11 @@ if (_activated && local _logic && !isnull curatorcamera) then {
bis_fnc_moduleRemoteControl_unit = _unit;
_unit setvariable ["bis_fnc_moduleRemoteControl_owner",player,true];
/* Removed by ACE
//--- Play wind cue to all players
[format ["wind%1",ceil random 5],"bis_fnc_playsound"] call bis_fnc_mp;
*/
// Added by ACE_zeus to toggle remote control wind sound
if (GETMVAR(QGVAR(remoteWind),true)) then {
//--- Play wind cue to all players
[format ["wind%1",ceil random 5],"bis_fnc_playsound"] call bis_fnc_mp;
};
_blur = ppeffectcreate ["RadialBlur",144];
_blur ppeffectenable true;

View File

@ -22,8 +22,8 @@ _activated = _this select 2;
if !(_activated) exitWith {};
[_logic, QGVAR(settingAscension), "zeusAscension"] call EFUNC(common,readSettingFromModule);
[_logic, QGVAR(settingBird), "zeusBird"] call EFUNC(common,readSettingFromModule);
[_logic, QGVAR(settingOrdnance), "radioOrdnance"] call EFUNC(common,readSettingFromModule);
[_logic, QGVAR(settingMines), "revealMines"] call EFUNC(common,readSettingFromModule);
[_logic, QGVAR(settingWind), "remoteWind"] call EFUNC(common,readSettingFromModule);
[_logic, QGVAR(zeusAscension), "zeusAscension"] call EFUNC(common,readSettingFromModule);
[_logic, QGVAR(zeusBird), "zeusBird"] call EFUNC(common,readSettingFromModule);
[_logic, QGVAR(radioOrdnance), "radioOrdnance"] call EFUNC(common,readSettingFromModule);
[_logic, QGVAR(revealMines), "revealMines"] call EFUNC(common,readSettingFromModule);
[_logic, QGVAR(remoteWind), "remoteWind"] call EFUNC(common,readSettingFromModule);