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