mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
e47e18001f
* Update display name in team * Update display name everywhere * order https://youtu.be/VYycQTm2HrM --------- Co-authored-by: BrettMayson <brett@mayson.io>
33 lines
798 B
Plaintext
33 lines
798 B
Plaintext
#include "script_component.hpp"
|
|
/*
|
|
* Author: kymckay (based on unmuteUnit)
|
|
* Globally unhides a unit. Only unhides if the last reason was removed.
|
|
*
|
|
* Arguments:
|
|
* 0: Unit <OBJECT>
|
|
* 1: Reason to unhide the unit <STRING>
|
|
*
|
|
* Return Value:
|
|
* None
|
|
*
|
|
* Example:
|
|
* [ACE_Player, "SpectatorMode"] call ace_common_fnc_unhideUnit
|
|
*
|
|
* Public: Yes
|
|
*/
|
|
|
|
params ["_unit", "_reason"];
|
|
|
|
if (isNull _unit) exitWith {};
|
|
|
|
private _setHiddenReasons = _unit getVariable [QGVAR(setHiddenReasons), []];
|
|
|
|
if (_reason in _setHiddenReasons) then {
|
|
_setHiddenReasons deleteAt (_setHiddenReasons find _reason);
|
|
_unit setVariable [QGVAR(setHiddenReasons), _setHiddenReasons, true];
|
|
};
|
|
|
|
if (_setHiddenReasons isEqualTo []) then {
|
|
[QGVAR(hideObjectGlobal), [_unit,false]] call CBA_fnc_serverEvent;
|
|
};
|