mirror of
https://github.com/EpochModTeam/DayZ-Epoch.git
synced 2025-12-21 19:06:29 +03:00
Consolidate DZE_ActionInProgress and r_action_count to one variable
There is no point in having two variables for the same purpose. It is also pointless to keep an action count tally like r_action_count was doing, since it is only ever checked for being 0 or 1. Any count higher or lower than that is irrelevant. I will make this change in vanilla too.
This commit is contained in:
@@ -6,7 +6,7 @@ if (isNil "Z_traderData" || count (Z_traderData) == 0) exitWith {
|
||||
localize "STR_EPOCH_TRADE_ERROR" call dayz_rollingMessages;
|
||||
};
|
||||
|
||||
if (DZE_ActionInProgress) exitWith { localize "str_player_actionslimit" call dayz_rollingMessages; };
|
||||
if (dayz_actionInProgress) exitWith { localize "str_player_actionslimit" call dayz_rollingMessages; };
|
||||
|
||||
if (isNil "Z_AdvancedTradingInit") then {
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
private ["_bottletext","_tin1text","_tin2text","_tintext","_hasbottleitem","_hastinitem","_qty","_dis","_sfx","_bottleInfected"];
|
||||
|
||||
if (DZE_ActionInProgress) exitWith {localize "str_epoch_player_22" call dayz_rollingMessages;};
|
||||
DZE_ActionInProgress = true;
|
||||
if (dayz_actionInProgress) exitWith {localize "str_epoch_player_22" call dayz_rollingMessages;};
|
||||
dayz_actionInProgress = true;
|
||||
|
||||
_bottletext = getText (configFile >> "CfgMagazines" >> "ItemWaterBottle" >> "displayName");
|
||||
_tin1text = getText (configFile >> "CfgMagazines" >> "TrashTinCan" >> "displayName");
|
||||
@@ -61,4 +61,4 @@ if (_hasbottleitem and _hastinitem) then {
|
||||
};
|
||||
|
||||
a_player_boil = false;
|
||||
DZE_ActionInProgress = false;
|
||||
dayz_actionInProgress = false;
|
||||
@@ -1,6 +1,6 @@
|
||||
private ["_rawmeat","_cookedmeat","_meat","_meatcooked","_text","_qty","_dis","_sfx"];
|
||||
if (DZE_ActionInProgress) exitWith {localize "str_epoch_player_23" call dayz_rollingMessages;};
|
||||
DZE_ActionInProgress = true;
|
||||
if (dayz_actionInProgress) exitWith {localize "str_epoch_player_23" call dayz_rollingMessages;};
|
||||
dayz_actionInProgress = true;
|
||||
//diag_log ("Cook Enabled");
|
||||
player removeAction s_player_cook;
|
||||
s_player_cook = -1;
|
||||
@@ -33,4 +33,4 @@ a_player_cooking = true;
|
||||
} forEach _rawmeat;
|
||||
|
||||
a_player_cooking = false;
|
||||
DZE_ActionInProgress = false;
|
||||
dayz_actionInProgress = false;
|
||||
@@ -1,7 +1,7 @@
|
||||
private ["_vehicle","_curFuel","_newFuel","_started","_finished","_animState","_isMedic","_abort","_canSize","_configVeh","_capacity","_nameText","_isOk","_findNearestVehicles","_findNearestVehicle","_IsNearVehicle","_isVehicle","_configSrcVeh","_capacitySrc","_nameTextSrc","_isFillok","_curFuelSrc","_newFuelSrc","_vehicleSrc"];
|
||||
|
||||
if (DZE_ActionInProgress) exitWith {localize "str_epoch_player_24" call dayz_rollingMessages;};
|
||||
DZE_ActionInProgress = true;
|
||||
if (dayz_actionInProgress) exitWith {localize "str_epoch_player_24" call dayz_rollingMessages;};
|
||||
dayz_actionInProgress = true;
|
||||
|
||||
_isVehicle = false;
|
||||
|
||||
@@ -149,4 +149,4 @@ if(_IsNearVehicle >= 1) then {
|
||||
} else {
|
||||
localize "str_epoch_player_27" call dayz_rollingMessages;
|
||||
};
|
||||
DZE_ActionInProgress = false;
|
||||
dayz_actionInProgress = false;
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
private ["_vehicle","_started","_finished","_animState","_isMedic","_soundSource","_fuelCan","_emptyCan"];
|
||||
|
||||
if (DZE_ActionInProgress) exitWith {localize "str_epoch_player_24" call dayz_rollingMessages;};
|
||||
DZE_ActionInProgress = true;
|
||||
if (dayz_actionInProgress) exitWith {localize "str_epoch_player_24" call dayz_rollingMessages;};
|
||||
dayz_actionInProgress = true;
|
||||
|
||||
player removeAction s_player_fillgen;
|
||||
s_player_fillgen = 1;
|
||||
@@ -93,5 +93,5 @@ if (_finished) then {
|
||||
};
|
||||
};
|
||||
|
||||
DZE_ActionInProgress = false;
|
||||
dayz_actionInProgress = false;
|
||||
s_player_fillgen = -1;
|
||||
@@ -1,6 +1,6 @@
|
||||
private ["_item","_type","_hasHarvested","_config","_knifeArray","_PlayerNear","_isListed","_activeKnife","_text","_dis","_sfx","_sharpnessRemaining","_qty","_chance","_string"];
|
||||
if (DZE_ActionInProgress) exitWith {localize "str_epoch_player_29" call dayz_rollingMessages;};
|
||||
DZE_ActionInProgress = true;
|
||||
if (dayz_actionInProgress) exitWith {localize "str_epoch_player_29" call dayz_rollingMessages;};
|
||||
dayz_actionInProgress = true;
|
||||
|
||||
_item = _this select 3;
|
||||
_type = typeOf _item;
|
||||
@@ -13,7 +13,7 @@ player removeAction s_player_butcher;
|
||||
s_player_butcher = -1;
|
||||
|
||||
_PlayerNear = {isPlayer _x} count ((getPosATL _item) nearEntities ["CAManBase", 10]) > 1;
|
||||
if (_PlayerNear) exitWith {localize "str_pickup_limit_5" call dayz_rollingMessages; DZE_ActionInProgress = false;};
|
||||
if (_PlayerNear) exitWith {localize "str_pickup_limit_5" call dayz_rollingMessages; dayz_actionInProgress = false;};
|
||||
|
||||
//Count how many active tools the player has
|
||||
{
|
||||
@@ -22,7 +22,7 @@ if (_PlayerNear) exitWith {localize "str_pickup_limit_5" call dayz_rollingMessag
|
||||
};
|
||||
} count Dayz_Gutting;
|
||||
|
||||
if ((count _knifeArray) < 1) exitWith { localize "str_cannotgut" call dayz_rollingMessages; DZE_ActionInProgress = false; };
|
||||
if ((count _knifeArray) < 1) exitWith { localize "str_cannotgut" call dayz_rollingMessages; dayz_actionInProgress = false; };
|
||||
|
||||
|
||||
if ((count _knifeArray > 0) and !_hasHarvested) then {
|
||||
@@ -91,4 +91,4 @@ if ((count _knifeArray > 0) and !_hasHarvested) then {
|
||||
uiSleep 0.02;
|
||||
_string call dayz_rollingMessages;
|
||||
};
|
||||
DZE_ActionInProgress = false;
|
||||
dayz_actionInProgress = false;
|
||||
@@ -1,6 +1,6 @@
|
||||
private ["_item","_type","_hasHarvested","_config","_knifeArray","_playerNear","_isListed","_activeKnife","_text","_sharpnessRemaining","_qty","_chance","_string"];
|
||||
if (DZE_ActionInProgress) exitWith {localize "str_epoch_player_31" call dayz_rollingMessages;};
|
||||
DZE_ActionInProgress = true;
|
||||
if (dayz_actionInProgress) exitWith {localize "str_epoch_player_31" call dayz_rollingMessages;};
|
||||
dayz_actionInProgress = true;
|
||||
|
||||
_item = _this select 3;
|
||||
_type = typeOf _item;
|
||||
@@ -11,14 +11,14 @@ player removeAction s_player_butcher;
|
||||
s_player_butcher = -1;
|
||||
|
||||
_playerNear = {isPlayer _x} count ((getPosATL _item) nearEntities ["CAManBase", 10]) > 1;
|
||||
if (_playerNear) exitWith {localize "str_pickup_limit_5" call dayz_rollingMessages; DZE_ActionInProgress = false;};
|
||||
if (_playerNear) exitWith {localize "str_pickup_limit_5" call dayz_rollingMessages; dayz_actionInProgress = false;};
|
||||
|
||||
//Count how many active tools the player has
|
||||
{
|
||||
if (_x in items player) then {_knifeArray set [count _knifeArray, _x];};
|
||||
} count Dayz_Gutting;
|
||||
|
||||
if ((count _knifeArray) < 1) exitWith {format[localize "str_missing_to_do_this",localize "STR_EQUIP_NAME_4"] call dayz_rollingMessages; DZE_ActionInProgress = false; };
|
||||
if ((count _knifeArray) < 1) exitWith {format[localize "str_missing_to_do_this",localize "STR_EQUIP_NAME_4"] call dayz_rollingMessages; dayz_actionInProgress = false; };
|
||||
|
||||
if ((count _knifeArray > 0) && !_hasHarvested) then {
|
||||
private "_qty";
|
||||
@@ -80,4 +80,4 @@ if ((count _knifeArray > 0) && !_hasHarvested) then {
|
||||
uiSleep 0.02;
|
||||
_string call dayz_rollingMessages;
|
||||
};
|
||||
DZE_ActionInProgress = false;
|
||||
dayz_actionInProgress = false;
|
||||
@@ -1,8 +1,8 @@
|
||||
private ["_vehicle","_removed"];
|
||||
_vehicle = _this select 3;
|
||||
|
||||
if (DZE_ActionInProgress) exitWith {localize "str_epoch_player_32" call dayz_rollingMessages;};
|
||||
DZE_ActionInProgress = true;
|
||||
if (dayz_actionInProgress) exitWith {localize "str_epoch_player_32" call dayz_rollingMessages;};
|
||||
dayz_actionInProgress = true;
|
||||
|
||||
{player removeAction _x} count s_player_lockunlock;s_player_lockunlock = [];
|
||||
s_player_lockUnlock_crtl = 1;
|
||||
@@ -31,4 +31,4 @@ if (_removed == 1) then {
|
||||
|
||||
s_player_lockUnlock_crtl = -1;
|
||||
s_player_lockUnlockInside_ctrl = -1;
|
||||
DZE_ActionInProgress = false;
|
||||
dayz_actionInProgress = false;
|
||||
@@ -1,5 +1,5 @@
|
||||
if (DZE_ActionInProgress) exitWith {localize "str_epoch_player_34" call dayz_rollingMessages;};
|
||||
DZE_ActionInProgress = true;
|
||||
if (dayz_actionInProgress) exitWith {localize "str_epoch_player_34" call dayz_rollingMessages;};
|
||||
dayz_actionInProgress = true;
|
||||
private ["_qty","_dis","_sfx","_started","_finished","_animState","_isRefuel","_fuelcans","_qty20","_qty5","_qty40","_magazines","_cursorTarget","_fuelAmount"];
|
||||
|
||||
player removeAction s_player_fillfuel;
|
||||
@@ -102,4 +102,4 @@ if (("ItemJerrycanEmpty" in _magazines) or ("ItemFuelcanEmpty" in _magazines) or
|
||||
} else {
|
||||
localize "str_player_10" call dayz_rollingMessages;
|
||||
};
|
||||
DZE_ActionInProgress = false;
|
||||
dayz_actionInProgress = false;
|
||||
@@ -1,8 +1,8 @@
|
||||
private["_vehicle"];
|
||||
_vehicle = _this select 3;
|
||||
|
||||
if (DZE_ActionInProgress) exitWith {localize "str_epoch_player_37" call dayz_rollingMessages;};
|
||||
DZE_ActionInProgress = true;
|
||||
if (dayz_actionInProgress) exitWith {localize "str_epoch_player_37" call dayz_rollingMessages;};
|
||||
dayz_actionInProgress = true;
|
||||
|
||||
{player removeAction _x} count s_player_lockunlock;s_player_lockunlock = [];
|
||||
s_player_lockUnlock_crtl = 1;
|
||||
@@ -20,4 +20,4 @@ if(player distance _vehicle < 10) then {
|
||||
|
||||
s_player_lockUnlock_crtl = -1;
|
||||
s_player_lockUnlockInside_ctrl = -1;
|
||||
DZE_ActionInProgress = false;
|
||||
dayz_actionInProgress = false;
|
||||
@@ -3,9 +3,9 @@ if (!isNil "_this" && {typeName _this == "ARRAY"} && {count _this > 0}) exitWith
|
||||
private ["_abort","_reason","_distance","_isNear","_lockable","_isAllowedUnderGround","_offset","_classname","_zheightdirection","_zheightchanged","_rotate","_objectHelperPos","_objectHelperDir","_objHDiff","_position","_isOk","_dir","_vector","_cancel","_location2","_buildOffset","_location","_limit","_started","_finished","_animState","_isMedic","_proceed","_counter","_dis","_sfx","_combination_1_Display","_combination_1","_combination_2","_combination_3","_combination","_combinationDisplay","_combination_4","_num_removed","_tmpbuilt","_vUp","_classnametmp","_text","_ghost","_objectHelper","_location1","_object","_helperColor","_canDo","_pos","_onLadder","_vehicle","_inVehicle","_needNear","_canBuild"];
|
||||
|
||||
//Check if building already in progress, exit if so.
|
||||
if (DZE_ActionInProgress || {r_action_count > 0}) exitWith {localize "str_epoch_player_40" call dayz_rollingMessages;};
|
||||
DZE_ActionInProgress = true;
|
||||
r_action_count = r_action_count + 1;
|
||||
if (dayz_actionInProgress) exitWith {localize "str_epoch_player_40" call dayz_rollingMessages;};
|
||||
dayz_actionInProgress = true;
|
||||
|
||||
_pos = [player] call FNC_GetPos;
|
||||
|
||||
_onLadder = (getNumber (configFile >> "CfgMovesMaleSdr" >> "States" >> (animationState player) >> "onLadder")) == 1;
|
||||
@@ -38,10 +38,10 @@ DZE_memLeftRight = 0;
|
||||
call gear_ui_init;
|
||||
closeDialog 1;
|
||||
|
||||
if (dayz_isSwimming) exitWith {r_action_count = 0; DZE_ActionInProgress = false; localize "str_player_26" call dayz_rollingMessages;};
|
||||
if (_inVehicle) exitWith {r_action_count = 0; DZE_ActionInProgress = false; localize "str_epoch_player_42" call dayz_rollingMessages;};
|
||||
if (_onLadder) exitWith {r_action_count = 0; DZE_ActionInProgress = false; localize "str_player_21" call dayz_rollingMessages;};
|
||||
if (player getVariable["combattimeout",0] >= diag_tickTime) exitWith {r_action_count = 0; DZE_ActionInProgress = false; localize "str_epoch_player_43" call dayz_rollingMessages;};
|
||||
if (dayz_isSwimming) exitWith {dayz_actionInProgress = false; localize "str_player_26" call dayz_rollingMessages;};
|
||||
if (_inVehicle) exitWith {dayz_actionInProgress = false; localize "str_epoch_player_42" call dayz_rollingMessages;};
|
||||
if (_onLadder) exitWith {dayz_actionInProgress = false; localize "str_player_21" call dayz_rollingMessages;};
|
||||
if (player getVariable["combattimeout",0] >= diag_tickTime) exitWith {dayz_actionInProgress = false; localize "str_epoch_player_43" call dayz_rollingMessages;};
|
||||
|
||||
DZE_buildItem = _this; //This is a magazine! It's global to allow access to it from outside functions
|
||||
|
||||
@@ -85,8 +85,7 @@ _needNear = getArray (configFile >> "CfgMagazines" >> DZE_buildItem >> "ItemActi
|
||||
|
||||
if (_abort) exitWith {
|
||||
format[localize "str_epoch_player_135",_reason,_distance] call dayz_rollingMessages;
|
||||
DZE_ActionInProgress = false;
|
||||
r_action_count = 0;
|
||||
dayz_actionInProgress = false;
|
||||
};
|
||||
|
||||
_canBuild = [_pos, _this, true] call dze_buildChecks;
|
||||
@@ -588,5 +587,4 @@ if (_canBuild select 0) then {
|
||||
};
|
||||
};
|
||||
|
||||
DZE_ActionInProgress = false;
|
||||
r_action_count = 0;
|
||||
dayz_actionInProgress = false;
|
||||
@@ -80,10 +80,7 @@ if (_build) then {
|
||||
diag_log [diag_ticktime, __FILE__, "New Networked object, request to save to hive. PVDZ_obj_Publish:", PVDZ_obj_Publish];
|
||||
|
||||
format[localize "str_build_01",_text] call dayz_rollingMessages;
|
||||
r_action_count = 0;
|
||||
} else {
|
||||
r_action_count = 0;
|
||||
|
||||
} else {
|
||||
if ((!isNil "_ghost") and {(!isNull _ghost)}) then { deleteVehicle _ghost; };
|
||||
|
||||
{
|
||||
@@ -94,4 +91,4 @@ if (_build) then {
|
||||
format[localize "str_build_failed_02",_text] call dayz_rollingMessages;
|
||||
};
|
||||
|
||||
|
||||
dayz_actionInProgress = false;
|
||||
@@ -75,7 +75,6 @@ if (_hasInput) then {
|
||||
|
||||
//Hack to get craft menu to use build needs a good tidy up
|
||||
[_orignalClass,"Build","ItemActions"] spawn player_build;
|
||||
r_action_count = r_action_count + 1;
|
||||
|
||||
dayz_actionInProgress = true;
|
||||
};
|
||||
};
|
||||
@@ -1,5 +1,5 @@
|
||||
if (DZE_ActionInProgress) exitWith {localize "str_epoch_player_39" call dayz_rollingMessages;};
|
||||
DZE_ActionInProgress = true;
|
||||
if (dayz_actionInProgress) exitWith {localize "str_epoch_player_39" call dayz_rollingMessages;};
|
||||
dayz_actionInProgress = true;
|
||||
private ["_item","_config","_onLadder","_hastoolweapon","_onBack","_text","_create","_config2","_melee2tb","_isOk"];
|
||||
|
||||
disableSerialization;
|
||||
@@ -8,11 +8,11 @@ _config = configFile >> "cfgWeapons" >> _item;
|
||||
_onBack = dayz_onBack in MeleeWeapons;
|
||||
|
||||
_onLadder = (getNumber (configFile >> "CfgMovesMaleSdr" >> "States" >> (animationState player) >> "onLadder")) == 1;
|
||||
if (_onLadder) exitWith {localize "str_player_21" call dayz_rollingMessages; DZE_ActionInProgress = false;};
|
||||
if (_onLadder) exitWith {localize "str_player_21" call dayz_rollingMessages; dayz_actionInProgress = false;};
|
||||
|
||||
_hastoolweapon = _item in weapons player;
|
||||
_text = getText (_config >> "displayName");
|
||||
if (!_hastoolweapon and !_onBack) exitWith {format[localize "str_player_30",_text] call dayz_rollingMessages; DZE_ActionInProgress = false;};
|
||||
if (!_hastoolweapon and !_onBack) exitWith {format[localize "str_player_30",_text] call dayz_rollingMessages; dayz_actionInProgress = false;};
|
||||
|
||||
call gear_ui_init;
|
||||
|
||||
@@ -63,4 +63,4 @@ if (_isOk) then {
|
||||
closeDialog 0;
|
||||
localize "str_player_24" call dayz_rollingMessages;
|
||||
};
|
||||
DZE_ActionInProgress = false;
|
||||
dayz_actionInProgress = false;
|
||||
@@ -6,9 +6,8 @@ if (!isNil "_this" && {typeName _this == "ARRAY"} && {count _this > 0}) exitWith
|
||||
*/
|
||||
private ["_location","_pos","_dir","_classname","_item","_cancel","_reason","_started","_finished","_animState","_isMedic","_dis","_sfx","_tmpbuilt","_onLadder","_require","_text","_offset","_isOk","_location1","_location2","_counter","_limit","_proceed","_num_removed","_position","_object","_canBuildOnPlot","_distance","_classnametmp","_ghost","_lockable","_zheightchanged","_rotate","_combination_1","_combination_2","_combination_3","_combination_4","_combination","_combination_1_Display","_combinationDisplay","_zheightdirection","_abort","_isNear","_needNear","_vehicle","_inVehicle","_objHDiff","_isAllowedUnderGround","_canBuild"];
|
||||
|
||||
if (DZE_ActionInProgress || {r_action_count > 0}) exitWith {localize "str_epoch_player_40" call dayz_rollingMessages;};
|
||||
DZE_ActionInProgress = true;
|
||||
r_action_count = r_action_count + 1;
|
||||
if (dayz_actionInProgress) exitWith {localize "str_epoch_player_40" call dayz_rollingMessages;};
|
||||
dayz_actionInProgress = true;
|
||||
_pos = [player] call FNC_GetPos;
|
||||
|
||||
_onLadder = (getNumber (configFile >> "CfgMovesMaleSdr" >> "States" >> (animationState player) >> "onLadder")) == 1;
|
||||
@@ -37,10 +36,10 @@ DZE_cancelBuilding = false;
|
||||
call gear_ui_init;
|
||||
closeDialog 1;
|
||||
|
||||
if (dayz_isSwimming) exitWith {r_action_count = 0; DZE_ActionInProgress = false; localize "str_player_26" call dayz_rollingMessages;};
|
||||
if (_inVehicle) exitWith {r_action_count = 0; DZE_ActionInProgress = false; localize "str_epoch_player_42" call dayz_rollingMessages;};
|
||||
if (_onLadder) exitWith {r_action_count = 0; DZE_ActionInProgress = false; localize "str_player_21" call dayz_rollingMessages;};
|
||||
if (player getVariable["combattimeout",0] >= diag_tickTime) exitWith {r_action_count = 0; DZE_ActionInProgress = false; localize "str_epoch_player_43" call dayz_rollingMessages;};
|
||||
if (dayz_isSwimming) exitWith {dayz_actionInProgress = false; localize "str_player_26" call dayz_rollingMessages;};
|
||||
if (_inVehicle) exitWith {dayz_actionInProgress = false; localize "str_epoch_player_42" call dayz_rollingMessages;};
|
||||
if (_onLadder) exitWith {dayz_actionInProgress = false; localize "str_player_21" call dayz_rollingMessages;};
|
||||
if (player getVariable["combattimeout",0] >= diag_tickTime) exitWith {dayz_actionInProgress = false; localize "str_epoch_player_43" call dayz_rollingMessages;};
|
||||
|
||||
_item = _this;
|
||||
|
||||
@@ -85,8 +84,7 @@ _needNear = getArray (configFile >> "CfgMagazines" >> _item >> "ItemActions" >>
|
||||
|
||||
if(_abort) exitWith {
|
||||
format[localize "str_epoch_player_135",_reason,_distance] call dayz_rollingMessages;
|
||||
DZE_ActionInProgress = false;
|
||||
r_action_count = 0;
|
||||
dayz_actionInProgress = false;
|
||||
};
|
||||
|
||||
_canBuild = [_pos, _item, true] call dze_buildChecks;
|
||||
@@ -494,5 +492,4 @@ if (_canBuild select 0) then {
|
||||
};
|
||||
};
|
||||
|
||||
DZE_ActionInProgress = false;
|
||||
r_action_count = 0;
|
||||
dayz_actionInProgress = false;
|
||||
@@ -24,7 +24,7 @@ if (count _this > 2) then {
|
||||
};
|
||||
|
||||
_emergingLevel = 1.1;
|
||||
r_action_count = 1;
|
||||
dayz_actionInProgress = true;
|
||||
|
||||
_isClass = switch (1==1) do {
|
||||
case (isClass (configFile >> "CfgMagazines" >> _item)): {"CfgMagazines"};
|
||||
@@ -52,7 +52,7 @@ _onLadder = {getNumber (configFile >> "CfgMovesMaleSdr" >> "States" >> (animatio
|
||||
_isWater = {(surfaceIsWater (getPosATL _object)) or dayz_isSwimming};
|
||||
|
||||
if (0 != count Dayz_constructionContext) then {
|
||||
r_action_count = 0;
|
||||
dayz_actionInProgress = false;
|
||||
localize "str_already_building" call dayz_rollingMessages;
|
||||
diag_log [ diag_ticktime, __FILE__, 'already building, exiting', Dayz_constructionContext, typeName Dayz_constructionContext];
|
||||
};
|
||||
@@ -81,13 +81,13 @@ _missing = "";
|
||||
} count _requiredTools;
|
||||
|
||||
if (!_ok) exitWith {
|
||||
r_action_count = 0;
|
||||
dayz_actionInProgress = false;
|
||||
format[localize "str_player_31_missingtools",_text,_missing] call dayz_rollingMessages;
|
||||
};
|
||||
|
||||
_posReference = [player] call FNC_GetPos;
|
||||
_canBuild = [_posReference, _item, false] call DZE_BuildChecks;
|
||||
if !(_canBuild select 0) exitWith {r_action_count = 0;};
|
||||
if !(_canBuild select 0) exitWith {dayz_actionInProgress = false;};
|
||||
|
||||
// lets check player has requiredParts for upgrade
|
||||
_ok = true;
|
||||
@@ -105,7 +105,7 @@ _upgradeParts = [];
|
||||
|
||||
if (!_ok) exitWith {
|
||||
{ player addMagazine _x; } foreach _upgradeParts;
|
||||
r_action_count = 0;
|
||||
dayz_actionInProgress = false;
|
||||
format[localize "str_player_31", _missing, localize "str_player_31_build"] call dayz_rollingMessages;
|
||||
};
|
||||
|
||||
@@ -246,7 +246,7 @@ _position = getPosATL _object;
|
||||
_actionBuildHidden = true;
|
||||
_actionCancel = player addAction [localize "str_player_build_cancel", "\z\addons\dayz_code\actions\object_build.sqf", [_object, _requiredParts, _classname, _text, false, 0, "none"], 1, true, true, "", "0 != count Dayz_constructionContext"];
|
||||
|
||||
while {r_action_count != 0 and Dayz_constructionContext select 4} do {
|
||||
while {dayz_actionInProgress && Dayz_constructionContext select 4} do {
|
||||
|
||||
// force the angle so that the ghost is showing always the same side
|
||||
_angleRef=Dayz_constructionContext select 1;
|
||||
@@ -361,5 +361,5 @@ if (Dayz_constructionContext select 3) then { // "build" camera was on, switch i
|
||||
};
|
||||
|
||||
Dayz_constructionContext = [];
|
||||
r_action_count = 0;
|
||||
dayz_actionInProgress = false;
|
||||
//systemChat "Dayz_constructionContext reset";
|
||||
|
||||
@@ -4,8 +4,8 @@
|
||||
*/
|
||||
private ["_location","_dir","_classname","_text","_object","_objectID","_objectUID","_newclassname","_refund","_obj","_upgrade","_objectCharacterID","_ownerID","_i","_invResult","_itemOut","_countOut","_abortInvAdd","_addedItems"];
|
||||
|
||||
if (DZE_ActionInProgress) exitWith {localize "str_epoch_player_48" call dayz_rollingMessages;};
|
||||
DZE_ActionInProgress = true;
|
||||
if (dayz_actionInProgress) exitWith {localize "str_epoch_player_48" call dayz_rollingMessages;};
|
||||
dayz_actionInProgress = true;
|
||||
|
||||
player removeAction s_player_downgrade_build;
|
||||
s_player_downgrade_build = 1;
|
||||
@@ -17,7 +17,7 @@ _obj = _this select 3;
|
||||
_objectCharacterID = _obj getVariable ["CharacterID","0"];
|
||||
|
||||
|
||||
if (DZE_Lock_Door != _objectCharacterID) exitWith {DZE_ActionInProgress = false; localize "str_epoch_player_49" call dayz_rollingMessages;};
|
||||
if (DZE_Lock_Door != _objectCharacterID) exitWith {dayz_actionInProgress = false; localize "str_epoch_player_49" call dayz_rollingMessages;};
|
||||
|
||||
// Find objectID
|
||||
_objectID = _obj getVariable ["ObjectID","0"];
|
||||
@@ -25,7 +25,7 @@ _objectID = _obj getVariable ["ObjectID","0"];
|
||||
// Find objectUID
|
||||
_objectUID = _obj getVariable ["ObjectUID","0"];
|
||||
|
||||
if (_objectID == "0" && _objectUID == "0") exitWith {DZE_ActionInProgress = false; s_player_upgrade_build = -1; localize "str_epoch_player_50" call dayz_rollingMessages;};
|
||||
if (_objectID == "0" && _objectUID == "0") exitWith {dayz_actionInProgress = false; s_player_upgrade_build = -1; localize "str_epoch_player_50" call dayz_rollingMessages;};
|
||||
|
||||
// Get classname
|
||||
_classname = typeOf _obj;
|
||||
@@ -123,5 +123,5 @@ if ((count _upgrade) > 0) then {
|
||||
localize "str_epoch_player_51" call dayz_rollingMessages;
|
||||
};
|
||||
|
||||
DZE_ActionInProgress = false;
|
||||
dayz_actionInProgress = false;
|
||||
s_player_downgrade_build = -1;
|
||||
|
||||
@@ -4,8 +4,8 @@
|
||||
*/
|
||||
private ["_location","_dir","_classname","_missing","_text","_proceed","_num_removed","_object","_missingQty","_itemIn","_countIn","_qty","_removed","_removed_total","_tobe_removed_total","_objectID","_objectUID","_temp_removed_array","_textMissing","_requirements","_obj","_upgrade","_objectCharacterID"];
|
||||
|
||||
if (DZE_ActionInProgress) exitWith {localize "str_epoch_player_52" call dayz_rollingMessages;};
|
||||
DZE_ActionInProgress = true;
|
||||
if (dayz_actionInProgress) exitWith {localize "str_epoch_player_52" call dayz_rollingMessages;};
|
||||
dayz_actionInProgress = true;
|
||||
|
||||
player removeAction s_player_maint_build;
|
||||
s_player_maint_build = 1;
|
||||
@@ -19,7 +19,7 @@ _objectID = _obj getVariable ["ObjectID","0"];
|
||||
// Find objectUID
|
||||
_objectUID = _obj getVariable ["ObjectUID","0"];
|
||||
|
||||
if (_objectID == "0" && _objectUID == "0") exitWith {DZE_ActionInProgress = false; s_player_maint_build = -1; localize "str_epoch_player_50" call dayz_rollingMessages;};
|
||||
if (_objectID == "0" && _objectUID == "0") exitWith {dayz_actionInProgress = false; s_player_maint_build = -1; localize "str_epoch_player_50" call dayz_rollingMessages;};
|
||||
|
||||
// Get classname
|
||||
_classname = typeOf _obj;
|
||||
@@ -90,5 +90,5 @@ if (_proceed) then {
|
||||
};
|
||||
|
||||
|
||||
DZE_ActionInProgress = false;
|
||||
dayz_actionInProgress = false;
|
||||
s_player_maint_build = -1;
|
||||
@@ -3,11 +3,11 @@ disableSerialization;
|
||||
call gear_ui_init;
|
||||
closeDialog 0;
|
||||
|
||||
if (r_action_count != 1) exitWith { localize "str_player_actionslimit" call dayz_rollingMessages; };
|
||||
|
||||
if (dayz_actionInProgress) exitWith { localize "str_player_actionslimit" call dayz_rollingMessages; };
|
||||
dayz_actionInProgress = true;
|
||||
_create = _this;
|
||||
|
||||
if (!(_create in magazines player)) exitWith {r_action_count = 0;};
|
||||
if (!(_create in magazines player)) exitWith {dayz_actionInProgress = false;};
|
||||
|
||||
_config = configFile >> "CfgMagazines" >> _create;
|
||||
|
||||
@@ -20,7 +20,7 @@ _magCount = {_x == _create} count magazines player;
|
||||
|
||||
if (_magCount == 1) exitWith {
|
||||
[format[localize "str_cannotCombine", _name],1] call dayz_rollingMessages;
|
||||
r_action_count = 0;
|
||||
dayz_actionInProgress = false;
|
||||
};
|
||||
|
||||
//primary/secondary mags?
|
||||
@@ -82,4 +82,4 @@ switch true do {
|
||||
};
|
||||
|
||||
uiSleep 1;
|
||||
r_action_count = 0;
|
||||
dayz_actionInProgress = false;
|
||||
@@ -1,30 +1,30 @@
|
||||
private ["_item","_config","_pos","_onLadder","_create","_started","_finished","_animState","_isMedic","_num_removed","_text","_haskey","_hastoolweapon","_isNear","_hasTinBar"];
|
||||
|
||||
if (DZE_ActionInProgress) exitWith {localize "str_epoch_player_56" call dayz_rollingMessages;};
|
||||
DZE_ActionInProgress = true;
|
||||
if (dayz_actionInProgress) exitWith {localize "str_epoch_player_56" call dayz_rollingMessages;};
|
||||
dayz_actionInProgress = true;
|
||||
|
||||
_item = _this;
|
||||
_config = configFile >> "cfgWeapons" >> _item;
|
||||
|
||||
_onLadder = (getNumber (configFile >> "CfgMovesMaleSdr" >> "States" >> (animationState player) >> "onLadder")) == 1;
|
||||
if (_onLadder) exitWith {DZE_ActionInProgress = false; localize "str_player_21" call dayz_rollingMessages;};
|
||||
if (_onLadder) exitWith {dayz_actionInProgress = false; localize "str_player_21" call dayz_rollingMessages;};
|
||||
|
||||
_text = getText (_config >> "displayName");
|
||||
_haskey = _this in weapons player;
|
||||
if (!_haskey) exitWith {DZE_ActionInProgress = false; format[localize "str_player_30",_text] call dayz_rollingMessages;};
|
||||
if (!_haskey) exitWith {dayz_actionInProgress = false; format[localize "str_player_30",_text] call dayz_rollingMessages;};
|
||||
|
||||
_hastoolweapon = "ItemKeyKit" in weapons player;
|
||||
if (!_hastoolweapon) exitWith {DZE_ActionInProgress = false; localize "str_epoch_player_57" call dayz_rollingMessages;};
|
||||
if (!_hastoolweapon) exitWith {dayz_actionInProgress = false; localize "str_epoch_player_57" call dayz_rollingMessages;};
|
||||
|
||||
_pos = [player] call FNC_GetPos;
|
||||
_isNear = {inflamed _x} count (_pos nearObjects 3);
|
||||
if (_isNear == 0) exitWith {DZE_ActionInProgress = false; localize "str_epoch_player_58" call dayz_rollingMessages;};
|
||||
if (_isNear == 0) exitWith {dayz_actionInProgress = false; localize "str_epoch_player_58" call dayz_rollingMessages;};
|
||||
|
||||
call gear_ui_init;
|
||||
|
||||
// require one tin bar per key
|
||||
_hasTinBar = "ItemTinBar" in magazines player;
|
||||
if (!_hasTinBar) exitWith {DZE_ActionInProgress = false; localize "str_epoch_player_59" call dayz_rollingMessages;};
|
||||
if (!_hasTinBar) exitWith {dayz_actionInProgress = false; localize "str_epoch_player_59" call dayz_rollingMessages;};
|
||||
["Working",0,[20,40,15,0]] call dayz_NutritionSystem;
|
||||
player playActionNow "Medic";
|
||||
|
||||
@@ -72,4 +72,4 @@ if(_finished) then {
|
||||
};
|
||||
localize "str_epoch_player_61" call dayz_rollingMessages;
|
||||
};
|
||||
DZE_ActionInProgress = false;
|
||||
dayz_actionInProgress = false;
|
||||
|
||||
@@ -25,9 +25,8 @@ class ItemActions
|
||||
*/
|
||||
private ["_tradeComplete","_onLadder","_canDo","_selectedRecipeOutput","_proceed","_itemIn","_countIn","_missing","_missingQty","_qty","_itemOut","_countOut","_started","_finished","_animState","_isMedic","_removed","_tobe_removed_total","_textCreate","_textMissing","_selectedRecipeInput","_selectedRecipeInputStrict","_num_removed","_removed_total","_temp_removed_array","_abort","_waterLevel","_waterLevel_lowest","_reason","_isNear","_missingTools","_hastoolweapon","_selectedRecipeTools","_distance","_crafting","_needNear","_item","_baseClass","_num_removed_weapons","_outputWeapons","_inputWeapons","_randomOutput","_craft_doLoop","_selectedWeapon","_selectedMag","_sfx"];
|
||||
|
||||
if (DZE_ActionInProgress || (r_action_count > 0)) exitWith {localize "str_epoch_player_63" call dayz_rollingMessages;};
|
||||
r_action_count = r_action_count + 1;
|
||||
DZE_ActionInProgress = true;
|
||||
if (dayz_actionInProgress) exitWith {localize "str_epoch_player_63" call dayz_rollingMessages;};
|
||||
dayz_actionInProgress = true;
|
||||
|
||||
// This is used to find correct recipe based what itemaction was click allows multiple recipes per item.
|
||||
_crafting = _this select 0;
|
||||
@@ -65,8 +64,7 @@ if("workshop" in _needNear) then {
|
||||
};
|
||||
if(_abort) exitWith {
|
||||
format[localize "str_epoch_player_149",_reason,_distance] call dayz_rollingMessages;
|
||||
DZE_ActionInProgress = false;
|
||||
r_action_count = 0;
|
||||
dayz_actionInProgress = false;
|
||||
};
|
||||
|
||||
// diag_log format["Checking for fire: %1", _isFireNear];
|
||||
@@ -285,5 +283,4 @@ if (_canDo) then {
|
||||
} else {
|
||||
localize "str_epoch_player_64" call dayz_rollingMessages;
|
||||
};
|
||||
DZE_ActionInProgress = false;
|
||||
r_action_count = 0;
|
||||
dayz_actionInProgress = false;
|
||||
@@ -10,6 +10,7 @@
|
||||
failChance = 1;
|
||||
*/
|
||||
//diag_log("crafting system");
|
||||
dayz_actionInProgress = true;
|
||||
private ["_config","_input","_output","_required","_failChance","_hasInput","_availabeSpace","_classname","_isClass","_onLadder","_hasTools","_avail","_selection","_item","_amount","_itemName","_freeSlots","_slotType","_i","_j","_dis","_sfx"];
|
||||
|
||||
//diag_log(str(isnil "r_player_crafting"));
|
||||
|
||||
@@ -4,7 +4,8 @@ private ["_playerPos","_item","_location","_config","_text","_dir","_dis","_sfx"
|
||||
call gear_ui_init;
|
||||
closeDialog 1;
|
||||
|
||||
if (r_action_count != 1) exitWith { localize "str_player_actionslimit" call dayz_rollingMessages; };
|
||||
if (dayz_actionInProgress) exitWith { localize "str_player_actionslimit" call dayz_rollingMessages; };
|
||||
dayz_actionInProgress = true;
|
||||
|
||||
//Player Pos
|
||||
_playerPos = getPosATL player;
|
||||
@@ -26,7 +27,7 @@ _stashname = getText (configFile >> "CfgVehicles" >> _stashtype >> "displayName"
|
||||
|
||||
// Items are missing
|
||||
if ((!(_consume IN magazines player))) exitWith {
|
||||
r_action_count = 0;
|
||||
dayz_actionInProgress = false;
|
||||
format[localize "str_player_31_stash",_consumetext] call dayz_rollingMessages;
|
||||
};
|
||||
|
||||
@@ -35,7 +36,7 @@ _location set [2,0];
|
||||
|
||||
//blocked
|
||||
if (["concrete",dayz_surfaceType] call fnc_inString) exitwith {
|
||||
r_action_count = 0;
|
||||
dayz_actionInProgress = false;
|
||||
};
|
||||
|
||||
_worldspace = [_stashtype, player] call fn_niceSpot;
|
||||
@@ -66,9 +67,9 @@ if ((count _worldspace) == 2) then {
|
||||
publicVariableServer "PVDZ_obj_Publish";
|
||||
diag_log [diag_ticktime, __FILE__, "New Networked object, request to save to hive. PVDZ_obj_Publish:", PVDZ_obj_Publish];
|
||||
|
||||
r_action_count = 0;
|
||||
format[localize "str_success_stash_pitch",_stashname] call dayz_rollingMessages;
|
||||
} else {
|
||||
r_action_count = 0;
|
||||
format[localize "str_fail_stash_pitch",_stashname] call dayz_rollingMessages;
|
||||
};
|
||||
|
||||
dayz_actionInProgress = false;
|
||||
@@ -6,8 +6,9 @@ _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; r_action_count = 0; };
|
||||
if (r_action_count != 1) exitWith { localize "str_player_actionslimit" call dayz_rollingMessages; };
|
||||
if (_onLadder) exitWith { localize "str_player_21" call dayz_rollingMessages; dayz_actionInProgress = false; };
|
||||
if (dayz_actionInProgress) exitWith { localize "str_player_actionslimit" call dayz_rollingMessages; };
|
||||
dayz_actionInProgress = true;
|
||||
|
||||
call gear_ui_init;
|
||||
|
||||
@@ -32,4 +33,4 @@ _bag = createVehicle [format["WeaponHolder_%1",_item],getPosATL player,[], 1, "C
|
||||
_bag modelToWorld getPosATL player;
|
||||
_bag setDir (getDir player);
|
||||
player reveal _bag;
|
||||
r_action_count = 0;
|
||||
dayz_actionInProgress = false;
|
||||
@@ -5,8 +5,8 @@
|
||||
*/
|
||||
private ["_isOk","_i","_objName","_started","_finished","_animState","_isMedic","_proceed","_itemOut","_countOut","_tree","_trees","_findNearestTree","_index","_invResult","_treesOutput","_text"];
|
||||
|
||||
if (DZE_ActionInProgress) exitWith {localize "str_epoch_player_72" call dayz_rollingMessages;};
|
||||
DZE_ActionInProgress = true;
|
||||
if (dayz_actionInProgress) exitWith {localize "str_epoch_player_72" call dayz_rollingMessages;};
|
||||
dayz_actionInProgress = true;
|
||||
|
||||
// allowed trees list move this later
|
||||
_trees = ["pumpkin.p3d","p_helianthus.p3d","p_fiberplant_ep1.p3d"];
|
||||
@@ -131,4 +131,4 @@ if (count(_findNearestTree) >= 1) then {
|
||||
} else {
|
||||
localize "str_epoch_player_74" call dayz_rollingMessages;
|
||||
};
|
||||
DZE_ActionInProgress = false;
|
||||
dayz_actionInProgress = false;
|
||||
|
||||
@@ -1,19 +1,19 @@
|
||||
private ["_dir","_classname","_b0x1337","_location","_item","_config","_create_raw","_create","_qty","_type","_hasCrate","_hasTool"];
|
||||
|
||||
if (DZE_ActionInProgress) exitWith {localize "str_epoch_player_75" call dayz_rollingMessages;};
|
||||
DZE_ActionInProgress = true;
|
||||
if (dayz_actionInProgress) exitWith {localize "str_epoch_player_75" call dayz_rollingMessages;};
|
||||
dayz_actionInProgress = true;
|
||||
|
||||
_hasTool = "ItemCrowbar" in items player;
|
||||
if(!_hasTool) exitWith {
|
||||
localize "str_epoch_player_76" call dayz_rollingMessages;
|
||||
DZE_ActionInProgress = false;
|
||||
dayz_actionInProgress = false;
|
||||
};
|
||||
|
||||
_item = _this;
|
||||
_hasCrate = _item in magazines player;
|
||||
if (!_hasCrate) exitWith {
|
||||
localize "str_epoch_player_77" call dayz_rollingMessages;
|
||||
DZE_ActionInProgress = false;
|
||||
dayz_actionInProgress = false;
|
||||
};
|
||||
|
||||
_config = configFile >> "CfgMagazines" >> _item;
|
||||
@@ -65,4 +65,4 @@ player action ["Gear", _b0x1337];
|
||||
|
||||
localize "str_epoch_player_78" call dayz_rollingMessages;
|
||||
|
||||
DZE_ActionInProgress = false;
|
||||
dayz_actionInProgress = false;
|
||||
|
||||
@@ -7,12 +7,12 @@ disableSerialization;
|
||||
call gear_ui_init;
|
||||
|
||||
//note - one slot ammo can be used!
|
||||
r_action_count = r_action_count + 1;
|
||||
if (r_action_count != 1) exitWith { localize "str_player_actionslimit" call dayz_rollingMessages; };
|
||||
if (dayz_actionInProgress) exitWith { localize "str_player_actionslimit" call dayz_rollingMessages; };
|
||||
dayz_actionInProgress = true;
|
||||
|
||||
_item = _this;
|
||||
|
||||
if (!(_item in magazines player)) exitWith {r_action_count = 0;};
|
||||
if (!(_item in magazines player)) exitWith {dayz_actionInProgress = false;};
|
||||
|
||||
_config = configFile >> "CfgMagazines" >> _item;
|
||||
|
||||
@@ -96,7 +96,7 @@ if (_consume_magsize > _create_magsize) then {
|
||||
};
|
||||
|
||||
if ((_qtynew_create_mags + _qtynew_consume_mags) > (_qty_create_mags + _qty_consume_mags + _qty_free_slots)) exitWith {
|
||||
r_action_count = 0;
|
||||
dayz_actionInProgress = false;
|
||||
localize "str_player_24" call dayz_rollingMessages;
|
||||
};
|
||||
_qtynew_consume_mags_full = floor(_qtynew_consume_ammo/_consume_magsize);
|
||||
@@ -121,4 +121,4 @@ if (_qtynew_create_ammo_rest != 0) then {
|
||||
player addMagazine [_create,_qtynew_create_ammo_rest];
|
||||
};
|
||||
uiSleep 1;
|
||||
r_action_count = 0;
|
||||
dayz_actionInProgress = false;
|
||||
@@ -7,12 +7,12 @@ disableSerialization;
|
||||
call gear_ui_init;
|
||||
|
||||
//note - one slot ammo can be used!
|
||||
r_action_count = r_action_count + 1;
|
||||
if (r_action_count != 1) exitWith { localize "str_player_actionslimit" call dayz_rollingMessages; };
|
||||
if (dayz_actionInProgress) exitWith { localize "str_player_actionslimit" call dayz_rollingMessages; };
|
||||
dayz_actionInProgress = true;
|
||||
|
||||
_item = _this;
|
||||
|
||||
if (!(_item in magazines player)) exitWith {r_action_count = 0;};
|
||||
if (!(_item in magazines player)) exitWith {dayz_actionInProgress = false;};
|
||||
|
||||
_config = configFile >> "CfgMagazines" >> _item;
|
||||
|
||||
@@ -96,7 +96,7 @@ if (_consume_magsize > _create_magsize) then {
|
||||
};
|
||||
|
||||
if ((_qtynew_create_mags + _qtynew_consume_mags) > (_qty_create_mags + _qty_consume_mags + _qty_free_slots)) exitWith {
|
||||
r_action_count = 0;
|
||||
dayz_actionInProgress = false;
|
||||
localize "str_player_24" call dayz_rollingMessages;
|
||||
};
|
||||
_qtynew_consume_mags_full = floor(_qtynew_consume_ammo/_consume_magsize);
|
||||
@@ -121,4 +121,4 @@ if (_qtynew_create_ammo_rest != 0) then {
|
||||
player addMagazine [_create,_qtynew_create_ammo_rest];
|
||||
};
|
||||
uiSleep 1;
|
||||
r_action_count = 0;
|
||||
dayz_actionInProgress = false;
|
||||
@@ -3,10 +3,11 @@ private ["_item","_config","_onLadder","_classname","_text","_consume","_hastrap
|
||||
_item = _this;
|
||||
_config = configFile >> "CfgWeapons" >> _item;
|
||||
|
||||
if (r_action_count != 1) exitWith { localize "str_player_actionslimit" call dayz_rollingMessages; };
|
||||
if (dayz_actionInProgress) exitWith { localize "str_player_actionslimit" call dayz_rollingMessages; };
|
||||
dayz_actionInProgress = true;
|
||||
|
||||
_onLadder = (getNumber (configFile >> "CfgMovesMaleSdr" >> "States" >> (animationState player) >> "onLadder")) == 1;
|
||||
if (_onLadder) exitWith { r_action_count = 0; localize "str_player_21" call dayz_rollingMessages;};
|
||||
if (_onLadder) exitWith { dayz_actionInProgress = false; localize "str_player_21" call dayz_rollingMessages;};
|
||||
|
||||
call gear_ui_init;
|
||||
|
||||
@@ -16,7 +17,7 @@ _consume = ([] + getArray (_config >> "magazines")) select 0;
|
||||
|
||||
_hastrapitem = _item in magazines player;
|
||||
|
||||
if (!_hastrapitem) exitWith { r_action_count = 0; format[localize "str_player_31",_text,localize "str_player_31_place"] call dayz_rollingMessages;};
|
||||
if (!_hastrapitem) exitWith { dayz_actionInProgress = false; format[localize "str_player_31",_text,localize "str_player_31_place"] call dayz_rollingMessages;};
|
||||
|
||||
player removeMagazine _item;
|
||||
_location = getPosATL player;
|
||||
@@ -35,5 +36,5 @@ diag_log [diag_ticktime, __FILE__, "New Networked object, request to save to hiv
|
||||
|
||||
player reveal _object;
|
||||
|
||||
r_action_count = 0;
|
||||
dayz_actionInProgress = false;
|
||||
format[localize "str_build_01",_text] call dayz_rollingMessages;
|
||||
@@ -4,8 +4,8 @@
|
||||
*/
|
||||
private ["_location","_dir","_classname","_missing","_text","_proceed","_num_removed","_object","_missingQty","_itemIn","_countIn","_qty","_removed","_removed_total","_tobe_removed_total","_objectID","_objectUID","_temp_removed_array","_textMissing","_newclassname","_requirements","_obj","_upgrade","_lockable","_combination_1","_combination_2","_combination_3","_combination","_objectCharacterID","_ownerID"];
|
||||
|
||||
if (DZE_ActionInProgress) exitWith {localize "str_epoch_player_52" call dayz_rollingMessages;};
|
||||
DZE_ActionInProgress = true;
|
||||
if (dayz_actionInProgress) exitWith {localize "str_epoch_player_52" call dayz_rollingMessages;};
|
||||
dayz_actionInProgress = true;
|
||||
|
||||
player removeAction s_player_upgrade_build;
|
||||
s_player_upgrade_build = 1;
|
||||
@@ -19,7 +19,7 @@ _objectID = _obj getVariable ["ObjectID","0"];
|
||||
// Find objectUID
|
||||
_objectUID = _obj getVariable ["ObjectUID","0"];
|
||||
|
||||
if (_objectID == "0" && _objectUID == "0") exitWith {DZE_ActionInProgress = false; s_player_upgrade_build = -1; localize "str_epoch_player_50" call dayz_rollingMessages;};
|
||||
if (_objectID == "0" && _objectUID == "0") exitWith {dayz_actionInProgress = false; s_player_upgrade_build = -1; localize "str_epoch_player_50" call dayz_rollingMessages;};
|
||||
|
||||
// Get classname
|
||||
_classname = typeOf _obj;
|
||||
@@ -157,5 +157,5 @@ if ((count _upgrade) > 0) then {
|
||||
localize "str_epoch_player_82" call dayz_rollingMessages;
|
||||
};
|
||||
|
||||
DZE_ActionInProgress = false;
|
||||
dayz_actionInProgress = false;
|
||||
s_player_upgrade_build = -1;
|
||||
|
||||
@@ -2,8 +2,8 @@ if (dayz_lastClothesChange + 5 > diag_tickTime) exitWith {localize "str_player_a
|
||||
dayz_lastClothesChange = diag_tickTime;
|
||||
|
||||
if (_this in DZE_RestrictSkins) exitWith { format[localize "str_epoch_player_315",_this] call dayz_rollingMessages; };
|
||||
if (DZE_ActionInProgress) exitWith {localize "str_epoch_player_83" call dayz_rollingMessages;};
|
||||
DZE_ActionInProgress = true;
|
||||
if (dayz_actionInProgress) exitWith {localize "str_epoch_player_83" call dayz_rollingMessages;};
|
||||
dayz_actionInProgress = true;
|
||||
/*
|
||||
_item call player_wearClothes;
|
||||
Added Female skin changes - DayZ Epoch - vbawol
|
||||
@@ -13,19 +13,19 @@ private ["_item","_onLadder","_hasclothesitem","_config","_text","_isFemale","_m
|
||||
|
||||
_item = _this;
|
||||
call gear_ui_init;
|
||||
r_action_count = 0; //reset for strange glitch
|
||||
dayz_actionInProgress = false; //reset for strange glitch
|
||||
_onLadder = (getNumber (configFile >> "CfgMovesMaleSdr" >> "States" >> (animationState player) >> "onLadder")) == 1;
|
||||
if (_onLadder) exitWith {localize "str_player_21" call dayz_rollingMessages; DZE_ActionInProgress = false;};
|
||||
if (_onLadder) exitWith {localize "str_player_21" call dayz_rollingMessages; dayz_actionInProgress = false;};
|
||||
|
||||
_hasclothesitem = _this in magazines player;
|
||||
_config = configFile >> "CfgMagazines";
|
||||
_text = getText (_config >> _item >> "displayName");
|
||||
|
||||
if (!_hasclothesitem) exitWith {format[localize "str_player_31",_text,localize "str_player_31_wear"] call dayz_rollingMessages; DZE_ActionInProgress = false;};
|
||||
if (!_hasclothesitem) exitWith {format[localize "str_player_31",_text,localize "str_player_31_wear"] call dayz_rollingMessages; dayz_actionInProgress = false;};
|
||||
|
||||
if (vehicle player != player) exitWith {localize "str_player_fail_wear1" call dayz_rollingMessages; DZE_ActionInProgress = false;};
|
||||
//if (!isNull (unitBackpack player)) exitWith {DZE_ActionInProgress = false; localize "STR_EPOCH_ACTIONS_9" call dayz_rollingMessages;};
|
||||
if ("CSGAS" in (magazines player)) exitWith {DZE_ActionInProgress = false; localize "STR_EPOCH_ACTIONS_10" call dayz_rollingMessages;};
|
||||
if (vehicle player != player) exitWith {localize "str_player_fail_wear1" call dayz_rollingMessages; dayz_actionInProgress = false;};
|
||||
//if (!isNull (unitBackpack player)) exitWith {dayz_actionInProgress = false; localize "STR_EPOCH_ACTIONS_9" call dayz_rollingMessages;};
|
||||
if ("CSGAS" in (magazines player)) exitWith {dayz_actionInProgress = false; localize "STR_EPOCH_ACTIONS_10" call dayz_rollingMessages;};
|
||||
|
||||
_myModel = (typeOf player);
|
||||
_humanity = player getVariable ["humanity",0];
|
||||
@@ -57,4 +57,4 @@ if ( (isClass(_config >> _itemNew)) ) then {
|
||||
};
|
||||
};
|
||||
};
|
||||
DZE_ActionInProgress = false;
|
||||
dayz_actionInProgress = false;
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
private ["_objectID","_objectUID","_target","_objectClasses","_range","_objects","_requirements","_count","_objects_filtered","_ctrl","_itemText","_type","_amount","_success","_wealth","_message1","_message2","_option"];
|
||||
disableSerialization;
|
||||
|
||||
if (DZE_ActionInProgress) exitWith {localize "STR_EPOCH_ACTIONS_2" call dayz_rollingMessages;};
|
||||
DZE_ActionInProgress = true;
|
||||
if (dayz_actionInProgress) exitWith {localize "STR_EPOCH_ACTIONS_2" call dayz_rollingMessages;};
|
||||
dayz_actionInProgress = true;
|
||||
|
||||
player removeAction s_player_maintain_area;
|
||||
s_player_maintain_area = 1;
|
||||
@@ -36,7 +36,7 @@ if (_count == 0) exitWith {
|
||||
} else {
|
||||
format[localize "STR_EPOCH_ACTIONS_22",_count] call dayz_rollingMessages;
|
||||
};
|
||||
DZE_ActionInProgress = false;
|
||||
dayz_actionInProgress = false;
|
||||
s_player_maintain_area = -1;
|
||||
s_player_maintain_area_preview = -1;
|
||||
};
|
||||
@@ -132,6 +132,6 @@ switch _option do {
|
||||
};
|
||||
};
|
||||
|
||||
DZE_ActionInProgress = false;
|
||||
dayz_actionInProgress = false;
|
||||
s_player_maintain_area = -1;
|
||||
s_player_maintain_area_preview = -1;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
if (DZE_ActionInProgress) exitWith {localize "str_epoch_player_24" call dayz_rollingMessages;};
|
||||
DZE_ActionInProgress = true;
|
||||
if (dayz_actionInProgress) exitWith {localize "str_epoch_player_24" call dayz_rollingMessages;};
|
||||
dayz_actionInProgress = true;
|
||||
private ["_vehicle","_canSize","_configVeh","_capacity","_nameType","_curFuel","_newFuel","_dis","_sfx","_fueling","_array","_cantype",
|
||||
"_emptycan","_started","_finished","_animState","_isRefuel"];
|
||||
|
||||
@@ -15,7 +15,7 @@ _curFuel = ((fuel _vehicle) * _capacity);
|
||||
_newFuel = (_curFuel + _canSize);
|
||||
_fueling = player getVariable ["fueling",false];
|
||||
|
||||
if (fuel _vehicle == 1) exitWith {DZE_ActionInProgress = false;};
|
||||
if (fuel _vehicle == 1) exitWith {dayz_actionInProgress = false;};
|
||||
|
||||
player removeAction s_player_fillfuel + _capacity;
|
||||
a_player_jerryfilling = true;
|
||||
@@ -78,4 +78,4 @@ if (!_fueling) then {
|
||||
a_player_jerryfilling = false;
|
||||
r_action = false;
|
||||
player setVariable ["fueling", false];
|
||||
DZE_ActionInProgress = false;
|
||||
dayz_actionInProgress = false;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
if (DZE_ActionInProgress) exitWith {localize "str_epoch_player_88" call dayz_rollingMessages;};
|
||||
DZE_ActionInProgress = true;
|
||||
if (dayz_actionInProgress) exitWith {localize "str_epoch_player_88" call dayz_rollingMessages;};
|
||||
dayz_actionInProgress = true;
|
||||
/*
|
||||
delete object from db with extra waiting by [VB]AWOL
|
||||
parameters: _obj
|
||||
@@ -22,8 +22,8 @@ if (DZE_permanentPlot) then {
|
||||
_isOwnerOfObj = (_objOwnerID == dayz_characterID);
|
||||
};
|
||||
|
||||
if (_obj in DZE_DoorsLocked) exitWith {DZE_ActionInProgress = false; localize "STR_EPOCH_ACTIONS_20" call dayz_rollingMessages;};
|
||||
if (_obj getVariable ["GeneratorRunning", false]) exitWith {DZE_ActionInProgress = false; localize "str_epoch_player_89" call dayz_rollingMessages;};
|
||||
if (_obj in DZE_DoorsLocked) exitWith {dayz_actionInProgress = false; localize "STR_EPOCH_ACTIONS_20" call dayz_rollingMessages;};
|
||||
if (_obj getVariable ["GeneratorRunning", false]) exitWith {dayz_actionInProgress = false; localize "str_epoch_player_89" call dayz_rollingMessages;};
|
||||
|
||||
_PlayerNear = {isPlayer _x} count (([_obj] call FNC_GetPos) nearEntities ["CAManBase", 10]) > 1;
|
||||
if (_PlayerNear) exitWith {localize "str_pickup_limit_5" call dayz_rollingMessages;};
|
||||
@@ -267,7 +267,7 @@ if (_proceed && _success) then {
|
||||
player playActionNow "stop";
|
||||
};
|
||||
};
|
||||
DZE_ActionInProgress = false;
|
||||
dayz_actionInProgress = false;
|
||||
s_player_deleteBuild = -1;
|
||||
|
||||
_obj
|
||||
@@ -1,5 +1,5 @@
|
||||
if (DZE_ActionInProgress) exitWith {localize "str_epoch_player_92" call dayz_rollingMessages;};
|
||||
DZE_ActionInProgress = true;
|
||||
if (dayz_actionInProgress) exitWith {localize "str_epoch_player_92" call dayz_rollingMessages;};
|
||||
dayz_actionInProgress = true;
|
||||
private ["_array","_vehicle","_part","_hitpoint","_type","_hasToolbox","_section","_nameType","_namePart","_damage","_selection","_dis","_sfx","_hitpoints","_allFixed","__FILE__"];
|
||||
|
||||
_id = _this select 2;
|
||||
@@ -55,4 +55,4 @@ if (_section and _hasToolbox) then {
|
||||
} else {
|
||||
format[localize "str_player_03",_namePart] call dayz_rollingMessages;
|
||||
};
|
||||
DZE_ActionInProgress = false;
|
||||
dayz_actionInProgress = false;
|
||||
@@ -1,6 +1,6 @@
|
||||
private ["_trader_data", "_dialog"];
|
||||
|
||||
if (DZE_ActionInProgress) exitWith {localize "STR_EPOCH_PLAYER_103" call dayz_rollingMessages;};
|
||||
if (dayz_actionInProgress) exitWith {localize "STR_EPOCH_PLAYER_103" call dayz_rollingMessages;};
|
||||
|
||||
_trader_data = (_this select 3);
|
||||
|
||||
|
||||
@@ -236,7 +236,7 @@ switch (snapActionState) do {
|
||||
[1,0,0] call fnc_snapActionCleanup;
|
||||
[] spawn {
|
||||
while {true} do {
|
||||
if(!DZE_ActionInProgress || DZE_cancelBuilding) exitWith {call fnc_initSnapPointsCleanup;[0,0,0] call fnc_snapActionCleanup; ["",false] call fnc_initSnapTutorial; snapActionState = "OFF";};
|
||||
if(!dayz_actionInProgress || DZE_cancelBuilding) exitWith {call fnc_initSnapPointsCleanup;[0,0,0] call fnc_snapActionCleanup; ["",false] call fnc_initSnapTutorial; snapActionState = "OFF";};
|
||||
uiSleep 2;
|
||||
};
|
||||
};
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
private ["_vehicle","_started","_finished","_animState","_isMedic","_soundObject"];
|
||||
|
||||
if (DZE_ActionInProgress) exitWith {localize "str_epoch_player_99" call dayz_rollingMessages;};
|
||||
DZE_ActionInProgress = true;
|
||||
if (dayz_actionInProgress) exitWith {localize "str_epoch_player_99" call dayz_rollingMessages;};
|
||||
dayz_actionInProgress = true;
|
||||
|
||||
player removeAction s_player_fillgen;
|
||||
s_player_fillgen = 1;
|
||||
@@ -63,5 +63,5 @@ if (_finished) then {
|
||||
|
||||
};
|
||||
|
||||
DZE_ActionInProgress = false;
|
||||
dayz_actionInProgress = false;
|
||||
s_player_fillgen = -1;
|
||||
@@ -13,11 +13,12 @@ _classname = getText (_config >> "tentmodel");
|
||||
//diag_log ("Classname: "+str(_classname));
|
||||
//diag_log ("Item: "+str(_item));
|
||||
|
||||
if (r_action_count != 1) exitWith { localize "str_player_actionslimit" call dayz_rollingMessages; };
|
||||
if (dayz_actionInProgress) exitWith { localize "str_player_actionslimit" call dayz_rollingMessages; };
|
||||
dayz_actionInProgress = true;
|
||||
|
||||
// item is missing or tools are missing
|
||||
if ((!(_item IN magazines player))) exitWith {
|
||||
r_action_count = 0;
|
||||
dayz_actionInProgress = false;
|
||||
format[localize "str_player_31",_text,localize "str_player_31_pitch"] call dayz_rollingMessages;
|
||||
};
|
||||
|
||||
@@ -95,10 +96,9 @@ _booleans = []; //testonLadder, testSea, testPond, testBuilding, testSlope, test
|
||||
|
||||
localize "str_success_tent_pitch" call dayz_rollingMessages;
|
||||
sleep 1;
|
||||
r_action_count = 0;
|
||||
|
||||
} else {
|
||||
r_action_count = 0;
|
||||
localize "str_fail_tent_pitch" call dayz_rollingMessages;
|
||||
};
|
||||
*/
|
||||
|
||||
dayz_actionInProgress = false;
|
||||
*/
|
||||
@@ -1,7 +1,7 @@
|
||||
private ["_vehicle","_started","_finished","_animState","_isMedic","_abort","_configVeh","_nameText","_findNearestVehicles","_findNearestVehicle","_IsNearVehicle","_towTruck","_towTruckSize","_allowedSize"];
|
||||
|
||||
if (DZE_ActionInProgress) exitWith {localize "str_epoch_player_96" call dayz_rollingMessages;};
|
||||
DZE_ActionInProgress = true;
|
||||
if (dayz_actionInProgress) exitWith {localize "str_epoch_player_96" call dayz_rollingMessages;};
|
||||
dayz_actionInProgress = true;
|
||||
|
||||
player removeAction s_player_towing;
|
||||
s_player_towing = 1;
|
||||
@@ -100,5 +100,5 @@ if(_IsNearVehicle >= 1) then {
|
||||
} else {
|
||||
localize "str_epoch_player_27" call dayz_rollingMessages;
|
||||
};
|
||||
DZE_ActionInProgress = false;
|
||||
dayz_actionInProgress = false;
|
||||
s_player_towing = -1;
|
||||
@@ -1,7 +1,7 @@
|
||||
private ["_vehicle","_started","_finished","_animState","_isMedic","_configVeh","_nameText","_towTruck","_inTow"];
|
||||
|
||||
if (DZE_ActionInProgress) exitWith {localize "str_epoch_player_96" call dayz_rollingMessages;};
|
||||
DZE_ActionInProgress = true;
|
||||
if (dayz_actionInProgress) exitWith {localize "str_epoch_player_96" call dayz_rollingMessages;};
|
||||
dayz_actionInProgress = true;
|
||||
|
||||
player removeAction s_player_towing;
|
||||
s_player_towing = 1;
|
||||
@@ -79,5 +79,5 @@ if(_inTow) then {
|
||||
} else {
|
||||
localize "str_epoch_player_102" call dayz_rollingMessages;
|
||||
};
|
||||
DZE_ActionInProgress = false;
|
||||
dayz_actionInProgress = false;
|
||||
s_player_towing = -1;
|
||||
@@ -1,7 +1,7 @@
|
||||
private ["_sign","_location","_isOk","_part_out","_part_in","_qty_out","_qty_in","_qty","_buy_o_sell","_obj","_objectID","_objectUID","_bos","_started","_finished","_animState","_isMedic","_dir","_helipad","_keyColor","_keyNumber","_keySelected","_isKeyOK","_config","_damage","_tireDmg","_tires","_okToSell","_hitpoints","_needed","_activatingPlayer","_textPartIn","_textPartOut","_traderID","_canAfford","_trade_total","_total_currency","_return_change","_done"];
|
||||
|
||||
if (DZE_ActionInProgress) exitWith {localize "str_epoch_player_103" call dayz_rollingMessages;};
|
||||
DZE_ActionInProgress = true;
|
||||
if (dayz_actionInProgress) exitWith {localize "str_epoch_player_103" call dayz_rollingMessages;};
|
||||
dayz_actionInProgress = true;
|
||||
|
||||
// [part_out,part_in, qty_out, qty_in, loc];
|
||||
|
||||
@@ -57,7 +57,7 @@ if (!_finished) exitWith {
|
||||
player playActionNow "stop";
|
||||
};
|
||||
localize "str_epoch_player_106" call dayz_rollingMessages;
|
||||
DZE_ActionInProgress = false;
|
||||
dayz_actionInProgress = false;
|
||||
};
|
||||
|
||||
if (_finished) then {
|
||||
@@ -232,4 +232,4 @@ if (_finished) then {
|
||||
};
|
||||
};
|
||||
};
|
||||
DZE_ActionInProgress = false;
|
||||
dayz_actionInProgress = false;
|
||||
@@ -1,7 +1,7 @@
|
||||
private ["_sign","_location","_part_out","_part_in","_qty_out","_qty_in","_qty","_buy_o_sell","_obj","_objectID","_objectUID","_bos","_started","_finished","_animState","_isMedic","_dir","_helipad","_removed","_damage","_tireDmg","_tires","_okToSell","_hitpoints","_needed","_activatingPlayer","_textPartIn","_textPartOut","_traderID","_playerNear"];
|
||||
|
||||
if (DZE_ActionInProgress) exitWith {localize "str_epoch_player_103" call dayz_rollingMessages;};
|
||||
DZE_ActionInProgress = true;
|
||||
if (dayz_actionInProgress) exitWith {localize "str_epoch_player_103" call dayz_rollingMessages;};
|
||||
dayz_actionInProgress = true;
|
||||
|
||||
// [part_out,part_in, qty_out, qty_in, loc];
|
||||
|
||||
@@ -191,4 +191,4 @@ if (_qty >= _qty_in) then {
|
||||
};
|
||||
};
|
||||
|
||||
DZE_ActionInProgress = false;
|
||||
dayz_actionInProgress = false;
|
||||
@@ -1,11 +1,11 @@
|
||||
private ["_sign","_location","_result","_part_out","_part_in","_qty_out","_qty_in","_qty","_buy_o_sell","_obj","_objectID","_objectUID","_bos","_started","_finished","_animState","_isMedic","_dir","_helipad","_damage","_tireDmg","_tires","_okToSell","_hitpoints","_needed","_activatingPlayer","_textPartIn","_textPartOut","_traderID","_canAfford","_trade_total","_total_currency","_return_change","_done"];
|
||||
|
||||
if (DZE_ActionInProgress) exitWith {localize "str_epoch_player_103" call dayz_rollingMessages;};
|
||||
DZE_ActionInProgress = true;
|
||||
if (dayz_actionInProgress) exitWith {localize "str_epoch_player_103" call dayz_rollingMessages;};
|
||||
dayz_actionInProgress = true;
|
||||
|
||||
// Test cannot lock while another player is nearby
|
||||
//_playerNear = {isPlayer _x} count (player nearEntities ["CAManBase", 12]) > 1;
|
||||
//if(_playerNear) exitWith {DZE_ActionInProgress = false; localize "str_epoch_player_104" call dayz_rollingMessages;};
|
||||
//if(_playerNear) exitWith {dayz_actionInProgress = false; localize "str_epoch_player_104" call dayz_rollingMessages;};
|
||||
|
||||
// [part_out,part_in, qty_out, qty_in, loc];
|
||||
|
||||
@@ -61,7 +61,7 @@ if (!_finished) exitWith {
|
||||
player playActionNow "stop";
|
||||
};
|
||||
localize "str_epoch_player_106" call dayz_rollingMessages;
|
||||
DZE_ActionInProgress = false;
|
||||
dayz_actionInProgress = false;
|
||||
};
|
||||
|
||||
if (_finished) then {
|
||||
@@ -204,4 +204,4 @@ if (_finished) then {
|
||||
};
|
||||
};
|
||||
};
|
||||
DZE_ActionInProgress = false;
|
||||
dayz_actionInProgress = false;
|
||||
@@ -1,11 +1,11 @@
|
||||
private ["_sign","_location","_result","_part_out","_part_in","_qty_out","_qty_in","_qty","_buy_o_sell","_obj","_objectID","_objectUID","_bos","_started","_finished","_animState","_isMedic","_dir","_helipad","_removed","_okToSell","_needed","_activatingPlayer","_textPartIn","_textPartOut","_traderID","_playerNear"];
|
||||
|
||||
if (DZE_ActionInProgress) exitWith {localize "str_epoch_player_103" call dayz_rollingMessages;};
|
||||
DZE_ActionInProgress = true;
|
||||
if (dayz_actionInProgress) exitWith {localize "str_epoch_player_103" call dayz_rollingMessages;};
|
||||
dayz_actionInProgress = true;
|
||||
|
||||
// Test cannot lock while another player is nearby
|
||||
//_playerNear = {isPlayer _x} count (player nearEntities ["CAManBase", 12]) > 1;
|
||||
//if(_playerNear) exitWith {DZE_ActionInProgress = false; localize "str_epoch_player_104" call dayz_rollingMessages;};
|
||||
//if(_playerNear) exitWith {dayz_actionInProgress = false; localize "str_epoch_player_104" call dayz_rollingMessages;};
|
||||
|
||||
// [part_out,part_in, qty_out, qty_in, loc];
|
||||
|
||||
@@ -173,4 +173,4 @@ if (_qty >= _qty_in) then {
|
||||
};
|
||||
};
|
||||
|
||||
DZE_ActionInProgress = false;
|
||||
dayz_actionInProgress = false;
|
||||
@@ -1,11 +1,11 @@
|
||||
private ["_sign","_location","_result","_part_out","_part_in","_qty_out","_qty_in","_qty","_buy_o_sell","_obj","_objectID","_objectUID","_bos","_started","_finished","_animState","_isMedic","_dir","_helipad","_keyColor","_damage","_tireDmg","_tires","_okToSell","_temp_keys","_hitpoints","_needed","_activatingPlayer","_textPartIn","_textPartOut","_traderID","_canAfford","_trade_total","_total_currency","_return_change","_done"];
|
||||
|
||||
if (DZE_ActionInProgress) exitWith {localize "str_epoch_player_103" call dayz_rollingMessages;};
|
||||
DZE_ActionInProgress = true;
|
||||
if (dayz_actionInProgress) exitWith {localize "str_epoch_player_103" call dayz_rollingMessages;};
|
||||
dayz_actionInProgress = true;
|
||||
|
||||
// Test cannot lock while another player is nearby
|
||||
//_playerNear = {isPlayer _x} count (player nearEntities ["CAManBase", 12]) > 1;
|
||||
//if(_playerNear) exitWith {DZE_ActionInProgress = false; localize "str_epoch_player_104" call dayz_rollingMessages;};
|
||||
//if(_playerNear) exitWith {dayz_actionInProgress = false; localize "str_epoch_player_104" call dayz_rollingMessages;};
|
||||
|
||||
// [part_out,part_in, qty_out, qty_in, loc];
|
||||
|
||||
@@ -61,7 +61,7 @@ if (!_finished) exitWith {
|
||||
player playActionNow "stop";
|
||||
};
|
||||
localize "str_epoch_player_106" call dayz_rollingMessages;
|
||||
DZE_ActionInProgress = false;
|
||||
dayz_actionInProgress = false;
|
||||
};
|
||||
|
||||
if (_finished) then {
|
||||
@@ -248,4 +248,4 @@ if (_finished) then {
|
||||
};
|
||||
};
|
||||
};
|
||||
DZE_ActionInProgress = false;
|
||||
dayz_actionInProgress = false;
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
private ["_sign","_location","_part_out","_part_in","_qty_out","_qty_in","_qty","_buy_o_sell","_obj","_objectID","_objectUID","_bos","_started","_finished","_animState","_isMedic","_dir","_helipad","_damage","_tireDmg","_tires","_okToSell","_hitpoints","_needed","_activatingPlayer","_textPartIn","_textPartOut","_traderID","_canAfford","_trade_total","_total_currency","_return_change","_done"];
|
||||
|
||||
if (DZE_ActionInProgress) exitWith {localize "str_epoch_player_103" call dayz_rollingMessages;};
|
||||
DZE_ActionInProgress = true;
|
||||
if (dayz_actionInProgress) exitWith {localize "str_epoch_player_103" call dayz_rollingMessages;};
|
||||
dayz_actionInProgress = true;
|
||||
|
||||
// Test cannot lock while another player is nearby
|
||||
//_playerNear = {isPlayer _x} count (player nearEntities ["CAManBase", 12]) > 1;
|
||||
//if(_playerNear) exitWith {DZE_ActionInProgress = false; localize "str_epoch_player_104" call dayz_rollingMessages;};
|
||||
//if(_playerNear) exitWith {dayz_actionInProgress = false; localize "str_epoch_player_104" call dayz_rollingMessages;};
|
||||
|
||||
// [part_out,part_in, qty_out, qty_in, loc];
|
||||
|
||||
@@ -61,7 +61,7 @@ if (!_finished) exitWith {
|
||||
player playActionNow "stop";
|
||||
};
|
||||
localize "str_epoch_player_106" call dayz_rollingMessages;
|
||||
DZE_ActionInProgress = false;
|
||||
dayz_actionInProgress = false;
|
||||
};
|
||||
|
||||
if (_finished) then {
|
||||
@@ -232,4 +232,4 @@ if (_finished) then {
|
||||
};
|
||||
};
|
||||
};
|
||||
DZE_ActionInProgress = false;
|
||||
dayz_actionInProgress = false;
|
||||
@@ -1,11 +1,11 @@
|
||||
private ["_sign","_location","_result","_part_out","_part_in","_qty_out","_qty_in","_qty","_buy_o_sell","_obj","_objectID","_objectUID","_bos","_started","_finished","_animState","_isMedic","_dir","_helipad","_removed","_damage","_tireDmg","_tires","_okToSell","_hitpoints","_needed","_activatingPlayer","_textPartIn","_textPartOut","_traderID","_playerNear"];
|
||||
|
||||
if (DZE_ActionInProgress) exitWith {localize "str_epoch_player_103" call dayz_rollingMessages;};
|
||||
DZE_ActionInProgress = true;
|
||||
if (dayz_actionInProgress) exitWith {localize "str_epoch_player_103" call dayz_rollingMessages;};
|
||||
dayz_actionInProgress = true;
|
||||
|
||||
// Test cannot lock while another player is nearby
|
||||
//_playerNear = {isPlayer _x} count (player nearEntities ["CAManBase", 12]) > 1;
|
||||
//if(_playerNear) exitWith {DZE_ActionInProgress = false; localize "str_epoch_player_104" call dayz_rollingMessages;};
|
||||
//if(_playerNear) exitWith {dayz_actionInProgress = false; localize "str_epoch_player_104" call dayz_rollingMessages;};
|
||||
|
||||
// [part_out,part_in, qty_out, qty_in, loc];
|
||||
|
||||
@@ -208,4 +208,4 @@ if (_qty >= _qty_in) then {
|
||||
};
|
||||
};
|
||||
|
||||
DZE_ActionInProgress = false;
|
||||
dayz_actionInProgress = false;
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
private ["_part_out","_part_in","_qty_out","_qty_in","_qty","_bos","_bag","_class","_started","_finished","_animState","_isMedic","_num_removed","_needed","_activatingPlayer","_buy_o_sell","_textPartIn","_textPartOut","_traderID"];
|
||||
// [part_out,part_in, qty_out, qty_in,];
|
||||
|
||||
if (DZE_ActionInProgress) exitWith {localize "str_epoch_player_103" call dayz_rollingMessages;};
|
||||
DZE_ActionInProgress = true;
|
||||
if (dayz_actionInProgress) exitWith {localize "str_epoch_player_103" call dayz_rollingMessages;};
|
||||
dayz_actionInProgress = true;
|
||||
|
||||
_activatingPlayer = player;
|
||||
|
||||
@@ -57,7 +57,7 @@ if (!_finished) exitWith {
|
||||
[objNull, player, rSwitchMove,""] call RE;
|
||||
player playActionNow "stop";
|
||||
};
|
||||
DZE_ActionInProgress = false;
|
||||
dayz_actionInProgress = false;
|
||||
localize "str_epoch_player_106" call dayz_rollingMessages;
|
||||
};
|
||||
|
||||
@@ -132,4 +132,4 @@ if (_finished) then {
|
||||
};
|
||||
};
|
||||
|
||||
DZE_ActionInProgress = false;
|
||||
dayz_actionInProgress = false;
|
||||
@@ -1,8 +1,8 @@
|
||||
private ["_part_out","_part_in","_qty_out","_qty_in","_qty","_bos","_bag","_class","_started","_finished","_animState","_isMedic","_num_removed","_needed","_activatingPlayer","_buy_o_sell","_textPartIn","_textPartOut","_traderID"];
|
||||
// [part_out,part_in, qty_out, qty_in,];
|
||||
|
||||
if (DZE_ActionInProgress) exitWith {localize "str_epoch_player_103" call dayz_rollingMessages;};
|
||||
DZE_ActionInProgress = true;
|
||||
if (dayz_actionInProgress) exitWith {localize "str_epoch_player_103" call dayz_rollingMessages;};
|
||||
dayz_actionInProgress = true;
|
||||
|
||||
_activatingPlayer = player;
|
||||
|
||||
@@ -130,4 +130,4 @@ if (_qty >= _qty_in) then {
|
||||
format[localize "str_epoch_player_184",_needed,_textPartIn] call dayz_rollingMessages;
|
||||
};
|
||||
|
||||
DZE_ActionInProgress = false;
|
||||
dayz_actionInProgress = false;
|
||||
@@ -1,8 +1,8 @@
|
||||
private ["_part_out","_part_in","_qty_out","_qty_in","_qty","_buy_o_sell","_textPartIn","_textPartOut","_bos","_needed","_started","_finished","_animState","_isMedic","_total_parts_out","_abort","_removed","_activatingPlayer","_traderID","_done","_actualMags"];
|
||||
// [part_out,part_in, qty_out, qty_in,];
|
||||
|
||||
if (DZE_ActionInProgress) exitWith {localize "str_epoch_player_103" call dayz_rollingMessages;};
|
||||
DZE_ActionInProgress = true;
|
||||
if (dayz_actionInProgress) exitWith {localize "str_epoch_player_103" call dayz_rollingMessages;};
|
||||
dayz_actionInProgress = true;
|
||||
|
||||
_activatingPlayer = player;
|
||||
|
||||
@@ -146,4 +146,4 @@ while {r_autoTrade} do {
|
||||
uiSleep 1;
|
||||
};
|
||||
|
||||
DZE_ActionInProgress = false;
|
||||
dayz_actionInProgress = false;
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
private ["_part_out","_part_in","_qty_out","_qty_in","_qty","_buy_o_sell","_textPartIn","_textPartOut","_bos","_needed","_started","_finished","_animState","_isMedic","_total_parts_out","_abort","_removed","_tradeCounter","_next_highest_bar","_third_highest_bar","_next_highest_conv","_third_highest_conv","_third_parts_out_raw","_third_parts_out","_remainder","_next_parts_out_raw","_next_parts_out","_activatingPlayer","_traderID","_total_trades"];
|
||||
// [part_out,part_in, qty_out, qty_in,];
|
||||
|
||||
if (DZE_ActionInProgress) exitWith {localize "str_epoch_player_103" call dayz_rollingMessages;};
|
||||
DZE_ActionInProgress = true;
|
||||
if (dayz_actionInProgress) exitWith {localize "str_epoch_player_103" call dayz_rollingMessages;};
|
||||
dayz_actionInProgress = true;
|
||||
|
||||
_total_parts_out = 0;
|
||||
|
||||
@@ -36,7 +36,7 @@ _abort = false;
|
||||
if(_total_trades < 1) exitWith {
|
||||
_needed = _qty_in - _qty;
|
||||
format[localize "str_epoch_player_184",_needed,_textPartIn] call dayz_rollingMessages;
|
||||
DZE_ActionInProgress = false;
|
||||
dayz_actionInProgress = false;
|
||||
};
|
||||
|
||||
// perform number of total trades
|
||||
@@ -269,4 +269,4 @@ if(_total_parts_out >= 1) then {
|
||||
};
|
||||
};
|
||||
|
||||
DZE_ActionInProgress = false;
|
||||
dayz_actionInProgress = false;
|
||||
@@ -1,8 +1,8 @@
|
||||
private ["_part_out","_part_in","_qty_out","_qty_in","_textPartIn","_textPartOut","_qty","_needed","_started","_finished","_animState","_isMedic","_abort","_removed","_tradeCounter","_total_trades","_humanityGain","_humanity"];
|
||||
// [part_out,part_in, qty_out, qty_in,];
|
||||
|
||||
if (DZE_ActionInProgress) exitWith {localize "str_epoch_player_103" call dayz_rollingMessages;};
|
||||
DZE_ActionInProgress = true;
|
||||
if (dayz_actionInProgress) exitWith {localize "str_epoch_player_103" call dayz_rollingMessages;};
|
||||
dayz_actionInProgress = true;
|
||||
|
||||
_part_out = (_this select 3) select 0;
|
||||
_part_in = (_this select 3) select 1;
|
||||
@@ -21,7 +21,7 @@ _total_trades = floor (_qty / _qty_in);
|
||||
if(_total_trades < 1) exitWith {
|
||||
_needed = _qty_in - _qty;
|
||||
format[localize "str_epoch_player_184",_needed,_textPartIn] call dayz_rollingMessages;
|
||||
DZE_ActionInProgress = false;
|
||||
dayz_actionInProgress = false;
|
||||
};
|
||||
|
||||
_abort = false;
|
||||
@@ -117,4 +117,4 @@ for "_x" from 1 to _total_trades do {
|
||||
};
|
||||
|
||||
|
||||
DZE_ActionInProgress = false;
|
||||
dayz_actionInProgress = false;
|
||||
@@ -1,7 +1,7 @@
|
||||
private ["_buy","_metals_conversion","_cancel"];
|
||||
|
||||
if (DZE_ActionInProgress) exitWith {localize "str_epoch_player_103" call dayz_rollingMessages;};
|
||||
DZE_ActionInProgress = true;
|
||||
if (dayz_actionInProgress) exitWith {localize "str_epoch_player_103" call dayz_rollingMessages;};
|
||||
dayz_actionInProgress = true;
|
||||
|
||||
{player removeAction _x} count s_player_parts;s_player_parts = [];
|
||||
s_player_parts_crtl = 1;
|
||||
@@ -23,4 +23,4 @@ _metals_conversion = [
|
||||
_cancel = player addAction ["Cancel", "\z\addons\dayz_code\actions\trade_cancel.sqf",["na"], 0, true, false];
|
||||
s_player_parts set [count s_player_parts,_cancel];
|
||||
|
||||
DZE_ActionInProgress = false;
|
||||
dayz_actionInProgress = false;
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
private ["_part_out","_part_in","_qty_out","_qty_in","_qty","_buy_o_sell","_traderID","_bos","_needed","_activatingPlayer","_textPartIn","_textPartOut","_started","_finished","_animState","_isMedic","_removed"];
|
||||
// [part_out,part_in, qty_out, qty_in,"buy"];
|
||||
|
||||
if (DZE_ActionInProgress) exitWith {localize "str_epoch_player_103" call dayz_rollingMessages;};
|
||||
DZE_ActionInProgress = true;
|
||||
if (dayz_actionInProgress) exitWith {localize "str_epoch_player_103" call dayz_rollingMessages;};
|
||||
dayz_actionInProgress = true;
|
||||
|
||||
_activatingPlayer = player;
|
||||
|
||||
@@ -70,7 +70,7 @@ if(_buy_o_sell == "sell") then {
|
||||
|
||||
if (_abort) exitWith {
|
||||
_msg call dayz_rollingMessages;
|
||||
DZE_ActionInProgress = false;
|
||||
dayz_actionInProgress = false;
|
||||
};
|
||||
|
||||
localize "str_epoch_player_105" call dayz_rollingMessages;
|
||||
@@ -108,7 +108,7 @@ if (!_finished) exitWith {
|
||||
[objNull, player, rSwitchMove,""] call RE;
|
||||
player playActionNow "stop";
|
||||
};
|
||||
DZE_ActionInProgress = false;
|
||||
dayz_actionInProgress = false;
|
||||
localize "str_epoch_player_106" call dayz_rollingMessages;
|
||||
};
|
||||
|
||||
@@ -184,4 +184,4 @@ if (_finished) then {
|
||||
};
|
||||
};
|
||||
|
||||
DZE_ActionInProgress = false;
|
||||
dayz_actionInProgress = false;
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
private ["_part_out","_part_in","_qty_out","_qty_in","_qty","_buy_o_sell","_traderID","_bos","_needed","_activatingPlayer","_textPartIn","_textPartOut","_started","_finished","_animState","_isMedic","_removed"];
|
||||
// [part_out,part_in, qty_out, qty_in,"buy"];
|
||||
|
||||
if (DZE_ActionInProgress) exitWith {localize "str_epoch_player_103" call dayz_rollingMessages;};
|
||||
DZE_ActionInProgress = true;
|
||||
if (dayz_actionInProgress) exitWith {localize "str_epoch_player_103" call dayz_rollingMessages;};
|
||||
dayz_actionInProgress = true;
|
||||
|
||||
_activatingPlayer = player;
|
||||
|
||||
@@ -120,4 +120,4 @@ if (_qty >= _qty_in) then {
|
||||
format[localize "str_epoch_player_184",_needed,_textPartIn] call dayz_rollingMessages;
|
||||
};
|
||||
|
||||
DZE_ActionInProgress = false;
|
||||
dayz_actionInProgress = false;
|
||||
@@ -2,8 +2,8 @@ private["_vehicle","_key"];
|
||||
_vehicle = (_this select 3) select 0;
|
||||
_key = (_this select 3) select 1;
|
||||
|
||||
if (DZE_ActionInProgress) exitWith {localize "str_epoch_player_37" call dayz_rollingMessages;};
|
||||
DZE_ActionInProgress = true;
|
||||
if (dayz_actionInProgress) exitWith {localize "str_epoch_player_37" call dayz_rollingMessages;};
|
||||
dayz_actionInProgress = true;
|
||||
|
||||
{player removeAction _x} count s_player_lockunlock;s_player_lockunlock = [];
|
||||
s_player_lockUnlock_crtl = 1;
|
||||
@@ -23,4 +23,4 @@ if(player distance _vehicle < 10) then {
|
||||
|
||||
s_player_lockUnlock_crtl = -1;
|
||||
s_player_lockUnlockInside_ctrl = -1;
|
||||
DZE_ActionInProgress = false;
|
||||
dayz_actionInProgress = false;
|
||||
@@ -1,7 +1,7 @@
|
||||
private ["_ok"];
|
||||
|
||||
if (DZE_ActionInProgress) exitWith {localize "STR_EPOCH_PLAYER_21" call dayz_rollingMessages;};
|
||||
DZE_ActionInProgress = true;
|
||||
if (dayz_actionInProgress) exitWith {localize "STR_EPOCH_PLAYER_21" call dayz_rollingMessages;};
|
||||
dayz_actionInProgress = true;
|
||||
|
||||
dayz_selectedVault = _this select 3;
|
||||
dayz_combination = "";
|
||||
@@ -15,4 +15,4 @@ if(!isNull dayz_selectedVault) then {
|
||||
};
|
||||
};
|
||||
|
||||
DZE_ActionInProgress = false;
|
||||
dayz_actionInProgress = false;
|
||||
@@ -5,8 +5,8 @@
|
||||
private ["_tent","_location","_isOk","_cancel","_location3","_location4","_location1","_location2","_counter","_pondPos","_isPond","_ppos","_hastentitem","_dir","_building","_isBuilding","_playerPos","_item","_offset_x","_offset_y","_offset_z","_offset_z_attach","_config","_text","_tmpvault","_vault_location","_objectsPond","_combination_1","_combination_2","_combination_3","_combination_4","_combination","_removed"];
|
||||
//check if can pitch here
|
||||
|
||||
if (DZE_ActionInProgress) exitWith {localize "str_epoch_player_108" call dayz_rollingMessages;};
|
||||
DZE_ActionInProgress = true;
|
||||
if (dayz_actionInProgress) exitWith {localize "str_epoch_player_108" call dayz_rollingMessages;};
|
||||
dayz_actionInProgress = true;
|
||||
|
||||
_playerPos = getPosATL player;
|
||||
_item = _this;
|
||||
@@ -160,4 +160,4 @@ if(!_cancel) then {
|
||||
localize "str_epoch_player_111" call dayz_rollingMessages;
|
||||
};
|
||||
|
||||
DZE_ActionInProgress = false;
|
||||
dayz_actionInProgress = false;
|
||||
Reference in New Issue
Block a user