diff --git a/Sources/epoch_code/compile/interface_event_handlers/EPOCH_KeyDown.sqf b/Sources/epoch_code/compile/interface_event_handlers/EPOCH_KeyDown.sqf index 4d32ad7a..1f3348aa 100644 --- a/Sources/epoch_code/compile/interface_event_handlers/EPOCH_KeyDown.sqf +++ b/Sources/epoch_code/compile/interface_event_handlers/EPOCH_KeyDown.sqf @@ -272,17 +272,19 @@ if (_dikCode in (actionKeys "NightVision")) then { if(!_ctrl && (_dikCode in (actionKeys "HeliRopeAction")))then{ _msg = ""; if(EPOCH_ArmaSlingLoad)then{ - if(driver vehicle player isEqualTo player)then{ - _slung = ropeAttachedObjects vehicle player; - if(_slung isEqualTo [])then{ - if!('ItemRope' in magazines player) then { - _msg = "You need rope to hook"; - _handled = true; + if (["CfgEpochClient", "ActionHookRope", true] call EPOCH_fnc_returnConfigEntryV2) then { + if(driver vehicle player isEqualTo player)then{ + _slung = ropeAttachedObjects vehicle player; + if(_slung isEqualTo [])then{ + if!('ItemRope' in magazines player) then { + _msg = "You need rope to hook"; + _handled = true; + }else{ + player removeItem 'ItemRope'; + }; }else{ - player removeItem 'ItemRope'; + player addItem 'ItemRope'; }; - }else{ - player addItem 'ItemRope'; }; }; }else{ @@ -293,5 +295,4 @@ if(!_ctrl && (_dikCode in (actionKeys "HeliRopeAction")))then{ [_msg,5,[[0,0,0,0.2],[1,1,1,1]]] call Epoch_message_stack; }; }; - _handled diff --git a/Sources/epoch_code/compile/interface_event_handlers/EPOCH_handleUIActions.sqf b/Sources/epoch_code/compile/interface_event_handlers/EPOCH_handleUIActions.sqf index e8ed286b..65afef44 100644 --- a/Sources/epoch_code/compile/interface_event_handlers/EPOCH_handleUIActions.sqf +++ b/Sources/epoch_code/compile/interface_event_handlers/EPOCH_handleUIActions.sqf @@ -26,39 +26,46 @@ params [ _blocked = false; _msg = ''; _type = typeOf _actionObj; -switch(true)do{ - case (_actionName isEqualTo 'FireInflame'): { - if!('lighter_epoch' in magazines player) then { - _msg = 'You need a lighter'; - _blocked = true; - }else{ - [player,'lighter_epoch',-1] call EPOCH_usedItemRepack; - //[_actionObj] remoteExec ['EPOCH_server_addToFireSystem',2]; - }; - }; - case (_actionName isEqualTo 'FirePutDown'): { - if(_type isEqualTo 'BurnBarrel_EPOCH')then{ - if!('ItemFireExtinguisher' in magazines player) then { - _msg = 'You need an extinguisher'; +_config = 'CfgEpochClient' call EPOCH_returnConfig; +switch(_actionName)do{ + case 'FireInflame': { + if (["CfgEpochClient", "ActionFireOnLighter", true] call EPOCH_fnc_returnConfigEntryV2) then { + if!('lighter_epoch' in magazines player) then { + _msg = 'You need a lighter'; _blocked = true; }else{ - [player,'ItemFireExtinguisher',-1] call EPOCH_usedItemRepack; + [player,'lighter_epoch',-5] call EPOCH_usedItemRepack; + //[_actionObj] remoteExec ['EPOCH_server_addToFireSystem',2]; }; }; }; - case (_actionName isEqualTo 'HookCargo'): { - if(EPOCH_ArmaSlingLoad)then{ - if(driver vehicle player isEqualTo player)then{ - _slung = ropeAttachedObjects vehicle player; - if(_slung isEqualTo [])then{ - if!('ItemRope' in magazines player) then { - _msg = 'You need rope to hook'; - _blocked = true; - }else{ - player removeItem 'ItemRope'; - }; + case 'FirePutDown': { + if (["CfgEpochClient", "ActionBurnBarrelOffExtinguisher", true] call EPOCH_fnc_returnConfigEntryV2) then { + if(_type isEqualTo 'BurnBarrel_EPOCH')then{ + if!('ItemFireExtinguisher' in magazines player) then { + _msg = 'You need an extinguisher'; + _blocked = true; }else{ - player addItem 'ItemRope'; + [player,'ItemFireExtinguisher',-1] call EPOCH_usedItemRepack; + }; + }; + }; + }; + case 'HookCargo': { + if(EPOCH_ArmaSlingLoad)then{ + if (["CfgEpochClient", "ActionHookRope", true] call EPOCH_fnc_returnConfigEntryV2) then { + if(driver vehicle player isEqualTo player)then{ + _slung = ropeAttachedObjects vehicle player; + if(_slung isEqualTo [])then{ + if!('ItemRope' in magazines player) then { + _msg = 'You need rope to hook'; + _blocked = true; + }else{ + player removeItem 'ItemRope'; + }; + }else{ + player addItem 'ItemRope'; + }; }; }; }else{ @@ -66,9 +73,11 @@ switch(true)do{ _blocked = true; }; }; - case (_actionName isEqualTo 'UnhookCargo'): { + case 'UnhookCargo': { if(EPOCH_ArmaSlingLoad)then{ - player addItem 'ItemRope'; + if (["CfgEpochClient", "ActionHookRope", true] call EPOCH_fnc_returnConfigEntryV2) then { + player addItem 'ItemRope'; + }; }else{ _msg = 'Unhook Malfunction, overrode by R3F or AdvSlingLoad'; _blocked = true; diff --git a/Sources/epoch_config/Configs/CfgEpochClient.hpp b/Sources/epoch_config/Configs/CfgEpochClient.hpp index d7bad07e..481110d8 100644 --- a/Sources/epoch_config/Configs/CfgEpochClient.hpp +++ b/Sources/epoch_config/Configs/CfgEpochClient.hpp @@ -58,6 +58,10 @@ class CfgEpochClient AtmBlockedAtPlot = "true"; // Block ATM's in Plotpole-Range disableRemoteSensors = "true"; // disableRemoteSensors true/false + + ActionFireOnLighter = "true"; // Lighter is needed to inflame fires + ActionBurnBarrelOffExtinguisher = "true"; // FireExtinguisher is needed to put off fires + ActionHookRope = "true"; // Rope is needed to hook vehicles (get back on release) epochMessageBackgroundCol[] = {0,0,0,0.2}; //Epoch_message background color (format: {R,G,B,A}) epochMessageTextCol[] = {1,1,1,0.95}; //Epoch_message text color (format: {R,G,B,A})