mirror of
https://github.com/EpochModTeam/DayZ-Epoch.git
synced 2025-12-13 19:52:38 +03:00
Add back melee ammo after removal for BIS_fnc_inv
Vanilla commit:
516d1d538c
This commit is contained in:
@@ -4,8 +4,8 @@ class RscDisplayGear
|
||||
enableDisplay = 1;
|
||||
movingEnable = 0;
|
||||
|
||||
//onLoad = "[] spawn object_monitorGear; {player removeMagazines _x} count MeleeMagazines; call gear_ui_init; call ui_gear_sound; if (isNil('IGUI_GEAR_activeFilter')) then { IGUI_GEAR_activeFilter = 0;}; [_this,'onLoad'] execVM '\z\addons\dayz_code\system\handleGear.sqf'";/* diag_log 'RscDisplayGear : : onLoad'; */
|
||||
//onUnload = "{player removeMagazines _x} count MeleeMagazines; call player_forceSave; call dayz_meleeMagazineCheck;"; /* diag_log 'RscDisplayGear : : onunLoad'; */
|
||||
//onLoad = "[] spawn object_monitorGear; false call dz_fn_meleeMagazines; call gear_ui_init; call ui_gear_sound; if (isNil('IGUI_GEAR_activeFilter')) then { IGUI_GEAR_activeFilter = 0;}; [_this,'onLoad'] execVM '\z\addons\dayz_code\system\handleGear.sqf'";/* diag_log 'RscDisplayGear : : onLoad'; */
|
||||
//onUnload = "false call dz_fn_meleeMagazines; call player_forceSave; call dayz_meleeMagazineCheck;"; /* diag_log 'RscDisplayGear : : onunLoad'; */
|
||||
onLoad = "setMousePosition [0.5, 0.5];_this call fn_gearMenuChecks; false call dz_fn_meleeMagazines; [] spawn object_monitorGear; call gear_ui_init; call ui_gear_sound; if (isNil 'IGUI_GEAR_activeFilter') then {IGUI_GEAR_activeFilter = 0}; [_this, 'onLoad'] execVM '\z\addons\dayz_code\system\handleGear.sqf'";
|
||||
onUnload = "true call dz_fn_meleeMagazines; call player_selectWeapon; call player_forceSave;";
|
||||
onMouseMoving = "[] call gear_ui_hide;";
|
||||
@@ -316,7 +316,7 @@ class RscDisplayGear
|
||||
x = -2;
|
||||
style = 2048;
|
||||
onSetFocus = "[_this,'onFocus'] execVM '\z\addons\dayz_code\system\handleGear.sqf'";
|
||||
onButtonClick = "{player removeMagazines _x} count MeleeMagazines; [_this,'onLBListSelChanged'] execVM '\z\addons\dayz_code\system\handleGear.sqf'";
|
||||
onButtonClick = "false call dz_fn_meleeMagazines; [_this,'onLBListSelChanged'] execVM '\z\addons\dayz_code\system\handleGear.sqf'";
|
||||
text = "<";
|
||||
};
|
||||
|
||||
@@ -351,7 +351,7 @@ class RscDisplayGear
|
||||
idc = 147;
|
||||
x = -2;
|
||||
onSetFocus = "[_this,""onFocus""] execVM '\z\addons\dayz_code\system\handleGear.sqf'";
|
||||
onButtonClick = "{player removeMagazines _x} count MeleeMagazines; [_this,""onLBListSelChanged""] execVM '\z\addons\dayz_code\system\handleGear.sqf'";
|
||||
onButtonClick = "false call dz_fn_meleeMagazines; [_this,""onLBListSelChanged""] execVM '\z\addons\dayz_code\system\handleGear.sqf'";
|
||||
text = ">";
|
||||
};
|
||||
};
|
||||
|
||||
@@ -69,9 +69,9 @@ if (_classname isKindOf "Bag_Base_EP1") exitWith {
|
||||
_config = (configFile >> _type >> _classname);
|
||||
|
||||
//Remove melee magazines (BIS_fnc_invAdd fix)
|
||||
{player removeMagazines _x} count MeleeMagazines;
|
||||
|
||||
false call dz_fn_meleeMagazines;
|
||||
_isOk = [player,_config] call BIS_fnc_invAdd;
|
||||
true call dz_fn_meleeMagazines;
|
||||
|
||||
if (_isOk) then {
|
||||
deleteVehicle _holder;
|
||||
|
||||
@@ -52,7 +52,7 @@ _hasInput = true;
|
||||
|
||||
if (_hasInput) then {
|
||||
//Remove melee magazines (BIS_fnc_invAdd and BIS_fnc_invSlotsEmpty fix)
|
||||
{player removeMagazines _x} count MeleeMagazines;
|
||||
false call dz_fn_meleeMagazines;
|
||||
_freeSlots = [player] call BIS_fnc_invSlotsEmpty;
|
||||
{
|
||||
_item = _x select 0;
|
||||
@@ -66,7 +66,7 @@ if (_hasInput) then {
|
||||
};
|
||||
};
|
||||
} forEach _input;
|
||||
|
||||
true call dz_fn_meleeMagazines;
|
||||
_availabeSpace = true;
|
||||
//uiSleep 1;
|
||||
|
||||
|
||||
@@ -50,7 +50,7 @@ if ((count _upgrade) > 0) then {
|
||||
_i = 0;
|
||||
_addedItems = [];
|
||||
//Remove melee magazines (BIS_fnc_invAdd fix)
|
||||
{player removeMagazines _x} count MeleeMagazines;
|
||||
false call dz_fn_meleeMagazines;
|
||||
|
||||
{
|
||||
_itemOut = _x select 0;
|
||||
@@ -70,6 +70,7 @@ if ((count _upgrade) > 0) then {
|
||||
if (_abortInvAdd) exitWith {};
|
||||
|
||||
} count _refund;
|
||||
true call dz_fn_meleeMagazines;
|
||||
|
||||
// all parts added proceed
|
||||
if(_i != 0) then {
|
||||
|
||||
@@ -89,7 +89,7 @@ if(!r_drag_sqf and !r_player_unconscious and !_onLadder) then {
|
||||
|
||||
if (_hasInput) then {
|
||||
//Remove melee magazines (BIS_fnc_invAdd and BIS_fnc_invSlotsEmpty fix)
|
||||
{player removeMagazines _x} count MeleeMagazines;
|
||||
false call dz_fn_meleeMagazines;
|
||||
_freeSlots = [player] call BIS_fnc_invSlotsEmpty;
|
||||
{
|
||||
_item = _x select 0;
|
||||
@@ -122,6 +122,7 @@ if(!r_drag_sqf and !r_player_unconscious and !_onLadder) then {
|
||||
};
|
||||
} forEach _output;
|
||||
//uiSleep 1;
|
||||
true call dz_fn_meleeMagazines;
|
||||
|
||||
if (_availabeSpace) then {
|
||||
//player playActionNow "PutDown";
|
||||
|
||||
@@ -77,7 +77,7 @@ if (count _nearByPile > 0) then {
|
||||
|
||||
if (_hasInput) then {
|
||||
//Remove melee magazines (BIS_fnc_invAdd and BIS_fnc_invSlotsEmpty fix)
|
||||
{player removeMagazines _x} count MeleeMagazines;
|
||||
false call dz_fn_meleeMagazines;
|
||||
_freeSlots = [player] call BIS_fnc_invSlotsEmpty;
|
||||
{
|
||||
_item = _x select 0;
|
||||
@@ -109,6 +109,7 @@ if (count _nearByPile > 0) then {
|
||||
};
|
||||
};
|
||||
} forEach _output;
|
||||
true call dz_fn_meleeMagazines;
|
||||
//uiSleep 1;
|
||||
|
||||
if (_availabeSpace) then {
|
||||
|
||||
@@ -94,7 +94,7 @@ if (count(_findNearestTree) >= 1) then {
|
||||
|
||||
if (_proceed) then {
|
||||
//Remove melee magazines (BIS_fnc_invAdd fix)
|
||||
{player removeMagazines _x} count MeleeMagazines;
|
||||
false call dz_fn_meleeMagazines;
|
||||
_invResult = false;
|
||||
_i = 0;
|
||||
for "_x" from 1 to _countOut do {
|
||||
@@ -103,6 +103,7 @@ if (count(_findNearestTree) >= 1) then {
|
||||
_i = _i + 1;
|
||||
};
|
||||
};
|
||||
true call dz_fn_meleeMagazines;
|
||||
|
||||
_text = getText (configFile >> "CfgMagazines" >> _itemOut >> "displayName");
|
||||
|
||||
|
||||
@@ -27,12 +27,14 @@ _newWeapon = _this select 2;
|
||||
|
||||
//check that player has enough room in inventory
|
||||
//Remove melee magazines (BIS_fnc_invAdd and BIS_fnc_invSlotsEmpty fix)
|
||||
{player removeMagazines _x} count MeleeMagazines;
|
||||
false call dz_fn_meleeMagazines;
|
||||
if ((([player] call BIS_fnc_invSlotsEmpty) select 4) < 1) exitWith
|
||||
{
|
||||
closeDialog 0;
|
||||
(localize "str_player_24") call dayz_rollingMessages;
|
||||
true call dz_fn_meleeMagazines;
|
||||
};
|
||||
true call dz_fn_meleeMagazines;
|
||||
|
||||
//check that player has the weapon
|
||||
if (!(player hasWeapon _weapon)) exitWith
|
||||
|
||||
@@ -33,7 +33,7 @@ switch (_rounded) do {
|
||||
};
|
||||
|
||||
//Remove melee magazines (BIS_fnc_invAdd fix)
|
||||
{player removeMagazines _x} count MeleeMagazines;
|
||||
false call dz_fn_meleeMagazines;
|
||||
_i = 0;
|
||||
while {_i < _rounded} do {
|
||||
_i = _i + 1;
|
||||
@@ -59,3 +59,4 @@ while {_i < _rounded} do {
|
||||
_pile addMagazineCargoGlobal [_itemtocreate,1];
|
||||
};
|
||||
};
|
||||
true call dz_fn_meleeMagazines;
|
||||
@@ -45,7 +45,7 @@ if (_hasToolbox) then {
|
||||
|
||||
if (_finished) then {
|
||||
//Remove melee magazines (BIS_fnc_invAdd fix)
|
||||
{player removeMagazines _x} count MeleeMagazines;
|
||||
false call dz_fn_meleeMagazines;
|
||||
_damage = [_vehicle,_hitpoint] call object_getHit;
|
||||
if (_damage < 1 && {_damage > 0}) then { //Tempfix for issue where certain hitpoints on some vehicles do not get damaged and allow infinite removal
|
||||
_BreakableParts = ["HitGlass1","HitGlass2","HitGlass3","HitGlass4","HitGlass5","HitGlass6","HitLGlass","HitRGlass","HitEngine","HitFuel","HitHRotor"];
|
||||
@@ -80,6 +80,7 @@ if (_hasToolbox) then {
|
||||
localize "str_player_24" call dayz_rollingMessages;
|
||||
};
|
||||
};
|
||||
true call dz_fn_meleeMagazines;
|
||||
} else {
|
||||
r_interrupt = false;
|
||||
if (vehicle player == player) then {
|
||||
|
||||
@@ -21,7 +21,7 @@ _keySelected = format["ItemKey%1%2",_keyColor,_keyNumber];
|
||||
_isKeyOK = isClass(configFile >> "CfgWeapons" >> _keySelected);
|
||||
|
||||
//Remove melee magazines (BIS_fnc_invAdd fix)
|
||||
{player removeMagazines _x} count MeleeMagazines;
|
||||
false call dz_fn_meleeMagazines;
|
||||
_isOk = [player,_keySelected] call BIS_fnc_invAdd;
|
||||
|
||||
true call dz_fn_meleeMagazines;
|
||||
[(_isOk && _isKeyOK),_keySelected]
|
||||
@@ -35,10 +35,11 @@ if (_this in items player) then {
|
||||
};
|
||||
} else {
|
||||
//Remove melee magazines (BIS_fnc_invAdd fix)
|
||||
{player removeMagazines _x} count MeleeMagazines;
|
||||
false call dz_fn_meleeMagazines;
|
||||
|
||||
if !([player,_this] call BIS_fnc_invAdd) then {
|
||||
systemChat localize "str_epoch_player_107";
|
||||
_this call _dropOnFloor;
|
||||
};
|
||||
true call dz_fn_meleeMagazines;
|
||||
};
|
||||
@@ -1061,7 +1061,6 @@ class FSM
|
||||
"player disableConversation true;" \n
|
||||
"" \n
|
||||
"eh_player_killed = player addeventhandler [""FiredNear"",{_this call player_weaponFiredNear;} ];" \n
|
||||
"//player addEventHandler ['Respawn', player_death];" \n
|
||||
"" \n
|
||||
"//_state = player getVariable[""state"",[]];" \n
|
||||
"_currentWpn = """";" \n
|
||||
|
||||
Reference in New Issue
Block a user