Plot Management cleanup + improvement

New compile DZE_GetPlotFriends

DZE_PlotManagementAdmins allows admin management of plot poles and
buildables near poles

DZE_MaxPlotFriends allows servers to allow more than 6 friends on a pole
at once
This commit is contained in:
icomrade
2016-05-01 13:20:21 -04:00
parent 9e2728af07
commit 1e65f7a959
8 changed files with 62 additions and 111 deletions

View File

@@ -44,29 +44,17 @@ if(_IsNearPlot == 0) then {
};
} else {
if(!_isPole) then {
// plotManagement //
if( DZE_plotManagement ) then {
_friendlies = _nearestPole getVariable ["plotfriends",[]];
_fuid = [];
{
_friendUID = _x select 0;
_fuid = _fuid + [_friendUID];
} forEach _friendlies;
_builder = getPlayerUID player;
// check if friendly to owner
if(dayz_playerUID in _fuid) then {
_allowedUIDs = [_nearestPole, false, true] call dze_getPlotFriends;
if((dayz_playerUID in _allowedUIDs) || (dayz_characterID in _allowedUIDs)) then {
_canBuild = true;
};
} else {
// plotManagement //
_friendlies = player getVariable ["friendlyTo",[]];
// check if friendly to owner
_friendlies = player getVariable ["friendlyTo",[]];
if(_ownerID in _friendlies) then {
_canBuild = true;
};
// plotManagement //
};
// plotManagement //
};
};
};