From 0ccc0c02fb4ed3c5d0f7bd7fb9b1d5337551e3c7 Mon Sep 17 00:00:00 2001 From: He-Man Date: Mon, 24 Oct 2016 22:45:14 +0200 Subject: [PATCH 1/4] Update EPOCH_Group_BtnInvite.sqf If two players from the same group connect at exact the same time, they can not "find" and join each others Group. So you can invite the other player again and he is doubled in the Group. This prevents from inviting again. Already implemented on our Server since a few weeks without problems. --- Sources/epoch_code/gui/scripts/group/EPOCH_Group_BtnInvite.sqf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Sources/epoch_code/gui/scripts/group/EPOCH_Group_BtnInvite.sqf b/Sources/epoch_code/gui/scripts/group/EPOCH_Group_BtnInvite.sqf index edf91185..6196af9a 100644 --- a/Sources/epoch_code/gui/scripts/group/EPOCH_Group_BtnInvite.sqf +++ b/Sources/epoch_code/gui/scripts/group/EPOCH_Group_BtnInvite.sqf @@ -25,7 +25,7 @@ if (_playerUID == Epoch_my_GroupUID || {_x select 0 == _playerUID}count (Epoch_m _InvitePlayerCombo = (findDisplay -1300) displayCtrl 41; _playerUID = _InvitePlayerCombo lbData (lbCurSel _InvitePlayerCombo); _playerName = _InvitePlayerCombo lbText (lbCurSel _InvitePlayerCombo); - if (_playerUID != "" && _playerName != "") then { + if (_playerUID != "" && _playerName != "" && ({_playerUID in _x} count (Epoch_my_Group select 3) == 0) && ({_playerUID in _x} count (Epoch_my_Group select 4) == 0) && !(_playerUID == Epoch_my_GroupUID)) then { _txt = format["Do you want to add %1 to your Group?",_playerName]; [_playerUID,_txt] spawn { _ret = [_this select 1,"Epoch Group Menu",true,true] call BIS_fnc_GUImessage; From 897653f8eedd30c1bc9cd94bac9db948aeb1af73 Mon Sep 17 00:00:00 2001 From: He-Man Date: Mon, 24 Oct 2016 22:53:26 +0200 Subject: [PATCH 2/4] Update EPOCH_upgradeBUILD.sqf This was missing in my Changes for Building restrictions. With this, the Configs "maxdoors" and "maxgates" are useable. --- .../compile/building/EPOCH_upgradeBUILD.sqf | 24 +++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/Sources/epoch_code/compile/building/EPOCH_upgradeBUILD.sqf b/Sources/epoch_code/compile/building/EPOCH_upgradeBUILD.sqf index 4001a52b..0dd45fde 100644 --- a/Sources/epoch_code/compile/building/EPOCH_upgradeBUILD.sqf +++ b/Sources/epoch_code/compile/building/EPOCH_upgradeBUILD.sqf @@ -83,6 +83,10 @@ if (_object isKindOf "Constructions_static_F") then { // take upgrade item from player here _config = 'CfgBaseBuilding' call EPOCH_returnConfig; + _config2 = 'CfgEpochClient' call EPOCH_returnConfig; + _buildingJammerRange = getNumber(_config2 >> "buildingJammerRange"); + _maxdoors = getNumber(_config2 >> "maxdoors"); + _maxgates = getNumber(_config2 >> "maxgates"); _upgrades = getArray(_config >> (typeOf _object) >> "upgradeBuilding"); if !(_upgrades isEqualTo []) then { @@ -108,6 +112,26 @@ if (_object isKindOf "Constructions_static_F") then { }; _canUpgradePartCount = _canUpgradePartCount + _req; } forEach _upgradeParts; + + _doors = ["WoodLargeWallDoorL_EPOCH","WoodWall4_EPOCH"]; + _gates = ["CinderWallGarage_EPOCH"]; + if (_canUpgrade) then { + _upgradeto = _upgrade select 0; + if (_upgradeto in _doors) then { + _countdoors = count (nearestobjects [_nearestJammer,_doors,_buildingJammerRange]); + if (_countdoors >= _maxdoors) then { + _canUpgrade = false; + _missingParts = _missingParts + format["Can not upgrade to locked Door! Max %1 allowed per Base!", _maxdoors]; + }; + }; + if (_upgradeto in _gates) then { + _countgates = count (nearestobjects [_nearestJammer,_gates,_buildingJammerRange]); + if (_countgates >= _maxgates) then { + _canUpgrade = false; + _missingParts = _missingParts + format["Can not upgrade to Gate! Max %1 allowed per Base!", _maxgates]; + }; + }; + }; _removedPartCount = 0; if (_canUpgrade) then { From 19c171aed1b5e9fbd58077521d62fb8a57a2ea1b Mon Sep 17 00:00:00 2001 From: He-Man Date: Mon, 24 Oct 2016 23:01:40 +0200 Subject: [PATCH 3/4] Update EPOCH_upgradeBUILD.sqf --- Sources/epoch_code/compile/building/EPOCH_upgradeBUILD.sqf | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Sources/epoch_code/compile/building/EPOCH_upgradeBUILD.sqf b/Sources/epoch_code/compile/building/EPOCH_upgradeBUILD.sqf index 0dd45fde..b6cca135 100644 --- a/Sources/epoch_code/compile/building/EPOCH_upgradeBUILD.sqf +++ b/Sources/epoch_code/compile/building/EPOCH_upgradeBUILD.sqf @@ -87,6 +87,8 @@ if (_object isKindOf "Constructions_static_F") then { _buildingJammerRange = getNumber(_config2 >> "buildingJammerRange"); _maxdoors = getNumber(_config2 >> "maxdoors"); _maxgates = getNumber(_config2 >> "maxgates"); + if (_maxdoors == 0) then {_maxdoors = 12}; + if (_maxgates == 0) then {_maxgates = 10}; _upgrades = getArray(_config >> (typeOf _object) >> "upgradeBuilding"); if !(_upgrades isEqualTo []) then { From 00a626604ff1e398f58980cad2c408f0b9258ede Mon Sep 17 00:00:00 2001 From: He-Man Date: Mon, 24 Oct 2016 23:02:46 +0200 Subject: [PATCH 4/4] Update EPOCH_upgradeBUILD.sqf --- Sources/epoch_code/compile/building/EPOCH_upgradeBUILD.sqf | 1 + 1 file changed, 1 insertion(+) diff --git a/Sources/epoch_code/compile/building/EPOCH_upgradeBUILD.sqf b/Sources/epoch_code/compile/building/EPOCH_upgradeBUILD.sqf index b6cca135..f37a7340 100644 --- a/Sources/epoch_code/compile/building/EPOCH_upgradeBUILD.sqf +++ b/Sources/epoch_code/compile/building/EPOCH_upgradeBUILD.sqf @@ -87,6 +87,7 @@ if (_object isKindOf "Constructions_static_F") then { _buildingJammerRange = getNumber(_config2 >> "buildingJammerRange"); _maxdoors = getNumber(_config2 >> "maxdoors"); _maxgates = getNumber(_config2 >> "maxgates"); + if (_buildingJammerRange == 0) then {_buildingJammerRange = 150}; if (_maxdoors == 0) then {_maxdoors = 12}; if (_maxgates == 0) then {_maxgates = 10};