mirror of
https://github.com/1dot13/source.git
synced 2026-08-12 14:10:23 +02:00
Implement "Train Militia Anywhere"
Subtract supplies when starting mission Fix second stage mission strategic event
This commit is contained in:
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user