Skip to content

Commit

Permalink
More debug logging for mission scripts processing
Browse files Browse the repository at this point in the history
  • Loading branch information
MeridianOXC committed Oct 22, 2023
1 parent 545317d commit f1777b0
Showing 1 changed file with 17 additions and 3 deletions.
20 changes: 17 additions & 3 deletions src/Geoscape/GeoscapeState.cpp
Expand Up @@ -3784,10 +3784,24 @@ void GeoscapeState::determineAlienMissions()
throw Exception(ss.str());
}
// level four condition check: does random chance favour this command's execution?
if (process && RNG::percent(command->getExecutionOdds()))
if (process)
{
// good news, little command pointer! you're FDA approved! off to the main processing facility with you!
success = processCommand(command);
bool rngret = RNG::percent(command->getExecutionOdds());
if (Options::verboseLogging && Options::oxceGeoscapeDebugLogMaxEntries > 0)
{
std::ostringstream ss;
ss << "month: " << month;
ss << " script: " << command->getType();
ss << " odds: " << command->getExecutionOdds();
ss << " rng: " << rngret;
save->getGeoscapeDebugLog().push_back(ss.str());
}
if (rngret)
{
// good news, little command pointer! you're FDA approved! off to the main processing facility with you!
success = processCommand(command);
}

}
if (command->getLabel() > 0)
{
Expand Down

0 comments on commit f1777b0

Please sign in to comment.