mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Removed semi-colons from return statements, command capitalization
This commit is contained in:
parent
bbc715b2ee
commit
7b89784aae
@ -29,4 +29,4 @@ if (_nearestVehicle isKindOf "Cargo_Base_F" || isNull _nearestVehicle) then {
|
|||||||
|
|
||||||
if (isNull _nearestVehicle) exitWith {false};
|
if (isNull _nearestVehicle) exitWith {false};
|
||||||
|
|
||||||
[_object, _nearestVehicle] call FUNC(canLoadItemIn);
|
[_object, _nearestVehicle] call FUNC(canLoadItemIn)
|
||||||
|
@ -22,4 +22,8 @@ if (speed _vehicle > 1 || (((getPos _vehicle) select 2) > 3)) exitWith {false};
|
|||||||
|
|
||||||
private "_itemSize";
|
private "_itemSize";
|
||||||
_itemSize = ([_item] call FUNC(getSizeItem));
|
_itemSize = ([_item] call FUNC(getSizeItem));
|
||||||
_itemSize > 0 && {alive _item && alive _vehicle} && {(_item distance _vehicle <= MAX_LOAD_DISTANCE)} && {_itemSize <= ([_vehicle] call FUNC(getCargoSpaceLeft))};
|
|
||||||
|
(_itemSize > 0) &&
|
||||||
|
{alive _item && alive _vehicle} &&
|
||||||
|
{(_item distance _vehicle <= MAX_LOAD_DISTANCE)} &&
|
||||||
|
{_itemSize <= ([_vehicle] call FUNC(getCargoSpaceLeft))}
|
||||||
|
@ -40,4 +40,5 @@ if (_vehicle isKindOf "Ship" ) then {
|
|||||||
};
|
};
|
||||||
|
|
||||||
if (!_validVehiclestate) exitWith {false};
|
if (!_validVehiclestate) exitWith {false};
|
||||||
(count _emptyPos != 0);
|
|
||||||
|
(count _emptyPos != 0)
|
||||||
|
@ -34,4 +34,4 @@ if (_unit distance _loadShip <= MAX_LOAD_DISTANCE) exitWith {_loadShip};
|
|||||||
_loadContainer = nearestObject [_unit,"Cargo_base_F"];
|
_loadContainer = nearestObject [_unit,"Cargo_base_F"];
|
||||||
if (_unit distance _loadContainer <= MAX_LOAD_DISTANCE) exitWith {_loadContainer};
|
if (_unit distance _loadContainer <= MAX_LOAD_DISTANCE) exitWith {_loadContainer};
|
||||||
|
|
||||||
objNull;
|
objNull
|
||||||
|
@ -17,4 +17,4 @@
|
|||||||
|
|
||||||
params ["_object"];
|
params ["_object"];
|
||||||
|
|
||||||
_object getVariable [QGVAR(space), getNumber (configFile >> "CfgVehicles" >> typeof _object >> QGVAR(space))];
|
_object getVariable [QGVAR(space), getNumber (configFile >> "CfgVehicles" >> typeof _object >> QGVAR(space))]
|
||||||
|
@ -22,7 +22,7 @@ params ["_item"];
|
|||||||
_config = (configFile >> "CfgVehicles" >> typeof _item >> QGVAR(size));
|
_config = (configFile >> "CfgVehicles" >> typeof _item >> QGVAR(size));
|
||||||
|
|
||||||
if (isNumber (_config)) exitWith {
|
if (isNumber (_config)) exitWith {
|
||||||
_item getVariable [QGVAR(size), getNumber (_config)];
|
_item getVariable [QGVAR(size), getNumber (_config)]
|
||||||
};
|
};
|
||||||
|
|
||||||
-1
|
-1
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
* 1: Vehicle <OBJECT>
|
* 1: Vehicle <OBJECT>
|
||||||
*
|
*
|
||||||
* Return value:
|
* Return value:
|
||||||
* None
|
* Object loaded <BOOL>
|
||||||
*
|
*
|
||||||
* Example:
|
* Example:
|
||||||
* [object, vehicle] call ace_cargo_fnc_loadItem
|
* [object, vehicle] call ace_cargo_fnc_loadItem
|
||||||
@ -34,4 +34,4 @@ detach _item;
|
|||||||
_item attachTo [_vehicle,[0,0,100]];
|
_item attachTo [_vehicle,[0,0,100]];
|
||||||
["cargo_hideItem", [_item, true]] call EFUNC(common,serverEvent);
|
["cargo_hideItem", [_item, true]] call EFUNC(common,serverEvent);
|
||||||
|
|
||||||
true;
|
true
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
* 0: Object <OBJECT>
|
* 0: Object <OBJECT>
|
||||||
*
|
*
|
||||||
* Return value:
|
* Return value:
|
||||||
* None
|
* Object loaded <BOOL>
|
||||||
*
|
*
|
||||||
* Example:
|
* Example:
|
||||||
* [object] call ace_cargo_fnc_starLoadIn
|
* [object] call ace_cargo_fnc_starLoadIn
|
||||||
@ -27,4 +27,5 @@ if (isNull _nearestVehicle || _nearestVehicle isKindOf "Cargo_Base_F") then {
|
|||||||
};
|
};
|
||||||
|
|
||||||
if (isNull _nearestVehicle) exitWith {false};
|
if (isNull _nearestVehicle) exitWith {false};
|
||||||
[_object, _nearestVehicle] call FUNC(loadItem);
|
|
||||||
|
[_object, _nearestVehicle] call FUNC(loadItem)
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
* 1: Vehicle <OBJECT>
|
* 1: Vehicle <OBJECT>
|
||||||
*
|
*
|
||||||
* Return value:
|
* Return value:
|
||||||
* None
|
* Object unloaded <BOOL>
|
||||||
*
|
*
|
||||||
* Example:
|
* Example:
|
||||||
* [object, vehicle] call ace_cargo_fnc_unloadItem
|
* [object, vehicle] call ace_cargo_fnc_unloadItem
|
||||||
@ -44,9 +44,9 @@ if (_vehicle isKindOf "Ship" ) then {
|
|||||||
};
|
};
|
||||||
|
|
||||||
TRACE_1("getPosASL Vehicle Check", getPosASL _vehicle);
|
TRACE_1("getPosASL Vehicle Check", getPosASL _vehicle);
|
||||||
if (!_validVehiclestate) exitWith { false };
|
if (!_validVehiclestate) exitWith {false};
|
||||||
|
|
||||||
if (count _emptyPos == 0) exitWith { false }; //consider displaying text saying there are no safe places to exit the vehicle
|
if (count _emptyPos == 0) exitWith {false}; //consider displaying text saying there are no safe places to exit the vehicle
|
||||||
|
|
||||||
_loaded = _vehicle getVariable [QGVAR(loaded), []];
|
_loaded = _vehicle getVariable [QGVAR(loaded), []];
|
||||||
_loaded = _loaded - [_item];
|
_loaded = _loaded - [_item];
|
||||||
@ -62,4 +62,4 @@ _item setPosASL (_emptyPos call EFUNC(common,PositiontoASL));
|
|||||||
|
|
||||||
// TOOO maybe drag/carry the unloaded item?
|
// TOOO maybe drag/carry the unloaded item?
|
||||||
|
|
||||||
true;
|
true
|
||||||
|
Loading…
Reference in New Issue
Block a user