diff --git a/GameSettings.cpp b/GameSettings.cpp index fbf875199..b5cb27d25 100644 --- a/GameSettings.cpp +++ b/GameSettings.cpp @@ -1569,6 +1569,7 @@ void LoadGameExternalOptions() gGameExternalOptions.fAdvRepairSystem = iniReader.ReadBoolean("Strategic Gameplay Settings","ADVANCED_REPAIR", FALSE); gGameExternalOptions.fOnlyRepairGunsArmour = iniReader.ReadBoolean("Strategic Gameplay Settings","ONLY_REPAIR_GUNS_AND_ARMOUR", FALSE); gGameExternalOptions.fDirtSystem = iniReader.ReadBoolean("Strategic Gameplay Settings","DIRT_SYSTEM", FALSE); + gGameExternalOptions.fFullRepairCleansGun = iniReader.ReadBoolean("Strategic Gameplay Settings","FULL_REPAIR_CLEANS_GUN", FALSE); gGameExternalOptions.usSectorDirtDivider = iniReader.ReadInteger("Strategic Gameplay Settings","SECTOR_DIRT_DIVIDER", 1000, 1, 100000); // Flugente: prisoner system diff --git a/GameSettings.h b/GameSettings.h index 2392ed6b1..ff962c9e2 100644 --- a/GameSettings.h +++ b/GameSettings.h @@ -1182,6 +1182,7 @@ typedef struct BOOLEAN fAdvRepairSystem; // allow thresholds to repairing BOOLEAN fOnlyRepairGunsArmour; // we can only repair guns and armour BOOLEAN fDirtSystem; // allow dirt on items increase the chance for weapon jamming + BOOLEAN fFullRepairCleansGun; // repairing a gun up to its current repair threshold also cleans the gun UINT32 usSectorDirtDivider; // divide a guns dirt factor by this to get dirt increase for every turn // Flugente: prisoner related settings diff --git a/Strategic/Assignments.cpp b/Strategic/Assignments.cpp index 3ea5ee9f1..5fc8602f0 100644 --- a/Strategic/Assignments.cpp +++ b/Strategic/Assignments.cpp @@ -3935,7 +3935,7 @@ BOOLEAN RepairObject( SOLDIERTYPE * pSoldier, SOLDIERTYPE * pOwner, OBJECTTYPE * if ( (*pObj)[ubLoop]->data.objectStatus == threshold ) { // if item was fully repaired, consider it cleaned - if ( gGameExternalOptions.fDirtSystem ) + if ( gGameExternalOptions.fDirtSystem && gGameExternalOptions.fFullRepairCleansGun ) (*pObj)[ubLoop]->data.bDirtLevel = 0.0f; } // note: this system is bad if we can repair only 1% per hour (which is rather we are total losers)