mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Clarify repair while engine is running
#3348 - Show action, but exit and show warning when selected - Optional (default off) setting to auto shut off engine to keep compatibility with missions
This commit is contained in:
parent
fa2b6dac2d
commit
4f6b11c2a6
@ -146,6 +146,7 @@ if (isServer) then {
|
||||
|
||||
["setDir", {(_this select 0) setDir (_this select 1)}] call FUNC(addEventhandler);
|
||||
["setFuel", {(_this select 0) setFuel (_this select 1)}] call FUNC(addEventhandler);
|
||||
["engineOn", {(_this select 0) engineOn (_this select 1)}] call FUNC(addEventhandler);
|
||||
["setSpeaker", {(_this select 0) setSpeaker (_this select 1)}] call FUNC(addEventhandler);
|
||||
["selectLeader", {(_this select 0) selectLeader (_this select 1)}] call FUNC(addEventHandler);
|
||||
["setVelocity", {(_this select 0) setVelocity (_this select 1)}] call FUNC(addEventHandler);
|
||||
|
@ -77,4 +77,9 @@ class ACE_Settings {
|
||||
values[] = {"None", "ToolKit"};
|
||||
_values[] = {{}, {"ToolKit"}};
|
||||
};
|
||||
class GVAR(autoShutOffEngineWhenStartingRepair) {
|
||||
typeName = "BOOL";
|
||||
value = 1;
|
||||
category = ECSTRING(OptionsMenu,CategoryLogistics);
|
||||
};
|
||||
};
|
||||
|
@ -25,7 +25,8 @@ private ["_config", "_engineerRequired", "_items", "_return", "_condition", "_ve
|
||||
|
||||
_config = (ConfigFile >> "ACE_Repair" >> "Actions" >> _className);
|
||||
if !(isClass _config) exitWith {false}; // or go for a default?
|
||||
if(isEngineOn _target) exitWith {false};
|
||||
|
||||
// if(isEngineOn _target) exitWith {false}; // Ignore here so action shows, then exit and show warning when selected #3348
|
||||
|
||||
_engineerRequired = if (isNumber (_config >> "requiredEngineer")) then {
|
||||
getNumber (_config >> "requiredEngineer");
|
||||
|
@ -36,7 +36,14 @@ _engineerRequired = if (isNumber (_config >> "requiredEngineer")) then {
|
||||
0;
|
||||
};
|
||||
if !([_caller, _engineerRequired] call FUNC(isEngineer)) exitWith {false};
|
||||
if (isEngineOn _target) exitWith {false};
|
||||
|
||||
if ((isEngineOn _target) && {GVAR(autoShutOffEngineWhenStartingRepair)}) then {
|
||||
["engineOn", _target, [_target, false]] call EFUNC(common,objectEvent);
|
||||
};
|
||||
if ((isEngineOn _target) && {!GVAR(autoShutOffEngineWhenStartingRepair)}) exitWith {
|
||||
["displayTextStructured", [LSTRING(shutOffEngineWarning), 1.5, _caller]] call EFUNC(common,localEvent);
|
||||
false
|
||||
};
|
||||
|
||||
//Items can be an array of required items or a string to a ACE_Setting array
|
||||
_items = if (isArray (_config >> "items")) then {
|
||||
|
@ -1316,5 +1316,10 @@
|
||||
<Italian>Oggetti richiesti per riparare/rimuovere ruote</Italian>
|
||||
<French>Items exigés pour enlever/remplacer les roues</French>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Repair_shutOffEngineWarning">
|
||||
<English>Engine must be off to repair</English>
|
||||
<German>Motor muss ausgeschaltet zu reparieren sein</German>
|
||||
<Spanish>El motor necesita desactivado para la reparación</Spanish>
|
||||
</Key>
|
||||
</Package>
|
||||
</Project>
|
||||
|
Loading…
Reference in New Issue
Block a user