2015-09-20 13:52:40 +00:00
|
|
|
/*
|
|
|
|
* Author: Glowbal
|
|
|
|
* Use magazine
|
2015-01-16 23:21:47 +00:00
|
|
|
*
|
2015-09-20 13:52:40 +00:00
|
|
|
* Arguments:
|
|
|
|
* 0: unit <OBJECT>
|
|
|
|
* 1: magazine <STRING>
|
|
|
|
*
|
|
|
|
* Return Value:
|
|
|
|
* if magazine has been used. <BOOL>
|
|
|
|
*
|
|
|
|
* Public: Yes
|
2015-01-16 23:21:47 +00:00
|
|
|
*/
|
|
|
|
#include "script_component.hpp"
|
|
|
|
|
2015-09-20 13:52:40 +00:00
|
|
|
params ["_unit", "_magazine", ["_vehicleUsage", false]];
|
2015-01-16 23:21:47 +00:00
|
|
|
|
2015-09-20 13:52:40 +00:00
|
|
|
private "_return";
|
|
|
|
_return = false;
|
|
|
|
|
|
|
|
if !(_vehicleUsage) then {
|
2015-01-18 19:09:19 +00:00
|
|
|
if (_magazine != "") then {
|
|
|
|
_unit removeMagazine _magazine;
|
|
|
|
_return = true;
|
|
|
|
};
|
2015-09-20 13:52:40 +00:00
|
|
|
|
|
|
|
[format ["fnc_useMagazine: %1 | %2", _this, _return]] call FUNC(debug);
|
|
|
|
//} else {
|
|
|
|
// @todo implement shared magazine functionality
|
|
|
|
};
|
|
|
|
|
2015-01-16 23:21:47 +00:00
|
|
|
_return
|