Add lower volume / earplugs hotkey and status UI icon

This commit is contained in:
ebaydayz
2016-04-30 21:19:06 -04:00
parent ba751dad4a
commit ab7254a121
11 changed files with 42 additions and 10 deletions

View File

@@ -13,6 +13,7 @@
[NEW] Added "RedRyder" and "350Rnd_BB_Magazine" to loot pile. #1456 #1457 @Namindu [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] Added action to lock and unlock vehicles from inside #1103 @pj999 @ebaydayz
[NEW] Autorun hotkey (0 = Toggle auto run) @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] 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] 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 [NEW] Blood types system is disabled by default. Set dayz_classicBloodBagSystem = false; in init.sqf to enable

View File

@@ -219,7 +219,7 @@ class RscTitles
class RscPicture_1204: RscPictureGUI class RscPicture_1204: RscPictureGUI
{ {
idc = 1204; 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; x = 0.955313 * safezoneW + safezoneX;
y = 0.51 * safezoneH + safezoneY; y = 0.51 * safezoneH + safezoneY;
w = 0.075; w = 0.075;
@@ -430,7 +430,7 @@ class RscTitles
class RscPicture_1204: RscPictureGUI class RscPicture_1204: RscPictureGUI
{ {
idc = 1204; 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; x = 0.955313 * safezoneW + safezoneX;
y = 0.51 * safezoneH + safezoneY; y = 0.51 * safezoneH + safezoneY;
w = 0.075; w = 0.075;

View File

@@ -55,6 +55,10 @@ if (isNil "keyboard_keys") then {
}; };
_handled = true; _handled = true;
}; };
_muteSound = {
call player_muteSound;
_handled = true;
};
_rifle = { _rifle = {
2 call dz_fn_switchWeapon; 2 call dz_fn_switchWeapon;
_handled = true; _handled = true;
@@ -326,6 +330,7 @@ if (isNil "keyboard_keys") then {
[actionKeys "Diary", _journal] call _addArray; [actionKeys "Diary", _journal] call _addArray;
[actionKeys "NetworkStats", _journal] call _addArray; [actionKeys "NetworkStats", _journal] call _addArray;
//[actionKeys "Turbo", _turbo] call _addArray; //[actionKeys "Turbo", _turbo] call _addArray;
[[DIK_F1], _muteSound] call _addArray;
[[DIK_F4, DIK_TAB, DIK_DELETE], _forcesave] 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; //[[DIK_F4, DIK_RMENU, DIK_LMENU,DIK_LSHIFT,DIK_RSHIFT,DIK_ESCAPE], _forcesave2] call _addArray;
[actionKeys "LeanLeft", _build_left ] 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; [actionKeys "ForceCommandingMode", {DZE_5 = true;_handled = true;}] call _addArray;
[[ DIK_F9, DIK_F10, DIK_F11, [[ DIK_F9, DIK_F10, DIK_F11,
DIK_F8,DIK_F7,DIK_F6,DIK_F5,DIK_F4, 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; DIK_8,DIK_7,DIK_6,DIK_5,DIK_4], _block] call _addArray;
if (serverCommandAvailable "#kick") then { if (serverCommandAvailable "#kick") then {
[[DIK_F12], gcam_onoff] call _addArray; // GCAM: F12 to start (for admins only) [[DIK_F12], gcam_onoff] call _addArray; // GCAM: F12 to start (for admins only)

View 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;
};
};

View File

@@ -45,9 +45,10 @@ _ctrlEar = _display displayCtrl 1304;
_ctrlEye = _display displayCtrl 1305; _ctrlEye = _display displayCtrl 1305;
_ctrlFracture = _display displayCtrl 1203; _ctrlFracture = _display displayCtrl 1203;
_control = _display displayCtrl 1204; //status_connection_ca.paa ??? if (!dayz_soundMuted) then {
_control ctrlShow false; _control = _display displayCtrl 1204; //muted speaker icon
_control ctrlShow false;
};
//Food/Water/Blood //Food/Water/Blood
/* /*

View File

@@ -46,8 +46,10 @@ _ctrlEye = _display displayCtrl 1305;
_ctrlCombat = _display displayCtrl 1307; _ctrlCombat = _display displayCtrl 1307;
_ctrlFracture = _display displayCtrl 1203; _ctrlFracture = _display displayCtrl 1203;
_control = _display displayCtrl 1204; //status_connection_ca.paa ??? if (!dayz_soundMuted) then {
_control ctrlShow false; _control = _display displayCtrl 1204; //muted speaker icon
_control ctrlShow false;
};
//Food/Water/Blood //Food/Water/Blood
_ctrlBlood ctrlSetTextColor [(1 - _bloodVal),(1 - _bloodVal),(1 - _bloodVal), 0.5]; _ctrlBlood ctrlSetTextColor [(1 - _bloodVal),(1 - _bloodVal),(1 - _bloodVal), 0.5];

View File

@@ -37,8 +37,10 @@ _ctrlEye = _display displayCtrl 1305;
_ctrlCombat = _display displayCtrl 1307; _ctrlCombat = _display displayCtrl 1307;
_ctrlFracture = _display displayCtrl 1203; _ctrlFracture = _display displayCtrl 1203;
_control = _display displayCtrl 1204; //status_connection_ca.paa ??? if (!dayz_soundMuted) then {
_control ctrlShow false; _control = _display displayCtrl 1204; //muted speaker icon
_control ctrlShow false;
};
//Food/Water/Blood //Food/Water/Blood
_ctrlBlood ctrlSetTextColor [(Dayz_GUI_R + (0.3 * (1-_bloodVal))),(Dayz_GUI_G * _bloodVal),(Dayz_GUI_B * _bloodVal), 0.5]; _ctrlBlood ctrlSetTextColor [(Dayz_GUI_R + (0.3 * (1-_bloodVal))),(Dayz_GUI_G * _bloodVal),(Dayz_GUI_B * _bloodVal), 0.5];

View File

@@ -7,6 +7,7 @@ _position = _this select 1;
_unit = _this select 2; _unit = _this select 2;
if (_unit == player) then { 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]); _buildables = count ((getposATL _vehicle) nearObjects ["DZ_buildables", 3]);
if (_buildables > 0) then { if (_buildables > 0) then {

Binary file not shown.

View File

@@ -116,6 +116,7 @@ if (!isDedicated) then {
player_sharpen = compile preprocessFileLineNumbers "\z\addons\dayz_code\actions\player_sharpen.sqf"; player_sharpen = compile preprocessFileLineNumbers "\z\addons\dayz_code\actions\player_sharpen.sqf";
//ui //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_selectSlot = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\ui_selectSlot.sqf";
player_gearSet = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\player_gearSet.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"; ui_changeDisplay = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\ui_changeDisplay.sqf";

View File

@@ -569,6 +569,7 @@ if (!isDedicated) then {
dayz_thirst = 0; dayz_thirst = 0;
dayz_nutrition = 0; dayz_nutrition = 0;
dayz_preloadFinished = true; dayz_preloadFinished = true;
dayz_soundMuted = false;
dayz_statusArray = [1,1]; dayz_statusArray = [1,1];
dayz_disAudial = 0; dayz_disAudial = 0;
dayz_disVisual = 0; dayz_disVisual = 0;