ACE3/addons/rangecard/functions/fnc_openRangeCard.sqf

37 lines
934 B
Plaintext
Raw Normal View History

#include "script_component.hpp"
/*
* Authors: Ruthberg
* Opens the range card dialog
*
* Arguments:
* Open copy? <BOOLEAN>
*
* Return Value:
* None
*
* Example:
* [true] call ace_rangecard_fnc_openRangeCard
*
* Public: No
*/
if (GVAR(RangeCardOpened)) exitWith {};
if (_this) then {
if (GVAR(ammoClassCopy) != "" && GVAR(magazineClassCopy) != "" && GVAR(weaponClassCopy) != "") then {
GVAR(RangeCardOpened) = true;
2016-05-03 00:32:44 +00:00
createDialog "ACE_RangeCard_Dialog";
2016-05-03 00:32:44 +00:00
[GVAR(zeroRangeCopy), GVAR(boreHeightCopy), GVAR(ammoClassCopy), GVAR(magazineClassCopy), GVAR(weaponClassCopy)] call FUNC(updateRangeCard);
};
} else {
if (ACE_player call FUNC(updateClassNames)) then {
GVAR(RangeCardOpened) = true;
2016-05-03 00:32:44 +00:00
createDialog "ACE_RangeCard_Dialog";
2016-05-03 00:32:44 +00:00
[GVAR(zeroRange), GVAR(boreHeight), GVAR(ammoClass), GVAR(magazineClass), GVAR(weaponClass)] call FUNC(updateRangeCard);
};
};