Add editing vehicle crew loadout support for arsenal

This commit is contained in:
Josuan Albin
2017-11-05 13:33:07 +01:00
parent 212d3aff16
commit 38a3502f5f
4 changed files with 30 additions and 5 deletions

View File

@ -11,6 +11,12 @@ deleteVehicle GVAR(cameraHelper);
if (is3DEN) then {
private _centerOriginParent = objectParent GVAR(centerOrigin);
if !(isNull _centerOriginParent) then {
_centerOriginParent hideObject false;
};
GVAR(centerOrigin) hideObject false;
// Apply the loadout from the dummy to all selected units

View File

@ -281,6 +281,12 @@ if (is3DEN) then {
GVAR(centerOrigin) = GVAR(center);
GVAR(centerOrigin) hideObject true;
private _centerOriginParent = objectParent GVAR(centerOrigin);
if !(isNull _centerOriginParent) then {
_centerOriginParent hideObject true;
};
private _centerPos = position GVAR(centerOrigin);
GVAR(center) = createAgent [typeOf GVAR(centerOrigin), position GVAR(centerOrigin), [], 0, "none"];

View File

@ -1,3 +1,16 @@
/*
* Author: Alganthe
* Replace the 3DEN "edit loadout" menu action
*
* Arguments:
* None
*
* Return Value:
* None
*
*
* Public: No
*/
#include "script_component.hpp"
private _entity = (uinamespace getvariable ["bis_fnc_3DENEntityMenu_data",[]]) param [1, objnull];

View File

@ -20,11 +20,11 @@
params [["_object", objNull, [objNull]], ["_center", objNull, [objNull]], ["_mode", false, [false]]];
if (
isNull _object ||
{isNull _center} ||
{!(_center isKindOf "Man")} ||
{!(isNull objectParent _center)}
) exitWith {};
isNull _object ||
{isNull _center} ||
{!(_center isKindOf "Man")} ||
{!(isNull objectParent _center) && {!is3DEN}}
) exitWith {};
if (isNil {_object getVariable [QGVAR(virtualItems), nil]} && {!_mode}) exitWith {
[localize LSTRING(noVirtualItems), false, 5, 1] call EFUNC(common,displayText);