mirror of
https://github.com/EpochModTeam/DayZ-Epoch.git
synced 2025-12-14 20:13:13 +03:00
No gear menu near locked vehicles
This commit is contained in:
@@ -875,7 +875,9 @@ class RscDisplayGear
|
|||||||
{
|
{
|
||||||
idd = 106;
|
idd = 106;
|
||||||
enableDisplay = 1;
|
enableDisplay = 1;
|
||||||
|
onLoad = "_this call fn_gearMenuChecks;[] spawn object_monitorGear; {player removeMagazines _x} forEach MeleeMagazines; call gear_ui_init; if (isNil('IGUI_GEAR_activeFilter')) then { IGUI_GEAR_activeFilter = 0;}; private ['_dummy']; _dummy = [_this,'initDialog'] call compile preprocessFile '\ca\ui\scripts\handleGear.sqf'; _dummy = [_this,'onLoad'] execVM '\ca\ui\scripts\handleGear.sqf'; _dummy;";
|
||||||
onUnload = "call player_gearSync; call dayz_forceSave;";
|
onUnload = "call player_gearSync; call dayz_forceSave;";
|
||||||
|
|
||||||
class controls
|
class controls
|
||||||
{
|
{
|
||||||
class CA_Filter_Icon: RscPicture
|
class CA_Filter_Icon: RscPicture
|
||||||
|
|||||||
@@ -93,18 +93,26 @@ if (count(_findNearestTree) >= 1) then {
|
|||||||
|
|
||||||
if (_proceed) then {
|
if (_proceed) then {
|
||||||
|
|
||||||
|
_invResult = false;
|
||||||
|
_i = 0;
|
||||||
for "_x" from 1 to _countOut do {
|
for "_x" from 1 to _countOut do {
|
||||||
player addMagazine _itemOut;
|
_invResult = [player,_itemOut] call BIS_fnc_invAdd;
|
||||||
|
if(_invResult) then {
|
||||||
|
_i = _i + 1;
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
// chop down tree
|
if(_i != 0) then {
|
||||||
if("" == typeOf _tree) then {
|
// chop down tree
|
||||||
_tree setDamage 1;
|
if("" == typeOf _tree) then {
|
||||||
|
_tree setDamage 1;
|
||||||
|
};
|
||||||
|
//diag_log format["DEBUG TREE DAMAGE: %1", _tree];
|
||||||
|
|
||||||
|
cutText [format["\n\n%1 of %2 has been successfully added to your inventory.", _i,_itemOut], "PLAIN DOWN"];
|
||||||
|
} else {
|
||||||
|
cutText [format["\n\n%1 of %2 could not be added to your inventory. (not enough room?)", _i,_itemOut], "PLAIN DOWN"];
|
||||||
};
|
};
|
||||||
//diag_log format["DEBUG TREE DAMAGE: %1", _tree];
|
|
||||||
|
|
||||||
cutText [format["\n\n%1 of %2 has been successfully added to your inventory.", _countOut,_itemOut], "PLAIN DOWN"];
|
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
r_interrupt = false;
|
r_interrupt = false;
|
||||||
if (vehicle player == player) then {
|
if (vehicle player == player) then {
|
||||||
|
|||||||
7
SQF/dayz_code/compile/fn_gearMenuChecks.sqf
Normal file
7
SQF/dayz_code/compile/fn_gearMenuChecks.sqf
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
disableSerialization;
|
||||||
|
_display = (_this select 0);
|
||||||
|
_close = {locked _x} count (nearestObjects [player, ["AllVehicle"], 10]) > 0;
|
||||||
|
|
||||||
|
if(_close) then {
|
||||||
|
_display closeDisplay 1;
|
||||||
|
};
|
||||||
@@ -56,6 +56,7 @@ if (!isDedicated) then {
|
|||||||
player_alertZombies = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\player_alertZombies.sqf";
|
player_alertZombies = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\player_alertZombies.sqf";
|
||||||
player_fireMonitor = compile preprocessFileLineNumbers "\z\addons\dayz_code\system\fire_monitor.sqf";
|
player_fireMonitor = compile preprocessFileLineNumbers "\z\addons\dayz_code\system\fire_monitor.sqf";
|
||||||
player_friendliesCheck = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\player_friendliesCheck.sqf";
|
player_friendliesCheck = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\player_friendliesCheck.sqf";
|
||||||
|
fn_gearMenuChecks = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\fn_gearMenuChecks.sqf";
|
||||||
|
|
||||||
//Objects
|
//Objects
|
||||||
object_roadFlare = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\object_roadFlare.sqf";
|
object_roadFlare = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\object_roadFlare.sqf";
|
||||||
|
|||||||
Reference in New Issue
Block a user