Upgrade Building tweaks

This commit is contained in:
He-Man 2018-05-17 19:22:15 +02:00
parent 361d7382b6
commit 09fdb7170c
2 changed files with 5 additions and 5 deletions

View File

@ -101,7 +101,7 @@ if (_object isKindOf "Constructions_static_F") then {
_canUpgrade = true; _canUpgrade = true;
_canUpgradePartCount = 0; _canUpgradePartCount = 0;
_missingParts = ""; _missingParts = "Missing: ";
{ {
_part = _x select 0; _part = _x select 0;
_req = _x select 1; _req = _x select 1;
@ -111,7 +111,7 @@ if (_object isKindOf "Constructions_static_F") then {
_missingCount = _req - _partCheck; _missingCount = _req - _partCheck;
_canUpgrade = false; _canUpgrade = false;
_missingParts = _missingParts + format["Missing %1 %2, ", _missingCount, (_part call EPOCH_itemDisplayName)]; _missingParts = _missingParts + format["%1 %2, ", _missingCount, (_part call EPOCH_itemDisplayName)];
}; };
_canUpgradePartCount = _canUpgradePartCount + _req; _canUpgradePartCount = _canUpgradePartCount + _req;
} forEach _upgradeParts; } forEach _upgradeParts;
@ -124,14 +124,14 @@ if (_object isKindOf "Constructions_static_F") then {
_countdoors = count (nearestobjects [_nearestJammer,_doors,_buildingJammerRange]); _countdoors = count (nearestobjects [_nearestJammer,_doors,_buildingJammerRange]);
if (_countdoors >= _maxdoors) then { if (_countdoors >= _maxdoors) then {
_canUpgrade = false; _canUpgrade = false;
_missingParts = _missingParts + format["Can not upgrade to locked Door! Max %1 allowed per Base!", _maxdoors]; _missingParts = format["Can not upgrade to locked Door! Max %1 allowed per Base!", _maxdoors];
}; };
}; };
if (_upgradeto in _gates) then { if (_upgradeto in _gates) then {
_countgates = count (nearestobjects [_nearestJammer,_gates,_buildingJammerRange]); _countgates = count (nearestobjects [_nearestJammer,_gates,_buildingJammerRange]);
if (_countgates >= _maxgates) then { if (_countgates >= _maxgates) then {
_canUpgrade = false; _canUpgrade = false;
_missingParts = _missingParts + format["Can not upgrade to Gate! Max %1 allowed per Base!", _maxgates]; _missingParts = format["Can not upgrade to Gate! Max %1 allowed per Base!", _maxgates];
}; };
}; };
}; };

View File

@ -710,7 +710,7 @@ class CfgBaseBuilding
}; };
class WoodLargeWallCor_EPOCH : Default class WoodLargeWallCor_EPOCH : Default
{ {
upgradeBuilding[] = {{"WoodLargeWallDoorway_EPOCH",{{"PartPlankPack",1}}},{"MetalWallGarage_EPOCH",{{"PartPlankPack",4},{"ItemCorrugated",1},{"CircuitParts",1}}}}; upgradeBuilding[] = {{"WoodLargeWallDoorway_EPOCH",{{"PartPlankPack",1}}},{"MetalWallGarage_EPOCH",{{"ItemCorrugated",1},{"PartPlankPack",4},{"CircuitParts",1}}}};
removeParts[] = {{"PartPlankPack",2},{"ItemCorrugated",1}}; removeParts[] = {{"PartPlankPack",2},{"ItemCorrugated",1}};
simulClass = "WoodLargeWallCor_SIM_EPOCH"; simulClass = "WoodLargeWallCor_SIM_EPOCH";
staticClass = "WoodLargeWallCor_EPOCH"; staticClass = "WoodLargeWallCor_EPOCH";