Advanced repairs skill check (#581)

* Add technician level skill check for advanced repair

* changed readability
This commit is contained in:
Greysa
2026-03-17 10:35:29 +01:00
committed by GitHub
parent 481e95d42d
commit 0a758179c2
3 changed files with 7 additions and 1 deletions
+5 -1
View File
@@ -5171,8 +5171,12 @@ BOOLEAN RepairObject( SOLDIERTYPE * pSoldier, SOLDIERTYPE * pOwner, OBJECTTYPE *
INT16 threshold = 100;
if ( gGameExternalOptions.fAdvRepairSystem && (Item[pObj->usItem].usItemClass & (IC_WEAPON|IC_ARMOUR)) )
{
if ( !gSkillTraitValues.fTETraitsCanRestoreItemThreshold || !HAS_SKILL_TRAIT( pSoldier, TECHNICIAN_NT ) )
if (gSkillTraitValues.fTETraitsCanRestoreItemThreshold && NUM_SKILL_TRAITS(pSoldier, TECHNICIAN_NT) >= gSkillTraitValues.ubTechLevelNeededForAdvancedRepair) // Greysa: added skill check for advanced repair. If we have a high enough technician level, we can repair items above the normal threshold (1 for technician, 2 for engineer)
{
threshold = 100;
}
else
{
threshold = (*pObj)[ubLoop]->data.sRepairThreshold;
}
}