Config to enable / disable needed items for actions

Also increased needed "bullets" to inflame
This commit is contained in:
He-Man 2018-03-16 22:11:52 +01:00
parent 353960e38a
commit 25d2f2b24f
3 changed files with 53 additions and 39 deletions
Sources
epoch_code/compile/interface_event_handlers
epoch_config/Configs

View File

@ -272,6 +272,7 @@ if (_dikCode in (actionKeys "NightVision")) then {
if(!_ctrl && (_dikCode in (actionKeys "HeliRopeAction")))then{
_msg = "";
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{
@ -285,6 +286,7 @@ if(!_ctrl && (_dikCode in (actionKeys "HeliRopeAction")))then{
player addItem 'ItemRope';
};
};
};
}else{
_msg = "Hook/Unhook Malfunction, overrode by R3F or AdvSlingLoad";
_handled = true;
@ -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

View File

@ -26,17 +26,21 @@ params [
_blocked = false;
_msg = '';
_type = typeOf _actionObj;
switch(true)do{
case (_actionName isEqualTo 'FireInflame'): {
_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,'lighter_epoch',-1] call EPOCH_usedItemRepack;
[player,'lighter_epoch',-5] call EPOCH_usedItemRepack;
//[_actionObj] remoteExec ['EPOCH_server_addToFireSystem',2];
};
};
case (_actionName isEqualTo 'FirePutDown'): {
};
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';
@ -46,8 +50,10 @@ switch(true)do{
};
};
};
case (_actionName isEqualTo 'HookCargo'): {
};
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{
@ -61,14 +67,17 @@ switch(true)do{
player addItem 'ItemRope';
};
};
};
}else{
_msg = 'Hook Malfunction, overrode by R3F or AdvSlingLoad';
_blocked = true;
};
};
case (_actionName isEqualTo 'UnhookCargo'): {
case 'UnhookCargo': {
if(EPOCH_ArmaSlingLoad)then{
if (["CfgEpochClient", "ActionHookRope", true] call EPOCH_fnc_returnConfigEntryV2) then {
player addItem 'ItemRope';
};
}else{
_msg = 'Unhook Malfunction, overrode by R3F or AdvSlingLoad';
_blocked = true;

View File

@ -59,6 +59,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})
//to use different colored messages in scripts, just call it this way: ["the message", 6, [[0,0,0,0.2],[1,1,1,0.95]]] call Epoch_message;