- Rename phone class to repository and update client event handlers - Split task helpers/modules/prototypes and add mission generator flow - Add reward parsing, mission manager startup, and attack logging
30 lines
970 B
Plaintext
30 lines
970 B
Plaintext
#include "script_component.hpp"
|
|
|
|
["ace_explosives_defuse", {
|
|
private _taskID = "";
|
|
private _explosive = objNull;
|
|
{
|
|
if (_x isEqualType objNull && { !isNull _x }) then {
|
|
if (isNull _explosive) then { _explosive = _x; };
|
|
_taskID = _x getVariable ["assignedTask", ""];
|
|
if (_taskID isNotEqualTo "") exitWith {};
|
|
};
|
|
} forEach _this;
|
|
|
|
if (_taskID isEqualTo "" && { !isNull _explosive }) then {
|
|
_taskID = GVAR(TaskStore) call ["findTaskEntityOwner", ["ieds", _explosive]];
|
|
};
|
|
|
|
if (_taskID isEqualTo "") exitWith {
|
|
["WARNING", format [
|
|
"ACE Defuse Event Ignored: No assignedTask found. Explosive=%1, Type=%2, NetID=%3",
|
|
_explosive,
|
|
typeOf _explosive,
|
|
netId _explosive
|
|
]] call EFUNC(common,log);
|
|
};
|
|
|
|
GVAR(TaskStore) call ["incrementDefuseCount", [_taskID]];
|
|
}] call CFUNC(addEventHandler);
|
|
[] call FUNC(missionManager);
|