2023-09-12 18:58:10 +00:00
|
|
|
#include "..\script_component.hpp"
|
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-08-26 03:31:33 +00:00
|
|
|
* None
|
2015-03-09 18:53:49 +00:00
|
|
|
*
|
|
|
|
* Example:
|
2015-08-26 03:31:33 +00:00
|
|
|
* [1] 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
|
|
|
*/
|
2015-08-26 03:31:33 +00:00
|
|
|
params ["_showType"];
|
2015-03-09 21:09:00 +00:00
|
|
|
|
2016-09-04 14:44:22 +00:00
|
|
|
private _returnValue = false;
|
2015-03-11 03:11:25 +00:00
|
|
|
|
2015-08-26 03:31:33 +00:00
|
|
|
_returnValue = switch (_showType) do {
|
|
|
|
case (DISPLAY_MODE_CLOSED): { true }; //Can always close
|
|
|
|
case (DISPLAY_MODE_HIDDEN): { true }; //Can always hide
|
|
|
|
case (DISPLAY_MODE_DIALOG): {
|
2018-09-17 19:03:28 +00:00
|
|
|
("ACE_microDAGR" in (ACE_player call EFUNC(common,uniqueItems))) && {[ACE_player, objNull, ["notOnMap", "isNotInside", "isNotSitting"]] call EFUNC(common,canInteractWith)}
|
2015-03-24 08:50:06 +00:00
|
|
|
};
|
2015-08-26 03:31:33 +00:00
|
|
|
case (DISPLAY_MODE_DISPLAY): {
|
2016-06-02 14:26:43 +00:00
|
|
|
//Can't have minimap up while zoomed in on foot, but allow drivers to use while in "Gunner" to handle non-3d vehicles like most tanks
|
|
|
|
((cameraView != "GUNNER") || {(vehicle ACE_player != ACE_player) && {driver vehicle ACE_player == ACE_player}}) &&
|
2018-09-17 19:03:28 +00:00
|
|
|
{"ACE_microDAGR" in (ACE_player call EFUNC(common,uniqueItems))} &&
|
2016-06-02 14:26:43 +00:00
|
|
|
{[ACE_player, objNull, ["notOnMap", "isNotInside", "isNotSitting"]] call EFUNC(common,canInteractWith)}
|
2015-03-24 08:50:06 +00:00
|
|
|
};
|
2015-08-26 03:31:33 +00:00
|
|
|
default { false };
|
2015-03-24 08:50:06 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
_returnValue
|