Implement "Train Militia Anywhere"

Subtract supplies when starting mission

Fix second stage mission strategic event
This commit is contained in:
rftrdev
2022-10-14 00:26:38 -07:00
parent feaf9827c9
commit dea5da5fc6
2 changed files with 25 additions and 9 deletions
+2 -2
View File
@@ -1980,7 +1980,7 @@ BOOLEAN CanCharacterTrainMilitia( SOLDIERTYPE *pSoldier )
}
}
if (RebelCommand::CanTrainMilitiaAnywhere())
if (RebelCommand::CanTrainMilitiaAnywhere() && GetTownIdForSector(pSoldier->sSectorX, pSoldier->sSectorY) == BLANK_SECTOR)
ubFacilityTrainersAllowed = RebelCommand::GetMaxTrainersForTrainMilitiaAnywhere();
// Count number of trainers already operating here
@@ -20182,7 +20182,7 @@ BOOLEAN CanCharacterTrainMilitiaWithErrorReport( SOLDIERTYPE *pSoldier )
}
}
if (RebelCommand::CanTrainMilitiaAnywhere())
if (RebelCommand::CanTrainMilitiaAnywhere() && GetTownIdForSector(pSoldier->sSectorX, pSoldier->sSectorY) == BLANK_SECTOR)
ubFacilityTrainersAllowed = RebelCommand::GetMaxTrainersForTrainMilitiaAnywhere();
// If we are here, then TrainersAllowed > 0.