ACE3/addons/microdagr/functions/fnc_canShow.sqf

38 lines
987 B
Plaintext
Raw Normal View History

2015-03-09 18:53:49 +00:00
/*
* Author: PabstMirror
2015-03-11 07:06:07 +00:00
* Tests if the dagr can be shown in a mode
2015-03-09 18:53:49 +00:00
*
* Arguments:
2015-03-11 07:06:07 +00:00
* The display mode to test showing <NUMBER>
2015-03-09 18:53:49 +00:00
*
* Return Value:
2015-03-11 07:06:07 +00:00
* Nothing
2015-03-09 18:53:49 +00:00
*
* Example:
* [mode] call ace_microdagr_fnc_canShow
2015-03-09 18:53:49 +00:00
*
2015-03-11 07:06:07 +00:00
* Public: No
2015-03-09 18:53:49 +00:00
*/
#include "script_component.hpp"
2015-03-09 21:09:00 +00:00
PARAMS_1(_showType);
private ["_returnValue"];
2015-03-11 03:11:25 +00:00
_returnValue = false;
2015-03-11 03:11:25 +00:00
switch (_showType) do {
case (DISPLAY_MODE_CLOSED): {_returnValue = true}; //Can always close
case (DISPLAY_MODE_HIDDEN): {_returnValue = true}; //Can always hide
2015-03-09 21:09:00 +00:00
case (DISPLAY_MODE_DIALOG): {
_returnValue = ("ACE_microDAGR" in (items ACE_player)) && {[ACE_player, objNull, ["notOnMap", "isNotInside"]] call EFUNC(common,canInteractWith)};
};
case (DISPLAY_MODE_DISPLAY): {
//Can't have minimap up while zoomed in
_returnValue = (cameraview != "GUNNER") && {"ACE_microDAGR" in (items ACE_player)} && {[ACE_player, objNull, ["notOnMap", "isNotInside"]] call EFUNC(common,canInteractWith)};
};
};
_returnValue