mirror of
https://github.com/IT07/a3_vemf_reloaded.git
synced 2024-08-30 16:52:11 +00:00
53 lines
1.1 KiB
Plaintext
53 lines
1.1 KiB
Plaintext
/*
|
|
Author: IT07
|
|
|
|
Description: checks the side of given unit and returns it
|
|
|
|
Params:
|
|
_this: STRING - unit classname
|
|
|
|
Returns: SIDE - unit's side
|
|
*/
|
|
|
|
private ["_return"];
|
|
if (_this isEqualType "") then
|
|
{
|
|
private ["_faction"];
|
|
_faction = getText (configFile >> "CfgVehicles" >> _this >> "faction");
|
|
if not(_faction isEqualTo "") then
|
|
{
|
|
scopeName "isNull";
|
|
if (_faction isEqualTo "BLU_G_F") then
|
|
{
|
|
_return = WEST;
|
|
breakOut "isNull";
|
|
};
|
|
if (_faction isEqualTo "CIV_F") then
|
|
{
|
|
_return = civilian;
|
|
breakOut "isNull";
|
|
};
|
|
if (_faction isEqualTo "IND_F") then
|
|
{
|
|
_return = independent;
|
|
breakOut "isNull";
|
|
};
|
|
if (_faction isEqualTo "IND_G_F") then
|
|
{
|
|
_return = resistance;
|
|
breakOut "isNull";
|
|
};
|
|
if (_faction isEqualTo "OPF_G_F") then
|
|
{
|
|
_return = EAST;
|
|
};
|
|
} else
|
|
{
|
|
["fn_checkSide", 0, format["Failed to find faction of %1", _this]] spawn VEMFr_fnc_log;
|
|
};
|
|
if not isNil"_return" then
|
|
{
|
|
_return
|
|
};
|
|
};
|