ACE3/addons/rangecard/functions/fnc_openRangeCard.sqf
Phyma ffaa195fe5 Conform function headers to coding guidelines (#5255)
* Fixed headers to work with silentspike python script

* Fixed rest of the files

* Fixed ace-team
2017-06-08 15:31:51 +02:00

37 lines
934 B
Plaintext

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