mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
742626ff1a
Co-authored-by: PabstMirror <pabstmirror@gmail.com>
34 lines
686 B
Plaintext
34 lines
686 B
Plaintext
#include "..\script_component.hpp"
|
|
/*
|
|
* Author: Walthzer
|
|
* Sets if a dynamic defuse action is allowed to be added to a mine.
|
|
*
|
|
* Arguments:
|
|
* 0: Mine <OBJECT>
|
|
* 1: Allow defusal <BOOL>
|
|
*
|
|
* Return Value:
|
|
* Succes <BOOLEAN>
|
|
*
|
|
* Example:
|
|
* [_mine, false] call ace_explosives_fnc_allowDefuse
|
|
*
|
|
* Public: Yes
|
|
*/
|
|
|
|
params [["_mine", objNull, [objNull]], ["_allow", true, [true]]];
|
|
TRACE_2("params",_mine,_allow);
|
|
|
|
if !(_mine in allMines) exitWith {false};
|
|
|
|
if (_allow && {!([_mine] call FUNC(isAllowedDefuse))}) exitWith {
|
|
GVAR(excludedMines) = GVAR(excludedMines) - [_mine];
|
|
true
|
|
};
|
|
|
|
if (!_allow) exitWith {
|
|
GVAR(excludedMines) pushBackUnique _mine != -1
|
|
};
|
|
|
|
false
|