mirror of
https://github.com/EpochModTeam/DayZ-Epoch.git
synced 2025-12-13 19:52:38 +03:00
Add lower volume / earplugs hotkey and status UI icon
This commit is contained in:
@@ -13,6 +13,7 @@
|
||||
[NEW] Added "RedRyder" and "350Rnd_BB_Magazine" to loot pile. #1456 #1457 @Namindu
|
||||
[NEW] Added action to lock and unlock vehicles from inside #1103 @pj999 @ebaydayz
|
||||
[NEW] Autorun hotkey (0 = Toggle auto run) @ebaydayz
|
||||
[NEW] Earplugs hotkey and status UI icon (F1 = Lower volume). Automatically disabled when exiting a vehicle. @ebaydayz
|
||||
[NEW] Snap building, use DZE_modularBuild = true; in init.sqf to enable. @raymix
|
||||
[NEW] Auto login when a player joins the server, default 10 seconds, requires description.ext update in the mission (disable in description.ext by setting defValueParam1 = 31;) @icomrade
|
||||
[NEW] Blood types system is disabled by default. Set dayz_classicBloodBagSystem = false; in init.sqf to enable
|
||||
|
||||
@@ -219,7 +219,7 @@ class RscTitles
|
||||
class RscPicture_1204: RscPictureGUI
|
||||
{
|
||||
idc = 1204;
|
||||
text = "\z\addons\dayz_code\gui\status\status_connection_ca.paa";
|
||||
text = "\z\addons\dayz_code\gui\status\status_speaker_muted.paa"; // was previously status_connection_ca, not used
|
||||
x = 0.955313 * safezoneW + safezoneX;
|
||||
y = 0.51 * safezoneH + safezoneY;
|
||||
w = 0.075;
|
||||
@@ -430,7 +430,7 @@ class RscTitles
|
||||
class RscPicture_1204: RscPictureGUI
|
||||
{
|
||||
idc = 1204;
|
||||
text = "\z\addons\dayz_code\gui\status_epoch\status_connection_ca.paa";
|
||||
text = "\z\addons\dayz_code\gui\status\status_speaker_muted.paa"; // was previously status_connection_ca, not used
|
||||
x = 0.955313 * safezoneW + safezoneX;
|
||||
y = 0.51 * safezoneH + safezoneY;
|
||||
w = 0.075;
|
||||
|
||||
@@ -55,6 +55,10 @@ if (isNil "keyboard_keys") then {
|
||||
};
|
||||
_handled = true;
|
||||
};
|
||||
_muteSound = {
|
||||
call player_muteSound;
|
||||
_handled = true;
|
||||
};
|
||||
_rifle = {
|
||||
2 call dz_fn_switchWeapon;
|
||||
_handled = true;
|
||||
@@ -326,6 +330,7 @@ if (isNil "keyboard_keys") then {
|
||||
[actionKeys "Diary", _journal] call _addArray;
|
||||
[actionKeys "NetworkStats", _journal] call _addArray;
|
||||
//[actionKeys "Turbo", _turbo] call _addArray;
|
||||
[[DIK_F1], _muteSound] call _addArray;
|
||||
[[DIK_F4, DIK_TAB, DIK_DELETE], _forcesave] call _addArray;
|
||||
//[[DIK_F4, DIK_RMENU, DIK_LMENU,DIK_LSHIFT,DIK_RSHIFT,DIK_ESCAPE], _forcesave2] call _addArray;
|
||||
[actionKeys "LeanLeft", _build_left ] call _addArray;
|
||||
@@ -337,7 +342,7 @@ if (isNil "keyboard_keys") then {
|
||||
[actionKeys "ForceCommandingMode", {DZE_5 = true;_handled = true;}] call _addArray;
|
||||
[[ DIK_F9, DIK_F10, DIK_F11,
|
||||
DIK_F8,DIK_F7,DIK_F6,DIK_F5,DIK_F4,
|
||||
DIK_F3,DIK_F2,DIK_F1,DIK_9,
|
||||
DIK_F3,DIK_F2,DIK_9,
|
||||
DIK_8,DIK_7,DIK_6,DIK_5,DIK_4], _block] call _addArray;
|
||||
if (serverCommandAvailable "#kick") then {
|
||||
[[DIK_F12], gcam_onoff] call _addArray; // GCAM: F12 to start (for admins only)
|
||||
|
||||
18
SQF/dayz_code/compile/player_muteSound.sqf
Normal file
18
SQF/dayz_code/compile/player_muteSound.sqf
Normal file
@@ -0,0 +1,18 @@
|
||||
private ["_control","_display"];
|
||||
|
||||
disableSerialization;
|
||||
_display = uiNamespace getVariable "DAYZ_GUI_display";
|
||||
|
||||
if (!isNil "_display") then {
|
||||
_control = _display displayCtrl 1204;
|
||||
|
||||
if (dayz_soundMuted) then {
|
||||
dayz_soundMuted = false;
|
||||
1 fadeSound 1;
|
||||
_control ctrlShow false;
|
||||
} else {
|
||||
dayz_soundMuted = true;
|
||||
1 fadeSound 0.25;
|
||||
_control ctrlShow true;
|
||||
};
|
||||
};
|
||||
@@ -45,9 +45,10 @@ _ctrlEar = _display displayCtrl 1304;
|
||||
_ctrlEye = _display displayCtrl 1305;
|
||||
_ctrlFracture = _display displayCtrl 1203;
|
||||
|
||||
_control = _display displayCtrl 1204; //status_connection_ca.paa ???
|
||||
_control ctrlShow false;
|
||||
|
||||
if (!dayz_soundMuted) then {
|
||||
_control = _display displayCtrl 1204; //muted speaker icon
|
||||
_control ctrlShow false;
|
||||
};
|
||||
|
||||
//Food/Water/Blood
|
||||
/*
|
||||
|
||||
@@ -46,8 +46,10 @@ _ctrlEye = _display displayCtrl 1305;
|
||||
_ctrlCombat = _display displayCtrl 1307;
|
||||
_ctrlFracture = _display displayCtrl 1203;
|
||||
|
||||
_control = _display displayCtrl 1204; //status_connection_ca.paa ???
|
||||
_control ctrlShow false;
|
||||
if (!dayz_soundMuted) then {
|
||||
_control = _display displayCtrl 1204; //muted speaker icon
|
||||
_control ctrlShow false;
|
||||
};
|
||||
|
||||
//Food/Water/Blood
|
||||
_ctrlBlood ctrlSetTextColor [(1 - _bloodVal),(1 - _bloodVal),(1 - _bloodVal), 0.5];
|
||||
|
||||
@@ -37,8 +37,10 @@ _ctrlEye = _display displayCtrl 1305;
|
||||
_ctrlCombat = _display displayCtrl 1307;
|
||||
_ctrlFracture = _display displayCtrl 1203;
|
||||
|
||||
_control = _display displayCtrl 1204; //status_connection_ca.paa ???
|
||||
_control ctrlShow false;
|
||||
if (!dayz_soundMuted) then {
|
||||
_control = _display displayCtrl 1204; //muted speaker icon
|
||||
_control ctrlShow false;
|
||||
};
|
||||
|
||||
//Food/Water/Blood
|
||||
_ctrlBlood ctrlSetTextColor [(Dayz_GUI_R + (0.3 * (1-_bloodVal))),(Dayz_GUI_G * _bloodVal),(Dayz_GUI_B * _bloodVal), 0.5];
|
||||
|
||||
@@ -7,6 +7,7 @@ _position = _this select 1;
|
||||
_unit = _this select 2;
|
||||
|
||||
if (_unit == player) then {
|
||||
if (dayz_soundMuted) then {call player_muteSound;}; // Automatically disable sound mute on vehicle exit
|
||||
_buildables = count ((getposATL _vehicle) nearObjects ["DZ_buildables", 3]);
|
||||
if (_buildables > 0) then {
|
||||
|
||||
|
||||
BIN
SQF/dayz_code/gui/status/status_speaker_muted.paa
Normal file
BIN
SQF/dayz_code/gui/status/status_speaker_muted.paa
Normal file
Binary file not shown.
@@ -116,6 +116,7 @@ if (!isDedicated) then {
|
||||
player_sharpen = compile preprocessFileLineNumbers "\z\addons\dayz_code\actions\player_sharpen.sqf";
|
||||
|
||||
//ui
|
||||
player_muteSound = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\player_muteSound.sqf";
|
||||
player_selectSlot = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\ui_selectSlot.sqf";
|
||||
player_gearSet = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\player_gearSet.sqf";
|
||||
ui_changeDisplay = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\ui_changeDisplay.sqf";
|
||||
|
||||
@@ -569,6 +569,7 @@ if (!isDedicated) then {
|
||||
dayz_thirst = 0;
|
||||
dayz_nutrition = 0;
|
||||
dayz_preloadFinished = true;
|
||||
dayz_soundMuted = false;
|
||||
dayz_statusArray = [1,1];
|
||||
dayz_disAudial = 0;
|
||||
dayz_disVisual = 0;
|
||||
|
||||
Reference in New Issue
Block a user