2015-01-23 22:40:39 +00:00
|
|
|
/*
|
2015-03-15 16:27:21 +00:00
|
|
|
* Author: PabstMirror
|
|
|
|
* Returns the side specifc key for a vehicle
|
|
|
|
*
|
|
|
|
* Arguments:
|
|
|
|
* 0: Vehicle <OBJECT>
|
|
|
|
*
|
|
|
|
* Return Value:
|
|
|
|
* The vehicle's side key classname <STRING>
|
|
|
|
*
|
|
|
|
* Example:
|
|
|
|
* [tank1] call ACE_VehicleLock_fnc_getVehicleSideKey;
|
|
|
|
*
|
|
|
|
* Public: No
|
|
|
|
*/
|
2015-01-23 22:40:39 +00:00
|
|
|
#include "script_component.hpp"
|
|
|
|
|
2015-03-15 16:27:21 +00:00
|
|
|
private ["_vehConfigSide","_vehSide","_returnValue"];
|
|
|
|
|
2015-08-04 03:11:45 +00:00
|
|
|
params ["_veh"];
|
2015-08-07 18:24:47 +00:00
|
|
|
TRACE_1("params",_veh);
|
2015-01-23 22:40:39 +00:00
|
|
|
|
2015-03-15 16:27:21 +00:00
|
|
|
if (isNull _veh) exitWith {ERROR("null vehicle"); "error"};
|
2015-01-23 22:40:39 +00:00
|
|
|
|
|
|
|
_vehConfigSide = [_veh, true] call BIS_fnc_objectSide;
|
2015-01-24 18:58:01 +00:00
|
|
|
_vehSide = _veh getVariable [QGVAR(lockSide), _vehConfigSide];
|
2015-01-23 22:40:39 +00:00
|
|
|
|
|
|
|
_returnValue = "";
|
|
|
|
|
|
|
|
switch (_vehSide) do {
|
|
|
|
case (west): {_returnValue = "ACE_key_west"};
|
|
|
|
case (east): {_returnValue = "ACE_key_east"};
|
|
|
|
case (resistance): {_returnValue = "ACE_key_indp"};
|
2015-03-15 16:27:21 +00:00
|
|
|
default {_returnValue = "ACE_key_civ"};
|
2015-01-23 22:40:39 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
_returnValue
|