Update keyboard eventhandler and add rules.sqf

See: https://github.com/EpochModTeam/DayZ-Epoch/pull/1673
This commit is contained in:
ebaydayz
2016-02-16 21:59:01 -05:00
parent 23179c079f
commit 441e9fb231
84 changed files with 1530 additions and 245 deletions

View File

@@ -20,7 +20,6 @@ if (!isDedicated) then {
player_dumpBackpack = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\player_dumpBackpack.sqf";
building_spawnLoot = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\building_spawnLoot.sqf";
building_spawnZombies = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\building_spawnZombies.sqf";
dayz_spaceInterrupt = compile preprocessFileLineNumbers "\z\addons\dayz_code\actions\dayz_spaceInterrupt.sqf";
player_fired = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\player_fired.sqf"; //Runs when player fires. Alerts nearby Zeds depending on calibre && audial rating
player_harvest = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\player_harvest.sqf";
player_packTent = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\player_packTent.sqf";
@@ -118,6 +117,7 @@ if (!isDedicated) then {
player_wearClothes = compile preprocessFileLineNumbers "\z\addons\dayz_code\actions\player_wearClothes.sqf";
object_pickup = compile preprocessFileLineNumbers "\z\addons\dayz_code\actions\object_pickup.sqf";
player_switchWeapon = compile preprocessFileLineNumbers "\z\addons\dayz_code\actions\player_switchWeapon.sqf";
player_flipvehicle = compile preprocessFileLineNumbers "\z\addons\dayz_code\actions\player_flipvehicle.sqf";
player_sleep = compile preprocessFileLineNumbers "\z\addons\dayz_code\actions\player_sleep.sqf";
player_antiWall = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\player_antiWall.sqf";
@@ -138,7 +138,7 @@ if (!isDedicated) then {
player_spawn_1 = compile preprocessFileLineNumbers "\z\addons\dayz_code\system\player_spawn_1.sqf";
player_spawn_2 = compile preprocessFileLineNumbers "\z\addons\dayz_code\system\player_spawn_2.sqf";
onPreloadStarted "dayz_preloadFinished = false;";
onPreloadFinished "dayz_preloadFinished = true;";
onPreloadFinished "if (!isNil 'init_keyboard') then { [] spawn init_keyboard; }; dayz_preloadFinished = true;";
// helper functions
player_hasTools = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\fn_hasTools.sqf";
@@ -641,6 +641,12 @@ if (!isDedicated) then {
];
_medical
};
init_keyboard = {
waituntil {!(isNull (findDisplay 46))};
keyboard_keys = nil;
[controlNull, 1, false,false,false] call compile preprocessFileLineNumbers (MISSION_ROOT+'keyboard.sqf');
};
//Server Only
if (isServer) then {

View File

@@ -196,6 +196,7 @@ if (isNil "Dayz_Dark_UI") then {
//Player self-action handles
dayz_resetSelfActions = {
s_player_equip_carry = -1;
s_player_fire = -1;
s_player_cook = -1;
s_player_boil = -1;
@@ -288,6 +289,8 @@ r_action = false;
r_action_unload = false;
r_player_handler = false;
r_player_handler1 = false;
r_player_unconsciousInProgress = false;
r_player_unconsciousInputDisabled = false;
r_player_dead = false;
r_player_unconscious = false;
r_player_infected = false;
@@ -452,6 +455,9 @@ dayz_cantseeDist = 150; // distance from which we can spawn a Z in front of any
dayz_cantseefov = 70; // half player field-of-view. Visible Z won't be spawned in front of any near players
dayz_canDelete = 300; // Z, further than this distance from its "owner", will be deleted
if(isNil "dayz_quickSwitch") then {
dayz_quickSwitch = false; //Enable quick weapon switch,
};
if(isNil "DZE_SelfTransfuse") then {
DZE_SelfTransfuse = false;
};
@@ -749,7 +755,8 @@ if(!isDedicated) then {
//if (uiNamespace getVariable ['DZ_displayUI', 0] == 2) then {
// dayzDebug = true;
//};
dayz_onBack = "";
dayz_onBackActive = false;
DZE_ActionInProgress = false;
// DayZ Epoch Client only variables
@@ -819,4 +826,5 @@ if(!isDedicated) then {
DZE_InRadiationZone = false;
DZE_SaveTime = 30;
Dayz_constructionContext = [];
};