2015-02-03 03:43:23 +00:00
|
|
|
/*
|
2015-03-24 04:18:00 +00:00
|
|
|
* Author: esteldunedain
|
2015-02-03 03:43:23 +00:00
|
|
|
* Returns the metadata of a setting if it exists
|
|
|
|
*
|
|
|
|
* Arguments:
|
2015-09-21 11:08:10 +00:00
|
|
|
* 0: Setting Name <STRING>
|
2015-02-03 03:43:23 +00:00
|
|
|
*
|
|
|
|
* Return Value:
|
|
|
|
* Setting Data (Array)
|
2015-09-21 11:08:10 +00:00
|
|
|
* 0: Name <STRING>
|
|
|
|
* 1: Type Name <STRING>
|
|
|
|
* 2: Is Client Settable <BOOL>
|
|
|
|
* 3: Localized Name <STRING>
|
|
|
|
* 4: Localized Description <STRING>
|
|
|
|
* 5: Possible Values <ARRAY>
|
|
|
|
* 6: Is Forced <BOOL>
|
|
|
|
* 7: Default Value <ANY>
|
|
|
|
* 8: Localized Category <STRING>
|
2015-02-03 03:43:23 +00:00
|
|
|
*
|
|
|
|
* Public: No
|
|
|
|
*/
|
|
|
|
#include "script_component.hpp"
|
|
|
|
|
2015-09-21 11:08:10 +00:00
|
|
|
params ["_name"];
|
2015-02-03 03:43:23 +00:00
|
|
|
|
2015-09-21 11:08:10 +00:00
|
|
|
private "_value";
|
2015-02-03 05:37:13 +00:00
|
|
|
_value = [];
|
2015-09-21 11:08:10 +00:00
|
|
|
|
2015-02-03 03:43:23 +00:00
|
|
|
{
|
2015-09-21 11:08:10 +00:00
|
|
|
if (_x select 0 == _name) exitWith {_value = _x};
|
|
|
|
false
|
|
|
|
} count GVAR(settings);
|
2015-02-03 03:43:23 +00:00
|
|
|
|
|
|
|
_value
|