2015-12-07 16:24:52 +00:00
|
|
|
/*
|
|
|
|
Author: Aaron Clark - EpochMod.com
|
|
|
|
|
|
|
|
Contributors:
|
|
|
|
|
|
|
|
Description:
|
|
|
|
Returns the picture variable of a Vehicle, Weapon, or Magazine.
|
|
|
|
|
|
|
|
Licence:
|
|
|
|
Arma Public License Share Alike (APL-SA) - https://www.bistudio.com/community/licenses/arma-public-license-share-alike
|
|
|
|
|
|
|
|
Github:
|
2016-06-13 16:54:19 +00:00
|
|
|
https://github.com/EpochModTeam/Epoch/tree/release/Sources/epoch_code/compile/functions/EPOCH_itemPicture.sqf
|
2015-12-07 16:24:52 +00:00
|
|
|
|
|
|
|
Example:
|
2016-09-01 00:29:08 +00:00
|
|
|
_part call EPOCH_itemPicture;
|
2015-12-07 16:24:52 +00:00
|
|
|
|
|
|
|
Parameter(s):
|
|
|
|
_this: STRING - Vehicle, Weapon, or Magazine config class name
|
|
|
|
|
|
|
|
Returns:
|
|
|
|
STRING
|
|
|
|
*/
|
2016-09-01 00:29:08 +00:00
|
|
|
//[[[cog import generate_private_arrays ]]]
|
2016-04-08 20:21:46 +00:00
|
|
|
private ["_return"];
|
2016-09-01 00:29:08 +00:00
|
|
|
//[[[end]]]
|
2016-04-08 20:21:46 +00:00
|
|
|
params ["_item"];
|
2015-09-14 20:55:36 +00:00
|
|
|
_return = "";
|
|
|
|
if ([_item, "CfgVehicles"] call EPOCH_fnc_isAny) then {
|
|
|
|
_return = getText(configfile >> "CfgVehicles" >> _item >> "picture");
|
|
|
|
} else {
|
|
|
|
if ([_item, "CfgWeapons"] call EPOCH_fnc_isAny) then {
|
|
|
|
_return = getText(configfile >> "CfgWeapons" >> _item >> "picture");
|
|
|
|
} else {
|
|
|
|
if ([_item, "CfgMagazines"] call EPOCH_fnc_isAny) then {
|
|
|
|
_return = getText(configfile >> "CfgMagazines" >> _item >> "picture");
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
_return
|