mirror of
https://github.com/EpochModTeam/DayZ-Epoch.git
synced 2026-02-04 15:22:53 +03:00
Update keyboard.sqf for new building keys
This commit is contained in:
@@ -21,17 +21,104 @@ if (isNil "keyboard_keys") then {
|
||||
if (!isNil "DZE_buildItem") then {_handled = true;}; // hold/release object while base building without altering weapon firing mode
|
||||
};
|
||||
local _dze_q = {
|
||||
DZE_4 = true;
|
||||
if (!isNil "DZE_buildItem") then {
|
||||
_handled = true;
|
||||
} else {
|
||||
DZE_Q = true;
|
||||
dayz_dodge = true;
|
||||
};
|
||||
};
|
||||
local _dze_e = {
|
||||
DZE_6 = true;
|
||||
if (!isNil "DZE_buildItem") then {
|
||||
_handled = true;
|
||||
} else {
|
||||
DZE_E = true;
|
||||
dayz_dodge = true;
|
||||
};
|
||||
};
|
||||
local _dze_PgUp = {
|
||||
if (!_ctrlState && !_altState) then {DZE_Q = true;};
|
||||
if (!_ctrlState && _altState) then {DZE_Q_alt = true;};
|
||||
if (_ctrlState && !_altState) then {DZE_Q_ctrl = true;};
|
||||
if (!isNil "DZE_buildItem") then {_handled = true;}; // raise object while base building without altering weapon zeroing
|
||||
};
|
||||
local _dze_z = {
|
||||
local _dze_PgDn = {
|
||||
if (!_ctrlState && !_altState) then {DZE_Z = true;};
|
||||
if (!_ctrlState && _altState) then {DZE_Z_alt = true;};
|
||||
if (_ctrlState && !_altState) then {DZE_Z_ctrl = true;};
|
||||
if (!isNil "DZE_buildItem") then {_handled = true;}; // lower object while base building without altering weapon zeroing
|
||||
};
|
||||
local _dze_tab = {
|
||||
if (!isNil "DZE_buildItem") then {
|
||||
call {
|
||||
if (!_shiftState && !_altState && !_ctrlState) exitWith {DZE_TAB = true;};
|
||||
if (_shiftState && !_altState && !_ctrlState) exitWith {DZE_TAB_SHIFT = true;};
|
||||
};
|
||||
_handled = true;
|
||||
};
|
||||
};
|
||||
local _dze_p = {
|
||||
if (_shiftState) then {
|
||||
_handled = true;
|
||||
} else {
|
||||
if (!isNil "DZE_buildItem") then { // show/hide plot pole boundary while base building
|
||||
DZE_P = true;
|
||||
_handled = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
local _dze_up = {
|
||||
if (!isNil "DZE_buildItem") then { // pitch object forward while base building (Up Arrow Only)
|
||||
DZE_UP = true;
|
||||
_handled = true; // prevent move forward
|
||||
};
|
||||
r_interrupt = true;
|
||||
};
|
||||
local _dze_down = {
|
||||
if (!isNil "DZE_buildItem") then { // pitch object back while base building (Down Arrow Only)
|
||||
DZE_DOWN = true;
|
||||
_handled = true; // prevent move back
|
||||
};
|
||||
r_interrupt = true;
|
||||
};
|
||||
local _dze_left = {
|
||||
if (!isNil "DZE_buildItem") then { // bank object left while base building
|
||||
DZE_LEFT = true;
|
||||
_handled = true; // prevent move left
|
||||
};
|
||||
r_interrupt = true;
|
||||
};
|
||||
local _dze_right = {
|
||||
if (!isNil "DZE_buildItem") then { // bank object right while base building
|
||||
DZE_RIGHT = true;
|
||||
_handled = true; // prevent move right
|
||||
};
|
||||
r_interrupt = true;
|
||||
};
|
||||
local _dze_t = {
|
||||
if (!isNil "DZE_buildItem") then { // terrain align while base building
|
||||
DZE_T = true;
|
||||
_handled = true;
|
||||
};
|
||||
};
|
||||
local _dze_l = {
|
||||
if (!isNil "DZE_buildItem") then { // toggle local mode while base building (local axis / world axis)
|
||||
DZE_L = true;
|
||||
_handled = true;
|
||||
};
|
||||
};
|
||||
local _dze_h = {
|
||||
if (!isNil "DZE_buildItem") then { // hide / unhide snap building panel
|
||||
DZE_H = true;
|
||||
_handled = true;
|
||||
};
|
||||
};
|
||||
local _dze_back = {
|
||||
DZE_BACK = true;
|
||||
if (!isNil "DZE_buildItem") then {_handled = true;}; // reset vectors while base building (backspace)
|
||||
};
|
||||
local _autoRun = {
|
||||
if (!dayz_autoRun) then {
|
||||
dayz_autoRun = true;
|
||||
@@ -111,6 +198,7 @@ if (isNil "keyboard_keys") then {
|
||||
local _forcesave = {
|
||||
if (diag_tickTime - dayz_lastSave > 10) then {
|
||||
call player_forceSave;
|
||||
systemChat "saved";
|
||||
};
|
||||
};
|
||||
local _drop = {
|
||||
@@ -170,6 +258,14 @@ if (isNil "keyboard_keys") then {
|
||||
};
|
||||
};
|
||||
|
||||
//Server Menu
|
||||
_informenu = {
|
||||
if (isNull findDisplay 7777) then {
|
||||
execVM "custom\tmenu\scripts\OM.sqf";
|
||||
};
|
||||
_handled = true;
|
||||
};
|
||||
|
||||
local _block = {
|
||||
_handled = true;
|
||||
};
|
||||
@@ -188,22 +284,35 @@ if (isNil "keyboard_keys") then {
|
||||
{voice_keys = voice_keys + (actionKeys _x)} count voice_actions;
|
||||
{channel_keys = channel_keys + (actionKeys _x)} count ["NextChannel","PrevChannel"];
|
||||
keyboard_keys resize 256;
|
||||
[[DIK_F4], _informenu] call _addArray;
|
||||
[[DIK_ESCAPE], _cancelBuild] call _addArray;
|
||||
[[DIK_INSERT], {DZE_Q_alt = true;}] call _addArray;
|
||||
[[DIK_A,DIK_D,DIK_LEFT,DIK_RIGHT], _interrupt] call _addArray;
|
||||
// [[DIK_INSERT], {DZE_Q_alt = true;}] call _addArray;
|
||||
[[DIK_INSERT], {if (isNil "DZE_buildItem") then {DZE_Q_alt = true;}}] call _addArray;
|
||||
|
||||
// [[DIK_A, DIK_D, DIK_LEFT, DIK_RIGHT], _interrupt] call _addArray;
|
||||
[[DIK_F], _dze_f] call _addArray;
|
||||
[[DIK_PRIOR], _dze_q] call _addArray;
|
||||
[[DIK_NEXT], _dze_z] call _addArray;
|
||||
[[DIK_Q], {DZE_4 = true;}] call _addArray;
|
||||
[[DIK_E], {DZE_6 = true;}] call _addArray;
|
||||
[[DIK_P], _dze_p] call _addArray;
|
||||
[[DIK_T], _dze_t] call _addarray; // terrain mode
|
||||
[[DIK_L], _dze_l] call _addarray; // local mode
|
||||
[[DIK_H], _dze_h] call _addarray; // hide/unhide panel
|
||||
[[DIK_MINUS], {DZE_MINUS = true;}] call _addArray; // decrease degrees (-)
|
||||
[[DIK_EQUALS], {DZE_PLUS = true;}] call _addArray; // increase degrees (=+)
|
||||
[[DIK_BACK], _dze_back] call _addarray;
|
||||
[[DIK_PRIOR], _dze_PgUp] call _addArray;
|
||||
[[DIK_NEXT], _dze_PgDn] call _addArray;
|
||||
|
||||
[[DIK_0], _autoRun] call _addArray;
|
||||
[[DIK_NUMPADMINUS,DIK_LSHIFT], _filterCheat] call _addArray;
|
||||
[[DIK_SPACE], {DZE_5 = true;}] call _addArray;
|
||||
[actionKeys "User6", {DZE_F = true;}] call _addArray;
|
||||
[actionKeys "User7", {DZE_Q_ctrl = true;}] call _addArray;
|
||||
[actionKeys "User8", {DZE_Z_ctrl = true;}] call _addArray;
|
||||
[actionKeys "User13", {DZE_Q_alt = true;}] call _addArray;
|
||||
[actionKeys "User14", {DZE_Z_alt = true;}] call _addArray;
|
||||
// [actionKeys "User7", {DZE_Q_ctrl = true;}] call _addArray;
|
||||
// [actionKeys "User8", {DZE_Z_ctrl = true;}] call _addArray;
|
||||
// [actionKeys "User13", {DZE_Q_alt = true;}] call _addArray;
|
||||
// [actionKeys "User14", {DZE_Z_alt = true;}] call _addArray;
|
||||
[actionKeys "User7", {if (isNil "DZE_buildItem") then {DZE_Q_ctrl = true;}}] call _addArray;
|
||||
[actionKeys "User8", {if (isNil "DZE_buildItem") then {DZE_Z_ctrl = true;}}] call _addArray;
|
||||
[actionKeys "User13", {if (isNil "DZE_buildItem") then {DZE_Q_alt = true;}}] call _addArray;
|
||||
[actionKeys "User14", {if (isNil "DZE_buildItem") then {DZE_Z_alt = true;}}] call _addArray;
|
||||
[actionKeys "User15", {DZE_Q = true;}] call _addArray;
|
||||
[actionKeys "User16", {DZE_Z = true;}] call _addArray;
|
||||
[actionKeys "User17", {DZE_4 = true;}] call _addArray;
|
||||
@@ -216,12 +325,20 @@ if (isNil "keyboard_keys") then {
|
||||
[actionKeys "Gear", _gear] call _addArray;
|
||||
[actionKeys "Prone", _drop] call _addArray;
|
||||
[actionKeys "Crouch", _drop] call _addArray;
|
||||
[actionKeys "MoveLeft", _interrupt] call _addArray;
|
||||
[actionKeys "MoveRight", _interrupt] call _addArray;
|
||||
[actionKeys "MoveForward", _interrupt] call _addArray;
|
||||
[actionKeys "MoveBack", _interrupt] call _addArray;
|
||||
[actionKeys "TurnLeft", _interrupt] call _addArray;
|
||||
[actionKeys "TurnRight", _interrupt] call _addArray;
|
||||
|
||||
[actionKeys "MoveLeft", _interrupt] call _addArray; // Delete Key
|
||||
[actionKeys "MoveRight", _interrupt] call _addArray; // End Key
|
||||
|
||||
[actionKeys "MoveForward", _interrupt] call _addArray; // W / Up Arrow Keys
|
||||
[actionKeys "MoveBack", _interrupt] call _addArray; // S / Down Arrow Keys
|
||||
[actionKeys "TurnLeft", _interrupt] call _addArray; // A / Left Arrow Keys
|
||||
[actionKeys "TurnRight", _interrupt] call _addArray; // D / Right Arrow Keys
|
||||
// keep these arrow keys directly below the move/turn action key entries
|
||||
[[DIK_UP], _dze_up] call _addArray;
|
||||
[[DIK_DOWN], _dze_down] call _addArray;
|
||||
[[DIK_LEFT], _dze_left] call _addArray;
|
||||
[[DIK_RIGHT], _dze_right] call _addArray;
|
||||
|
||||
[actionKeys "PushToTalk", _noise] call _addArray;
|
||||
[actionKeys "PushToTalkAll", _noise] call _addArray;
|
||||
[actionKeys "PushToTalkCommand", _noise] call _addArray;
|
||||
@@ -238,23 +355,25 @@ if (isNil "keyboard_keys") then {
|
||||
[actionKeys "NetworkStats", _journal] call _addArray;
|
||||
[[DIK_F1], _muteSound] call _addArray;
|
||||
[[DIK_F3], _statusUI] call _addArray;
|
||||
[[DIK_F4], {if (diag_tickTime - dayz_lastSave > 10) then {call player_forceSave;};_handled = true;}] call _addArray;
|
||||
[[DIK_TAB,DIK_DELETE], _forcesave] call _addArray;
|
||||
[[DIK_F5], {if (diag_tickTime - dayz_lastSave > 10) then {call player_forceSave;};_handled = true;}] call _addArray;
|
||||
// [[DIK_TAB, DIK_DELETE], {if (isNil "DZE_buildItem") then {call _forcesave;}}] call _addArray;
|
||||
[[DIK_TAB], _dze_tab] call _addArray;
|
||||
|
||||
[actionKeys "LeanLeft", {DZE_4 = true; dayz_dodge = true;}] call _addArray;
|
||||
[actionKeys "LeanRight", {DZE_6 = true; dayz_dodge = true;}] call _addArray;
|
||||
|
||||
[[DIK_Q], _dze_q] call _addArray;
|
||||
[[DIK_E], _dze_e] call _addArray;
|
||||
|
||||
[actionKeys "GetOver", _bunnyhop] call _addArray; // V
|
||||
[actionKeys "ForceCommandingMode", {DZE_5 = true;_handled = true;}] call _addArray;
|
||||
[[ DIK_F9,DIK_F10,DIK_F11,DIK_F12,
|
||||
DIK_F8,DIK_F7,DIK_F6,DIK_F5,
|
||||
DIK_F2,DIK_9,
|
||||
DIK_8,DIK_7,DIK_6,DIK_5,DIK_4,DIK_BACK], _block] call _addArray;
|
||||
[actionKeys "ForceCommandingMode", {DZE_5 = true; _handled = true;}] call _addArray;
|
||||
[[DIK_F2, DIK_F6, DIK_F7, DIK_F8, DIK_F9, DIK_F10, DIK_F11, DIK_F12, DIK_4, DIK_5, DIK_6, DIK_7, DIK_8, DIK_9], _block] call _addArray;
|
||||
if (dayz_groupSystem) then {
|
||||
[[DIK_F5], _openGroups] call _addArray;
|
||||
[[DIK_LWIN,DIK_RWIN], {dayz_groupNameTags = !dayz_groupNameTags;_handled = true;}] call _addArray;
|
||||
[[DIK_LWIN, DIK_RWIN], {dayz_groupNameTags = !dayz_groupNameTags; _handled = true;}] call _addArray;
|
||||
[actionKeys "TacticalView", _block] call _addArray;
|
||||
};
|
||||
[actionKeys "DSInterface", _block] call _addArray;
|
||||
[[DIK_P], {if (_shiftState) then {_handled = true;};}] call _addArray;
|
||||
//diag_log "keyboard_keys reset";
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user