mirror of
https://github.com/EpochModTeam/Epoch.git
synced 2024-08-30 18:22:13 +00:00
FavBar: build mode fix
This commit is contained in:
parent
49e67d24d4
commit
97cf50183e
@ -107,7 +107,7 @@ if (_dikCode == EPOCH_keysAction) then {
|
||||
// Player only code
|
||||
if (vehicle player == player) then {
|
||||
|
||||
if (_dikCode == EPOCH_keysBuildMode1 && EPOCH_buildMode > 0) then {
|
||||
if ((_dikCode == EPOCH_keysBuildMode1 && !EPOCH_favBar_itemConsumed) && EPOCH_buildMode > 0) then {
|
||||
EPOCH_buildMode = 0;
|
||||
["Build Mode: Disabled", 5] call Epoch_message;
|
||||
EPOCH_Target = objNull;
|
||||
@ -231,6 +231,8 @@ if (vehicle player == player) then {
|
||||
|
||||
}; // end player only code
|
||||
|
||||
EPOCH_favBar_itemConsumed = false;
|
||||
|
||||
if (_dikCode in (actionKeys "Salute")) then {
|
||||
if (_ctrl) then {
|
||||
player playactionNow "GestureFinger";
|
||||
|
@ -27,24 +27,28 @@ _tileIdx = switch (_kee) do {
|
||||
_item = rmx_var_favBar_current select _tileIdx;
|
||||
_itemHasInteraction = str(missionConfigFile >> "CfgItemInteractions" >> _item) != "";
|
||||
|
||||
if (_itemHasInteraction) then {
|
||||
EPOCH_InteractedItem = ["",_item,""];
|
||||
[] call EPOCH_consumeItem;
|
||||
} else {
|
||||
_slot = _item call epoch_itemTypeSlot;
|
||||
_force = if (_slot in [3,4,5,7,8,10,11,16]) then {true} else {false}; //see how it works with other items, definitely keep true for weapons
|
||||
_errorCode = [_item,EPOCH_fav_DropIfOverflow,_force] call epoch_equip;
|
||||
player selectWeapon _item;
|
||||
if (EPOCH_buildMode == 0) then {
|
||||
if (_itemHasInteraction) then {
|
||||
EPOCH_InteractedItem = ["",_item,""];
|
||||
[] call EPOCH_consumeItem;
|
||||
EPOCH_favBar_itemConsumed = true;
|
||||
} else {
|
||||
_slot = _item call epoch_itemTypeSlot;
|
||||
_force = if (_slot in [3,4,5,7,8,10,11,16]) then {true} else {false}; //see how it works with other items, definitely keep true for weapons
|
||||
_errorCode = [_item,EPOCH_fav_DropIfOverflow,_force] call epoch_equip;
|
||||
player selectWeapon _item;
|
||||
|
||||
if (_slot in [3,4,5]) then {
|
||||
_curSlot = _item call epoch_itemTypeSlot;
|
||||
if (_curSlot == _slot && !EPOCH_fav_FastWeaponSwitching && _errorCode in [1,2]) then {player playAction "reloadMagazine";};
|
||||
if (_slot in [3,4,5]) then {
|
||||
_curSlot = _item call epoch_itemTypeSlot;
|
||||
if (_curSlot == _slot && !EPOCH_fav_FastWeaponSwitching && _errorCode in [1,2]) then {player playAction "reloadMagazine";};
|
||||
};
|
||||
|
||||
if (_errorCode isEqualTo 2) then {"Not enough space, item dropped on the ground!" call epoch_message;};
|
||||
if (_errorCode isEqualTo 4 && _item != (currentWeapon player)) then {"Not enough space!" call epoch_message;};
|
||||
if (_errorCode isEqualTo 3) then {"Item not found!" call epoch_message;};
|
||||
if (_errorCode isEqualTo 5) then {"No compatible weapon found!" call epoch_message;};
|
||||
};
|
||||
|
||||
if (_errorCode isEqualTo 2) then {"Not enough space, item dropped on the ground!" call epoch_message;};
|
||||
if (_errorCode isEqualTo 4 && _item != (currentWeapon player)) then {"Not enough space!" call epoch_message;};
|
||||
if (_errorCode isEqualTo 3) then {"Item not found!" call epoch_message;};
|
||||
if (_errorCode isEqualTo 5) then {"No compatible weapon found!" call epoch_message;};
|
||||
} else {
|
||||
"Can't use while in building mode!" call epoch_message;
|
||||
};
|
||||
|
||||
true
|
||||
|
@ -62,6 +62,7 @@ rmx_var_dynamicHUD_groups = [];
|
||||
rmx_var_dynamicHUD_groupCTRL = [];
|
||||
|
||||
//Favorites bar
|
||||
EPOCH_favBar_itemConsumed = false;
|
||||
rmx_var_favBar_Item = "";
|
||||
EPOCH_modKeys = [false,false,false];
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user