2015-03-21 15:33:14 +00:00
|
|
|
/*
|
|
|
|
* Author: Glowbal
|
|
|
|
* Cached Check if the treatment action can be performed.
|
|
|
|
*
|
|
|
|
* Arguments:
|
|
|
|
* 0: The caller <OBJECT>
|
|
|
|
* 1: The target <OBJECT>
|
|
|
|
* 2: Selection name <STRING>
|
|
|
|
* 3: ACE_Medical_Treatments Classname <STRING>
|
|
|
|
*
|
2017-06-08 13:31:51 +00:00
|
|
|
* Return Value:
|
2015-03-21 15:33:14 +00:00
|
|
|
* Can Treat <BOOL>
|
|
|
|
*
|
2017-06-08 13:31:51 +00:00
|
|
|
* Example:
|
|
|
|
* [bob, kevin, "selection", "classname"] call ACE_medical_fnc_canTreatCached
|
|
|
|
*
|
2015-03-21 15:33:14 +00:00
|
|
|
* Public: No
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include "script_component.hpp"
|
|
|
|
|
2015-03-21 15:47:51 +00:00
|
|
|
#define MAX_DURATION_CACHE 2
|
2015-08-22 14:25:10 +00:00
|
|
|
params ["", "_target", "_selection", "_classname"];
|
2015-03-21 15:33:14 +00:00
|
|
|
|
|
|
|
// parameters, function, namespace, uid
|
2016-07-14 18:06:45 +00:00
|
|
|
[_this, DFUNC(canTreat), _target, format [QGVAR(canTreat_%1_%2), _selection, _classname], MAX_DURATION_CACHE, QEGVAR(interact_menu,clearConditionCaches)] call EFUNC(common,cachedCall);
|