mirror of
https://github.com/EpochModTeam/DayZ-Epoch.git
synced 2025-12-14 12:12:34 +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;
|
||||||
|
|||||||
@@ -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,8 +51,7 @@ 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];};
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user