mirror of
https://github.com/EpochModTeam/DayZ-Epoch.git
synced 2025-12-14 04:02:37 +03:00
Update tent base class name
DZ_storage_base is now the base class for all tent and stash types.
This commit is contained in:
@@ -82,7 +82,7 @@ if (_abort) exitWith {
|
|||||||
DZE_ActionInProgress = false;
|
DZE_ActionInProgress = false;
|
||||||
};
|
};
|
||||||
|
|
||||||
_canBuild = [_pos, _this, true] call DZE_BuildChecks;
|
_canBuild = [_pos, _this, true] call dze_buildChecks;
|
||||||
if (_canBuild select 0) then {
|
if (_canBuild select 0) then {
|
||||||
_classname = getText (configFile >> "CfgMagazines" >> DZE_buildItem >> "ItemActions" >> "Build" >> "create");
|
_classname = getText (configFile >> "CfgMagazines" >> DZE_buildItem >> "ItemActions" >> "Build" >> "create");
|
||||||
_classnametmp = _classname;
|
_classnametmp = _classname;
|
||||||
|
|||||||
@@ -88,7 +88,7 @@ if(_abort) exitWith {
|
|||||||
DZE_ActionInProgress = false;
|
DZE_ActionInProgress = false;
|
||||||
};
|
};
|
||||||
|
|
||||||
_canBuild = [_pos, _item, true] call DZE_BuildChecks;
|
_canBuild = [_pos, _item, true] call dze_buildChecks;
|
||||||
if (_canBuild select 0) then {
|
if (_canBuild select 0) then {
|
||||||
_classname = getText (configFile >> "CfgMagazines" >> _item >> "ItemActions" >> "Build" >> "create");
|
_classname = getText (configFile >> "CfgMagazines" >> _item >> "ItemActions" >> "Build" >> "create");
|
||||||
_classnametmp = _classname;
|
_classnametmp = _classname;
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ private ["_requireplot","_distance","_canBuild","_friendlies","_nearestPole","_o
|
|||||||
_pos = _this select 0;
|
_pos = _this select 0;
|
||||||
_item = _this select 1;
|
_item = _this select 1;
|
||||||
_toolCheck = _this select 2;
|
_toolCheck = _this select 2;
|
||||||
_classname = getText (configFile >> "CfgMagazines" >> _item >> "ItemActions" >> "Build" >> "create");
|
_classname = getText (configFile >> "CfgMagazines" >> _item >> "ItemActions" >> "Build" >> "create");
|
||||||
_requireplot = DZE_requireplot;
|
_requireplot = DZE_requireplot;
|
||||||
if(isNumber (configFile >> "CfgVehicles" >> _classname >> "requireplot")) then {
|
if(isNumber (configFile >> "CfgVehicles" >> _classname >> "requireplot")) then {
|
||||||
_requireplot = getNumber(configFile >> "CfgVehicles" >> _classname >> "requireplot");
|
_requireplot = getNumber(configFile >> "CfgVehicles" >> _classname >> "requireplot");
|
||||||
@@ -13,24 +13,21 @@ _isPole = (_classname == "Plastic_Pole_EP1_DZ");
|
|||||||
_isLandFireDZ = (_classname == "Land_Fire_DZ");
|
_isLandFireDZ = (_classname == "Land_Fire_DZ");
|
||||||
_needText = localize "str_epoch_player_246";
|
_needText = localize "str_epoch_player_246";
|
||||||
|
|
||||||
_distance = DZE_PlotPole select 0;
|
_distance = if (_isPole) then {DZE_PlotPole select 1} else {DZE_PlotPole select 0};
|
||||||
_canBuild = false;
|
_canBuild = false;
|
||||||
_nearestPole = objNull;
|
_nearestPole = objNull;
|
||||||
_ownerID = 0;
|
_ownerID = 0;
|
||||||
_friendlies = [];
|
_friendlies = [];
|
||||||
if(_isPole) then {
|
|
||||||
_distance = DZE_PlotPole select 1;
|
|
||||||
};
|
|
||||||
|
|
||||||
_findNearestPoles = nearestObjects [_pos, ["Plastic_Pole_EP1_DZ"], _distance];
|
_findNearestPoles = nearestObjects [_pos, ["Plastic_Pole_EP1_DZ"], _distance];
|
||||||
_findNearestPole = [];
|
_findNearestPole = [];
|
||||||
{
|
{
|
||||||
if (alive _x) then {
|
if (alive _x) then {
|
||||||
_findNearestPole set [(count _findNearestPole),_x];
|
_findNearestPole set [count _findNearestPole,_x];
|
||||||
};
|
};
|
||||||
} count _findNearestPoles;
|
} count _findNearestPoles;
|
||||||
|
|
||||||
_IsNearPlot = count (_findNearestPole);
|
_IsNearPlot = count _findNearestPole;
|
||||||
if(_isPole && {_IsNearPlot > 0}) exitWith {DZE_ActionInProgress = false; format[localize "str_epoch_player_44",_distance] call dayz_rollingMessages; [_canBuild, _isPole];};
|
if(_isPole && {_IsNearPlot > 0}) exitWith {DZE_ActionInProgress = false; format[localize "str_epoch_player_44",_distance] call dayz_rollingMessages; [_canBuild, _isPole];};
|
||||||
if(_IsNearPlot == 0) then {
|
if(_IsNearPlot == 0) then {
|
||||||
if (_requireplot == 0 || _isLandFireDZ) then {
|
if (_requireplot == 0 || _isLandFireDZ) then {
|
||||||
@@ -54,14 +51,13 @@ if(_IsNearPlot == 0) then {
|
|||||||
};
|
};
|
||||||
if(!_canBuild) exitWith { DZE_ActionInProgress = false; format[localize "STR_EPOCH_PLAYER_135",_needText,_distance] call dayz_rollingMessages; [_canBuild, _isPole];};
|
if(!_canBuild) exitWith { DZE_ActionInProgress = false; format[localize "STR_EPOCH_PLAYER_135",_needText,_distance] call dayz_rollingMessages; [_canBuild, _isPole];};
|
||||||
|
|
||||||
_buildables = DZE_maintainClasses + DZE_LockableStorage + ["DZ_buildables"];
|
_buildables = DZE_maintainClasses + DZE_LockableStorage + ["DZ_buildables","DZ_storage_base"];
|
||||||
_buildables set [count _buildables,"TentStorage"];
|
|
||||||
_center = if (isNull _nearestPole) then {_pos} else {_nearestPole};
|
_center = if (isNull _nearestPole) then {_pos} else {_nearestPole};
|
||||||
if ((count (nearestObjects [_center,_buildables,_distance])) >= DZE_BuildingLimit) exitWith {DZE_ActionInProgress = false; format[localize "str_epoch_player_41",_distance] call dayz_rollingMessages; [false, _isPole];};
|
if ((count (nearestObjects [_center,_buildables,_distance])) >= DZE_BuildingLimit) exitWith {DZE_ActionInProgress = false; format[localize "str_epoch_player_41",_distance] call dayz_rollingMessages; [false, _isPole];};
|
||||||
|
|
||||||
if (_toolCheck) then {
|
if (_toolCheck) then {
|
||||||
_require = getArray (configFile >> "cfgMagazines" >> _item >> "ItemActions" >> "Build" >> "require");
|
_require = getArray (configFile >> "cfgMagazines" >> _item >> "ItemActions" >> "Build" >> "require");
|
||||||
_classname = getText (configFile >> "CfgMagazines" >> _item >> "ItemActions" >> "Build" >> "create");
|
_classname = getText (configFile >> "CfgMagazines" >> _item >> "ItemActions" >> "Build" >> "create");
|
||||||
_canBuild = [_item, _require, _classname] call dze_requiredItemsCheck;
|
_canBuild = [_item, _require, _classname] call dze_requiredItemsCheck;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
private ["_missingText","_hasrequireditem","_hastoolweapon","_item","_require","_missing","_text","_classname","_hasbuilditem"];
|
private ["_missingText","_hasrequireditem","_hastoolweapon","_item","_require","_missing","_text","_classname","_hasbuilditem"];
|
||||||
|
|
||||||
_item = _this select 0;
|
_item = _this select 0;
|
||||||
_require = _this select 1;
|
_require = _this select 1;
|
||||||
_classname = _this select 2;
|
_classname = _this select 2;
|
||||||
_missing = [];
|
_missing = [];
|
||||||
_missingText = "";
|
_missingText = "";
|
||||||
|
|||||||
Reference in New Issue
Block a user