mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
final code conversions, esc to exit
This commit is contained in:
parent
e3c94821a2
commit
96f3791855
@ -1,4 +1,6 @@
|
|||||||
#include "script_component.hpp"
|
#include "script_component.hpp"
|
||||||
|
#include "\z\ace\addons\arsenal\defines.hpp"
|
||||||
|
#include "\a3\ui_f\hpp\defineDIKCodes.inc"
|
||||||
|
|
||||||
enableSaving [false, false];
|
enableSaving [false, false];
|
||||||
cba_diagnostic_projectileMaxLines = 10;
|
cba_diagnostic_projectileMaxLines = 10;
|
||||||
@ -29,6 +31,35 @@ cba_diagnostic_projectileMaxLines = 10;
|
|||||||
|
|
||||||
_player call CBA_fnc_removeUnitTrackProjectiles;
|
_player call CBA_fnc_removeUnitTrackProjectiles;
|
||||||
_player setFatigue 0;
|
_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;
|
}] call CBA_fnc_addEventHandler;
|
||||||
|
|
||||||
[QGVAR(displayClosed), {
|
[QGVAR(displayClosed), {
|
||||||
|
@ -4,6 +4,8 @@ params ["_display"];
|
|||||||
|
|
||||||
private _ctrlButtonAbort = _display displayCtrl 104;
|
private _ctrlButtonAbort = _display displayCtrl 104;
|
||||||
_ctrlButtonAbort ctrlSetText localize LSTRING(Mission);
|
_ctrlButtonAbort ctrlSetText localize LSTRING(Mission);
|
||||||
|
_ctrlButtonAbort ctrlSetTooltip localize LSTRING(ReturnToArsenal);
|
||||||
|
|
||||||
_ctrlButtonAbort ctrlSetEventHandler ["ButtonClick", {
|
_ctrlButtonAbort ctrlSetEventHandler ["ButtonClick", {
|
||||||
params ["_control"];
|
params ["_control"];
|
||||||
ctrlParent _control closeDisplay 2;
|
ctrlParent _control closeDisplay 2;
|
||||||
|
@ -54,55 +54,54 @@ for "_i" from 0 to 1 do {
|
|||||||
_target setSpeedMode "LIMITED";
|
_target setSpeedMode "LIMITED";
|
||||||
};
|
};
|
||||||
|
|
||||||
/*
|
|
||||||
//--- Armored vehicles
|
//--- Armored vehicles
|
||||||
_vehicles = [];
|
private _vehicles = [];
|
||||||
if (isclass (configfile >> "cfgvehicles" >> "Land_VR_Target_MRAP_01_F")) then {
|
|
||||||
_step = 15;
|
private _step = 15;
|
||||||
_positionCenter = [position _unit select 0,(position _unit select 1) + 30,0];
|
_position = [position _unit select 0,(position _unit select 1) + 30,0];
|
||||||
|
|
||||||
|
{
|
||||||
|
private _row = _forEachIndex;
|
||||||
|
private _rowCount = (count _x - 1) * 0.5;
|
||||||
|
|
||||||
{
|
{
|
||||||
_row = _foreachindex;
|
private _position = _position vectorAdd [(-_rowCount + _forEachIndex) * _step, _row * _step, 0];
|
||||||
_rowCount = (count _x - 1) * 0.5;
|
|
||||||
{
|
private _vehicle = createVehicle [_x, _position, [], 0, "NONE"];
|
||||||
_position = [
|
_vehicle setPos _position;
|
||||||
(_positionCenter select 0) + (-_rowCount + _foreachindex) * _step,
|
_vehicle setDir 180;
|
||||||
(_positionCenter select 1) + _row * _step,
|
_vehicle setVelocity [0,0,-1];
|
||||||
0
|
_vehicle call BIS_fnc_VRHitpart;
|
||||||
];
|
|
||||||
_veh = createvehicle [_x,_position,[],0,"none"];
|
private _marker = _vehicle call BIS_fnc_boundingBoxMarker;
|
||||||
_veh setpos _position;
|
_marker setMarkerColor "ColorOrange";
|
||||||
_veh setdir 180;
|
_vehicles pushBack _vehicle;
|
||||||
_veh setvelocity [0,0,-1];
|
} forEach _x;
|
||||||
[_veh] call bis_fnc_VRHitpart;
|
} forEach [[
|
||||||
_marker = _veh call bis_fnc_boundingboxmarker;
|
"Land_VR_Target_MRAP_01_F",
|
||||||
_marker setmarkercolor "colororange";
|
"Land_VR_Target_APC_Wheeled_01_F",
|
||||||
_vehicles pushback _veh;
|
"Land_VR_Target_MBT_01_cannon_F"
|
||||||
} foreach _x;
|
], [
|
||||||
} foreach [
|
"Land_VR_Target_MRAP_01_F",
|
||||||
[
|
"Land_VR_Target_APC_Wheeled_01_F",
|
||||||
"Land_VR_Target_MRAP_01_F",
|
"Land_VR_Target_MBT_01_cannon_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 {
|
_vehicles spawn {
|
||||||
waituntil {
|
waituntil {
|
||||||
_allDisabled = true;
|
private _allDisabled = true;
|
||||||
|
|
||||||
{
|
{
|
||||||
_hitalive = _x getvariable ["bis_fnc_VRHitParts_hitalive",[]];
|
_hitAlive = _x getVariable ["bis_fnc_VRHitParts_hitalive", []];
|
||||||
_allDisabled = _allDisabled && ({!_x} count _hitalive >= 2);
|
_allDisabled = _allDisabled && ({!_x} count _hitAlive >= 2);
|
||||||
sleep 0.1;
|
sleep 0.1;
|
||||||
} foreach _this;
|
} forEach _this;
|
||||||
|
|
||||||
_allDisabled
|
_allDisabled
|
||||||
};
|
};
|
||||||
setstatvalue ["MarkMassVirtualDestruction",1];
|
|
||||||
};*/
|
setStatValue ["MarkMassVirtualDestruction", 1];
|
||||||
|
};
|
||||||
|
|
||||||
//--- Cover objects
|
//--- Cover objects
|
||||||
private _coverObjects = [
|
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;
|
["#(argb,8,8,3)color(0,0,0,1)", false, nil, 0.1, [0,0.5]] spawn BIS_fnc_textTiles;
|
||||||
|
|
||||||
//--- Target markers
|
//--- Target markers
|
||||||
/*[] spawn {
|
private _markers = [];
|
||||||
_targets = [];
|
|
||||||
{
|
{
|
||||||
_targets pushback vehiclevarname _x;
|
private _marker = createMarker [vehicleVarName _x, position _x];
|
||||||
_var = vehiclevarname _x;
|
_marker setMarkerType "mil_dot";
|
||||||
_marker = createmarker [_var,position _x];
|
_marker setMarkerColor "ColorOrange";
|
||||||
_marker setmarkertype "mil_dot";
|
|
||||||
_marker setmarkercolor "colororange";
|
_markers pushBack _marker;
|
||||||
} foreach (allmissionobjects "man") - [player];
|
} forEach (allMissionObjects "CAManBase" - [_unit]);
|
||||||
while {true} do {
|
|
||||||
|
_markers spawn {
|
||||||
|
while {true} do {
|
||||||
{
|
{
|
||||||
_t = missionnamespace getvariable _x;
|
private _target = missionNamespace getVariable _x;
|
||||||
(vehiclevarname _t) setmarkerpos position _t;
|
_x setMarkerPos position _target;
|
||||||
} foreach _targets;
|
} forEach _this;
|
||||||
sleep 0.1;
|
sleep 0.1;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
@ -434,16 +434,18 @@
|
|||||||
<Japanese>ACE 武器庫を開けません</Japanese>
|
<Japanese>ACE 武器庫を開けません</Japanese>
|
||||||
</Key>
|
</Key>
|
||||||
<Key ID="STR_ACE_Arsenal_Mission">
|
<Key ID="STR_ACE_Arsenal_Mission">
|
||||||
<English>ACE Virtual Arsenal</English>
|
<English>ACE Arsenal</English>
|
||||||
<German>ACE Virtuelles Arsenal</German>
|
<German>ACE-Arsenal</German>
|
||||||
|
</Key>
|
||||||
|
<Key ID="STR_ACE_Arsenal_ReturnToArsenal">
|
||||||
|
<English>Return to ACE Arsenal.</English>
|
||||||
|
<German>Zurück zum ACE-Arsenal.</German>
|
||||||
</Key>
|
</Key>
|
||||||
<Key ID="STR_ACE_Arsenal_Mission_tooltip">
|
<Key ID="STR_ACE_Arsenal_Mission_tooltip">
|
||||||
<English>View and try out different weapons, equipment and vehicles.</English>
|
<English>Not as bad as the regular one.</English>
|
||||||
<German>Sieh dir verschiedene Waffen, Ausrüstung und Fahrzeuge an und probiere sie aus.</German>
|
|
||||||
</Key>
|
</Key>
|
||||||
<Key ID="STR_ACE_Arsenal_Mission_overview">
|
<Key ID="STR_ACE_Arsenal_Mission_overview">
|
||||||
<English>View and try out different weapons, equipment and vehicles.</English>
|
<English>Dress up simulator loading in progress...</English>
|
||||||
<German>Sieh dir verschiedene Waffen, Ausrüstung und Fahrzeuge an und probiere sie aus.</German>
|
|
||||||
</Key>
|
</Key>
|
||||||
</Package>
|
</Package>
|
||||||
</Project>
|
</Project>
|
||||||
|
Loading…
Reference in New Issue
Block a user