mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
fixed idention and code style
This commit is contained in:
parent
a34490aca8
commit
ffbc5ca07d
@ -22,11 +22,11 @@ _result = -1;
|
|||||||
_gunbag = backpackContainer _target;
|
_gunbag = backpackContainer _target;
|
||||||
|
|
||||||
if(count (_gunbag getVariable [QGVAR(GunbagWeapon),[]]) <= 0 && {primaryWeapon _unit != ""} && {getNumber (configFile >> "CfgWeapons" >> primaryWeapon _unit >> QGVAR(allowGunbag)) == 1}) then {
|
if(count (_gunbag getVariable [QGVAR(GunbagWeapon),[]]) <= 0 && {primaryWeapon _unit != ""} && {getNumber (configFile >> "CfgWeapons" >> primaryWeapon _unit >> QGVAR(allowGunbag)) == 1}) then {
|
||||||
_result = 0;
|
_result = 0;
|
||||||
};
|
};
|
||||||
|
|
||||||
if(count (_gunbag getVariable [QGVAR(GunbagWeapon),[]]) >= 1 && {primaryWeapon _unit == ""}) then {
|
if(count (_gunbag getVariable [QGVAR(GunbagWeapon),[]]) >= 1 && {primaryWeapon _unit == ""}) then {
|
||||||
_result = 1;
|
_result = 1;
|
||||||
};
|
};
|
||||||
|
|
||||||
_result
|
_result
|
||||||
|
@ -27,7 +27,7 @@ _state = _gunbag getVariable [QGVAR(GunbagWeapon),[]];
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
if (count _state <= 0) exitWith {
|
if (count _state <= 0) exitWith {
|
||||||
[localize LSTRING(empty)] call EFUNC(common,displayTextStructured);
|
[localize LSTRING(empty)] call EFUNC(common,displayTextStructured);
|
||||||
};
|
};
|
||||||
|
|
||||||
_weapon = (_state select 0) select 0;
|
_weapon = (_state select 0) select 0;
|
||||||
@ -36,7 +36,7 @@ _items = (_state select 1);
|
|||||||
_unit addWeapon _weapon;
|
_unit addWeapon _weapon;
|
||||||
|
|
||||||
{
|
{
|
||||||
_unit addWeaponItem [_weapon, _x];
|
_unit addWeaponItem [_weapon, _x];
|
||||||
} forEach _items;
|
} forEach _items;
|
||||||
|
|
||||||
([_target] call FUNC(switchBackpack)) setVariable [QGVAR(GunbagWeapon), [], true];
|
([_target] call FUNC(switchBackpack)) setVariable [QGVAR(GunbagWeapon), [], true];
|
||||||
|
@ -18,9 +18,9 @@ params ["_unit"];
|
|||||||
private _state = (backpackContainer _unit) getVariable [QGVAR(GunbagWeapon),[]];
|
private _state = (backpackContainer _unit) getVariable [QGVAR(GunbagWeapon),[]];
|
||||||
|
|
||||||
if (count _state <= 0) then {
|
if (count _state <= 0) then {
|
||||||
[localize LSTRING(empty)] call EFUNC(common,displayTextStructured);
|
[localize LSTRING(empty)] call EFUNC(common,displayTextStructured);
|
||||||
} else {
|
} else {
|
||||||
private _weapon = (_state select 0) select 0;
|
private _weapon = (_state select 0) select 0;
|
||||||
[getText (configFile >> "CfgWeapons" >> _weapon >> "displayname"),
|
[getText (configFile >> "CfgWeapons" >> _weapon >> "displayname"),
|
||||||
getText (configFile >> "CfgWeapons" >> _weapon >> "picture")] call EFUNC(common,displayTextPicture);
|
getText (configFile >> "CfgWeapons" >> _weapon >> "picture")] call EFUNC(common,displayTextPicture);
|
||||||
};
|
};
|
||||||
|
@ -26,11 +26,11 @@ removeBackpack _unit;
|
|||||||
_unit addBackpack _altgunbag;
|
_unit addBackpack _altgunbag;
|
||||||
|
|
||||||
{
|
{
|
||||||
_unit addItemToBackpack _x;
|
_unit addItemToBackpack _x;
|
||||||
} forEach _items;
|
} forEach _items;
|
||||||
|
|
||||||
if ([QUOTE(ACE_Backpacks)] call EFUNC(common,isModLoaded)) then {
|
if ([QUOTE(ACE_Backpacks)] call EFUNC(common,isModLoaded)) then {
|
||||||
[_unit, backpackContainer _unit] call EFUNC(backpacks,backpackOpened);
|
[_unit, backpackContainer _unit] call EFUNC(backpacks,backpackOpened);
|
||||||
};
|
};
|
||||||
|
|
||||||
(backpackContainer _unit)
|
(backpackContainer _unit)
|
||||||
|
Loading…
Reference in New Issue
Block a user