mirror of
https://github.com/EpochModTeam/DayZ-Epoch.git
synced 2025-12-18 01:30:26 +03:00
@@ -103,7 +103,7 @@ _enoughMoney = false;
|
||||
_moneyInfo = [false, [], [], [], 0];
|
||||
|
||||
if (Z_SingleCurrency) then {
|
||||
_enoughMoney = if (_wealth >= _priceToBuy) then { true } else { false };
|
||||
_enoughMoney = (_wealth >= _priceToBuy);
|
||||
} else {
|
||||
_moneyInfo = _priceToBuy call Z_canAfford;
|
||||
_enoughMoney = _moneyInfo select 0;
|
||||
@@ -212,7 +212,7 @@ if (_enoughMoney) then {
|
||||
if (_x select 1 == "trade_weapons") then {
|
||||
_count = 0;
|
||||
while {_count < (_x select 9)} do {
|
||||
_hasPrimary = if (primaryWeapon player != "") then {true} else {false};
|
||||
_hasPrimary = (primaryWeapon player != "");
|
||||
if (_hasPrimary && getNumber (configFile >> "CfgWeapons" >> (_x select 0) >> "type") == 1) then {
|
||||
dayz_onBack = _x select 0; //Add to back
|
||||
} else {
|
||||
|
||||
@@ -16,7 +16,7 @@ a_player_boil = true;
|
||||
player removeAction s_player_boil;
|
||||
//s_player_boil = -1;
|
||||
|
||||
//_bottleInfected = if ("ItemWaterBottleInfected" in magazines player) then {true} else {false};
|
||||
//_bottleInfected = ("ItemWaterBottleInfected" in magazines player);
|
||||
|
||||
/* //canteens are metal, we only use canteens in Epoch
|
||||
_hastinitem = false;
|
||||
@@ -25,7 +25,7 @@ _hastinitem = false;
|
||||
if (_x in magazines player) exitWith {_hastinitem = true;};
|
||||
} count boil_tin_cans;
|
||||
|
||||
if (!_hastinitem) exitWith {format[localize "str_player_31",_tintext,localize "str_player_31_fill"] call dayz_rollingMessages; a_player_boil = false;};
|
||||
if (!_hastinitem) exitWith {format[localize "str_player_31",_tintext,localize "str_player_31_fill"] call dayz_rollingMessages; a_player_boil = false; dayz_actionInProgress = false;};
|
||||
*/
|
||||
if (_qty > 0) then {
|
||||
player playActionNow "Medic";
|
||||
|
||||
@@ -64,7 +64,7 @@ _maintain = {
|
||||
_wealth = player getVariable[Z_MoneyVariable,0];
|
||||
|
||||
if (Z_SingleCurrency) then {
|
||||
_enoughMoney = if (_wealth >= _amount) then { true } else { false };
|
||||
_enoughMoney = (_wealth >= _amount);
|
||||
} else {
|
||||
Z_Selling = false; // Initialize gem currency before Z_canAfford.
|
||||
_moneyInfo = _amount call Z_canAfford;
|
||||
|
||||
@@ -34,7 +34,7 @@ if (_classname isKindOf "TrapBear") exitWith { deleteVehicle _holder; };
|
||||
player playActionNow "PutDown";
|
||||
|
||||
//Adding random chance of arrow is re-usable on pickup
|
||||
_broken = if ((_classname == "1Rnd_Arrow_Wood") && {[0.15] call fn_chance}) then {true} else {false};
|
||||
_broken = ((_classname == "1Rnd_Arrow_Wood") && {[0.15] call fn_chance});
|
||||
if (_broken) exitWith { deleteVehicle _holder; localize "str_broken_arrow" call dayz_rollingMessages; };
|
||||
|
||||
_claimedBy = _holder getVariable["claimed","0"];
|
||||
|
||||
@@ -74,7 +74,6 @@ if (_hasInput) then {
|
||||
player playActionNow "PutDown";
|
||||
|
||||
//Hack to get craft menu to use build needs a good tidy up
|
||||
[_orignalClass,"Build","ItemActions"] spawn player_build;
|
||||
dayz_actionInProgress = true;
|
||||
[_orignalClass,"Build","ItemActions"] spawn player_build;
|
||||
};
|
||||
};
|
||||
@@ -44,7 +44,7 @@ if (_byPassChecks == "") then { _byPassChecks = "BaseItems" };
|
||||
if (_ghost == "") then { _ghost = _classname; };
|
||||
|
||||
//Remove tents and stashes from new collision system until we find a better way then build tent for hiding items.
|
||||
_isCollisionBypass = if (isText (configFile >> _isClass >> _item >> _classType >> _action >> "bypassCollision")) then { true } else { false };
|
||||
_isCollisionBypass = (isText (configFile >> _isClass >> _item >> _classType >> _action >> "bypassCollision"));
|
||||
|
||||
_text = getText (configFile >> "CfgVehicles" >> _classname >> "displayName");
|
||||
_keepOnSlope = 0 == (getNumber (configFile >> "CfgVehicles" >> _classname >> "canbevertical"));
|
||||
|
||||
@@ -74,7 +74,7 @@ if (_canDo) then {
|
||||
_selectedRecipeTools = getArray (configFile >> _baseClass >> _item >> "ItemActions" >> _crafting >> "requiretools");
|
||||
_selectedRecipeOutput = getArray (configFile >> _baseClass >> _item >> "ItemActions" >> _crafting >> "output");
|
||||
_selectedRecipeInput = getArray (configFile >> _baseClass >> _item >> "ItemActions" >> _crafting >> "input");
|
||||
_selectedRecipeInputStrict = if ((isNumber (configFile >> _baseClass >> _item >> "ItemActions" >> _crafting >> "inputstrict")) && (getNumber (configFile >> _baseClass >> _item >> "ItemActions" >> _crafting >> "inputstrict") > 0)) then {true} else {false};
|
||||
_selectedRecipeInputStrict = ((isNumber (configFile >> _baseClass >> _item >> "ItemActions" >> _crafting >> "inputstrict")) && (getNumber (configFile >> _baseClass >> _item >> "ItemActions" >> _crafting >> "inputstrict") > 0));
|
||||
_outputWeapons = getArray (configFile >> _baseClass >> _item >> "ItemActions" >> _crafting >> "outputweapons");
|
||||
_inputWeapons = getArray (configFile >> _baseClass >> _item >> "ItemActions" >> _crafting >> "inputweapons");
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@ _config = configFile >> "CfgWeapons" >> _item;
|
||||
_droppedType = getText (_config >> "droppeditem");
|
||||
|
||||
_onLadder = (getNumber (configFile >> "CfgMovesMaleSdr" >> "States" >> (animationState player) >> "onLadder")) == 1;
|
||||
if (_onLadder) exitWith { localize "str_player_21" call dayz_rollingMessages; dayz_actionInProgress = false; };
|
||||
if (_onLadder) exitWith { localize "str_player_21" call dayz_rollingMessages; };
|
||||
if (dayz_actionInProgress) exitWith { localize "str_player_actionslimit" call dayz_rollingMessages; };
|
||||
dayz_actionInProgress = true;
|
||||
|
||||
|
||||
@@ -1,3 +1,6 @@
|
||||
if (dayz_actionInProgress) exitWith {localize "str_player_actionslimit" call dayz_rollingMessages;};
|
||||
dayz_actionInProgress = true;
|
||||
|
||||
private ["_playArray","_lastRest","_blood","_timesincedrink","_bloodinc","_Moves","_sleepArray","_animState","_started","_finished","_timer","_i","_r","_cureAttempt","_isAsleep","_cureChance","_infectedStatus","_randomamount","_isOwner","_tent"];
|
||||
//_timesincedrink = time - dayz_lastDrink;
|
||||
//_bloodinc =100; Removed for now(untested) due to it not needed yet
|
||||
@@ -11,7 +14,7 @@ player playmove "AidlPpneMstpSnonWnonDnon_SleepC_sleep";
|
||||
|
||||
_sleeping = player getVariable ["sleeping",false];
|
||||
|
||||
if (_sleeping) exitwith {};
|
||||
if (_sleeping) exitWith {dayz_actionInProgress = false;};
|
||||
|
||||
player setVariable ["sleeping",true];
|
||||
|
||||
@@ -105,6 +108,7 @@ if (r_interrupt) then {
|
||||
};
|
||||
|
||||
player setVariable ["sleeping",false];
|
||||
dayz_actionInProgress = false;
|
||||
|
||||
//Removed due to player sync returning []
|
||||
//PVDZ_plr_Save = [player,nil,true,dayz_playerAchievements];
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
scriptName "Functions\misc\fn_damageActions.sqf";
|
||||
if (dayz_actionInProgress) exitWith {};
|
||||
|
||||
#include "\z\addons\dayz_code\util\array.hpp";
|
||||
|
||||
/***********************************************************
|
||||
|
||||
@@ -4,7 +4,6 @@ scriptName "Functions\misc\fn_selfActions.sqf";
|
||||
- Function
|
||||
- [] call fnc_usec_selfActions;
|
||||
************************************************************/
|
||||
if (dayz_actionInProgress) exitWith {};
|
||||
private ["_canPickLight","_text","_unlock","_lock","_totalKeys","_temp_keys","_temp_keys_names",
|
||||
"_hasKey","_oldOwner","_hasAttached","_isZombie","_isHarvested","_isMan","_isFuel","_hasRawMeat","_hastinitem","_player_deleteBuild",
|
||||
"_player_lockUnlock_crtl","_displayName","_hasIgnitors","_menu","_menu1","_allowTow","_liftHeli","_found","_posL","_posC","_height","_attached",
|
||||
|
||||
@@ -43,7 +43,7 @@ _difference = 0;
|
||||
_isinbuilding = false;
|
||||
_isinvehicle = false;
|
||||
|
||||
_raining = if(rain > 0) then {true} else {false};
|
||||
_raining = (rain > 0);
|
||||
_sunrise = call world_sunRise;
|
||||
|
||||
//POSITIV EFFECTS
|
||||
|
||||
@@ -23,9 +23,9 @@ if (time - dayz_lastCheckSave > 10) then {
|
||||
while {(!isNull _display) && !r_player_dead} do {
|
||||
_timeout = 30;
|
||||
_timeout = player getVariable["combattimeout", 0];
|
||||
_inCombat = if (_timeout >= diag_tickTime) then {true} else {false};
|
||||
_playerCheck = if ({isPlayer _x} count (player nearEntities ["AllVehicles",5]) > 1) then {true} else {false};
|
||||
_zedCheck = if ((count (player nearEntities ["zZombie_Base",10]) > 0) && !_isPZombie) then {true} else {false};
|
||||
_inCombat = (_timeout >= diag_tickTime);
|
||||
_playerCheck = ({isPlayer _x} count (player nearEntities ["AllVehicles",5]) > 1);
|
||||
_zedCheck = ((count (player nearEntities ["zZombie_Base",10]) > 0) && !_isPZombie);
|
||||
_gearDisplay = findDisplay 106;
|
||||
if (!isNull _gearDisplay) then {
|
||||
_gearDisplay closeDisplay 0;
|
||||
|
||||
@@ -2,8 +2,11 @@
|
||||
|
||||
sched_playerActions = {
|
||||
HIDE_FSM_VARS
|
||||
call fnc_usec_selfActions;
|
||||
call fnc_usec_damageActions;
|
||||
|
||||
if (!dayz_actionInProgress) then {
|
||||
call fnc_usec_selfActions;
|
||||
call fnc_usec_damageActions;
|
||||
};
|
||||
|
||||
//combat check
|
||||
if ((player getVariable ["combattimeout",0] < diag_tickTime) && {player getVariable ["inCombat",false]}) then {
|
||||
|
||||
Reference in New Issue
Block a user