mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
04e41a4d5a
* add variable full repair time * enable compile cache * Fix stupid * whoops * incremental full repair * cleanup function header * ignore hitpoints inFullRepairProgress * fix getHitPointsToIgnore * final cleanup * don't show repair hint while doing full repair * make this all work * fix stupid put this back in place * Add setting for speedup when near repair facility/vehicle enable compile cache * refactor near repair facility/vehicle checks * remove skipping hint from do_repair better for feedback this way * git diff stuff * use functions directly in ACE_Repair.hpp * add check for vehicle proximity * add a new line * switch to multiply by setting instead * speed boost settings, remove exit addRepairActions * stringtable * remove speed boost settings * fix things, add forceDisplayName * name in function header * fix TRACE * add animation looping * remove systemChat Co-authored-by: Filip Maciejewski <veteran29@users.noreply.github.com> * add time coefficient setting * move to repair category * time coefficient max and default values --------- Co-authored-by: Salluci <69561145+Salluci@users.noreply.github.com> Co-authored-by: Filip Maciejewski <veteran29@users.noreply.github.com>
30 lines
922 B
Plaintext
30 lines
922 B
Plaintext
#include "script_component.hpp"
|
|
/*
|
|
* Author: Glowbal
|
|
* Checks if a unit is in a repair facility.
|
|
*
|
|
* Arguments:
|
|
* 0: Unit <OBJECT>
|
|
*
|
|
* Return Value:
|
|
* Is inside a repair facility <BOOL>
|
|
*
|
|
* Example:
|
|
* [unit] call ace_repair_fnc_isInRepairFacility
|
|
*
|
|
* Public: Yes
|
|
*/
|
|
|
|
#define CHECK_OBJECTS(var) ((var) findIf {(_x getVariable ["ACE_isRepairFacility", getNumber (configOf _x >> QGVAR(canRepair))] > 0) && {!(_x isKindOf "AllVehicles")} && {alive _x}} != -1)
|
|
|
|
params [["_object", objNull, [objNull]]];
|
|
TRACE_1("params",_object);
|
|
|
|
|
|
private _fnc_check = {
|
|
private _position = _object modelToWorldVisual [0, 0, eyePos _object select 2];
|
|
CHECK_OBJECTS(lineIntersectsWith [ARR_3(_position, _position vectorAdd [ARR_3(0, 0, 10)], _object)]) || {CHECK_OBJECTS(_object nearObjects 7.5)}
|
|
};
|
|
|
|
[[], _fnc_check, _object, QGVAR(inRepairFacilityCache), IN_REPAIR_FACILITY_CACHE_EXPIRY] call EFUNC(common,cachedCall);
|