diff --git a/addons/arsenal/missions/Arsenal.VR/XEH_postInit.sqf b/addons/arsenal/missions/Arsenal.VR/XEH_postInit.sqf index a4d11842fe..84478b8fdd 100644 --- a/addons/arsenal/missions/Arsenal.VR/XEH_postInit.sqf +++ b/addons/arsenal/missions/Arsenal.VR/XEH_postInit.sqf @@ -1,4 +1,6 @@ #include "script_component.hpp" +#include "\z\ace\addons\arsenal\defines.hpp" +#include "\a3\ui_f\hpp\defineDIKCodes.inc" enableSaving [false, false]; cba_diagnostic_projectileMaxLines = 10; @@ -29,6 +31,35 @@ cba_diagnostic_projectileMaxLines = 10; _player call CBA_fnc_removeUnitTrackProjectiles; _player setFatigue 0; + + // Esc to close mission + { + private _display = findDisplay IDD_ace_arsenal; + + _display displayAddEventHandler ["KeyDown", { + params ["_display", "_key", "_shift"]; + + if (_key isEqualTo DIK_ESCAPE && {!_shift}) then { + [_display] spawn { + disableSerialization; + params ["_display"]; + + private _return = [ + localize "str_a3_rscdisplaymain_buttonexit", + localize "str_sure", + true, false, + _display, false, true + ] call BIS_fnc_GUImessage; + + if (_return) then { + _display closeDisplay 2; + findDisplay 46 closeDisplay 0; + }; + }; + true + }; + }]; + } call CBA_fnc_execNextFrame; }] call CBA_fnc_addEventHandler; [QGVAR(displayClosed), { diff --git a/addons/arsenal/missions/Arsenal.VR/fnc_onPause.sqf b/addons/arsenal/missions/Arsenal.VR/fnc_onPause.sqf index 06ef3b7fe8..25e49405bf 100644 --- a/addons/arsenal/missions/Arsenal.VR/fnc_onPause.sqf +++ b/addons/arsenal/missions/Arsenal.VR/fnc_onPause.sqf @@ -4,6 +4,8 @@ params ["_display"]; private _ctrlButtonAbort = _display displayCtrl 104; _ctrlButtonAbort ctrlSetText localize LSTRING(Mission); +_ctrlButtonAbort ctrlSetTooltip localize LSTRING(ReturnToArsenal); + _ctrlButtonAbort ctrlSetEventHandler ["ButtonClick", { params ["_control"]; ctrlParent _control closeDisplay 2; diff --git a/addons/arsenal/missions/Arsenal.VR/initPlayerLocal.sqf b/addons/arsenal/missions/Arsenal.VR/initPlayerLocal.sqf index 82afa46170..557a69b0a2 100644 --- a/addons/arsenal/missions/Arsenal.VR/initPlayerLocal.sqf +++ b/addons/arsenal/missions/Arsenal.VR/initPlayerLocal.sqf @@ -54,55 +54,54 @@ for "_i" from 0 to 1 do { _target setSpeedMode "LIMITED"; }; -/* //--- Armored vehicles -_vehicles = []; -if (isclass (configfile >> "cfgvehicles" >> "Land_VR_Target_MRAP_01_F")) then { - _step = 15; - _positionCenter = [position _unit select 0,(position _unit select 1) + 30,0]; +private _vehicles = []; + +private _step = 15; +_position = [position _unit select 0,(position _unit select 1) + 30,0]; + +{ + private _row = _forEachIndex; + private _rowCount = (count _x - 1) * 0.5; + { - _row = _foreachindex; - _rowCount = (count _x - 1) * 0.5; - { - _position = [ - (_positionCenter select 0) + (-_rowCount + _foreachindex) * _step, - (_positionCenter select 1) + _row * _step, - 0 - ]; - _veh = createvehicle [_x,_position,[],0,"none"]; - _veh setpos _position; - _veh setdir 180; - _veh setvelocity [0,0,-1]; - [_veh] call bis_fnc_VRHitpart; - _marker = _veh call bis_fnc_boundingboxmarker; - _marker setmarkercolor "colororange"; - _vehicles pushback _veh; - } foreach _x; - } foreach [ - [ - "Land_VR_Target_MRAP_01_F", - "Land_VR_Target_APC_Wheeled_01_F", - "Land_VR_Target_MBT_01_cannon_F" - ], - [ - "Land_VR_Target_MRAP_01_F", - "Land_VR_Target_APC_Wheeled_01_F", - "Land_VR_Target_MBT_01_cannon_F" - ] - ]; -}; + private _position = _position vectorAdd [(-_rowCount + _forEachIndex) * _step, _row * _step, 0]; + + private _vehicle = createVehicle [_x, _position, [], 0, "NONE"]; + _vehicle setPos _position; + _vehicle setDir 180; + _vehicle setVelocity [0,0,-1]; + _vehicle call BIS_fnc_VRHitpart; + + private _marker = _vehicle call BIS_fnc_boundingBoxMarker; + _marker setMarkerColor "ColorOrange"; + _vehicles pushBack _vehicle; + } forEach _x; +} forEach [[ + "Land_VR_Target_MRAP_01_F", + "Land_VR_Target_APC_Wheeled_01_F", + "Land_VR_Target_MBT_01_cannon_F" +], [ + "Land_VR_Target_MRAP_01_F", + "Land_VR_Target_APC_Wheeled_01_F", + "Land_VR_Target_MBT_01_cannon_F" +]]; + _vehicles spawn { waituntil { - _allDisabled = true; + private _allDisabled = true; + { - _hitalive = _x getvariable ["bis_fnc_VRHitParts_hitalive",[]]; - _allDisabled = _allDisabled && ({!_x} count _hitalive >= 2); + _hitAlive = _x getVariable ["bis_fnc_VRHitParts_hitalive", []]; + _allDisabled = _allDisabled && ({!_x} count _hitAlive >= 2); sleep 0.1; - } foreach _this; + } forEach _this; + _allDisabled }; - setstatvalue ["MarkMassVirtualDestruction",1]; -};*/ + + setStatValue ["MarkMassVirtualDestruction", 1]; +}; //--- Cover objects private _coverObjects = [ @@ -149,20 +148,22 @@ _unit addEventHandler ["AnimChanged", { ["#(argb,8,8,3)color(0,0,0,1)", false, nil, 0.1, [0,0.5]] spawn BIS_fnc_textTiles; //--- Target markers -/*[] spawn { - _targets = []; - { - _targets pushback vehiclevarname _x; - _var = vehiclevarname _x; - _marker = createmarker [_var,position _x]; - _marker setmarkertype "mil_dot"; - _marker setmarkercolor "colororange"; - } foreach (allmissionobjects "man") - [player]; - while {true} do { +private _markers = []; + +{ + private _marker = createMarker [vehicleVarName _x, position _x]; + _marker setMarkerType "mil_dot"; + _marker setMarkerColor "ColorOrange"; + + _markers pushBack _marker; +} forEach (allMissionObjects "CAManBase" - [_unit]); + +_markers spawn { + while {true} do { { - _t = missionnamespace getvariable _x; - (vehiclevarname _t) setmarkerpos position _t; - } foreach _targets; + private _target = missionNamespace getVariable _x; + _x setMarkerPos position _target; + } forEach _this; sleep 0.1; }; }; diff --git a/addons/arsenal/stringtable.xml b/addons/arsenal/stringtable.xml index 69468a66c7..8d035d0af6 100644 --- a/addons/arsenal/stringtable.xml +++ b/addons/arsenal/stringtable.xml @@ -434,16 +434,18 @@ ACE 武器庫を開けません - ACE Virtual Arsenal - ACE Virtuelles Arsenal + ACE Arsenal + ACE-Arsenal + + + Return to ACE Arsenal. + Zurück zum ACE-Arsenal. - View and try out different weapons, equipment and vehicles. - Sieh dir verschiedene Waffen, Ausrüstung und Fahrzeuge an und probiere sie aus. + Not as bad as the regular one. - View and try out different weapons, equipment and vehicles. - Sieh dir verschiedene Waffen, Ausrüstung und Fahrzeuge an und probiere sie aus. + Dress up simulator loading in progress...