forge/arma/server/addons/task/functions/objects/fnc_ProtectedEntityController.sqf
Jacob Schmidt 788ac6da7a Throttle mission generation and quiet status logs
- Add a mission generation cooldown in the mission manager
- Suppress noisy task status extension logs
- Switch task and entity class hashes to merged base copies
2026-05-21 21:56:50 -05:00

42 lines
1.2 KiB
Plaintext

#include "..\script_component.hpp"
/*
* Object-style protected entity controller.
*/
#pragma hemtt ignore_variables ["_self"]
GVAR(ProtectedEntityController) = +GVAR(EntityControllerBaseClass);
GVAR(ProtectedEntityController) merge [createHashMapFromArray [
["#type", "ProtectedEntityController"],
["#create", compileFinal {
params [
["_taskID", "", [""]],
["_entity", objNull, [objNull]],
["_controllerParams", createHashMap, [createHashMap]]
];
_self call ["initializeControllerState", [_taskID, _entity, "protected", _controllerParams]];
_self call ["registerInstance", []];
}],
["#delete", compileFinal {
_self call ["unregisterInstance", []];
}],
["runLoop", compileFinal {
if !(_self call ["registerTaskEntity", ["entities"]]) exitWith {
_self call ["markAborted", []];
_self call ["cleanup", []];
false
};
_self call ["markActive", []];
waitUntil {
sleep 1;
!(_self call ["isEntityUsable", []])
};
_self call ["markFinished", []];
_self call ["cleanup", []];
true
}]
], true];