v1.0.13.1 (first post-1.0 patch)
This commit is contained in:
@@ -229,7 +229,7 @@ namespace Barotrauma
|
||||
#if DEBUG
|
||||
ShipCommandLog("Current importance for " + shipIssueWorker + " was " + importance + " and it was already being attended by " + shipIssueWorker.OrderedCharacter);
|
||||
#endif
|
||||
attendedIssues.Add(shipIssueWorker);
|
||||
InsertIssue(shipIssueWorker, attendedIssues);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -237,19 +237,26 @@ namespace Barotrauma
|
||||
ShipCommandLog("Current importance for " + shipIssueWorker + " was " + importance + " and it is not attended to");
|
||||
#endif
|
||||
shipIssueWorker.RemoveOrder();
|
||||
availableIssues.Add(shipIssueWorker);
|
||||
InsertIssue(shipIssueWorker, availableIssues);
|
||||
}
|
||||
}
|
||||
|
||||
availableIssues.Sort((x, y) => y.Importance.CompareTo(x.Importance));
|
||||
attendedIssues.Sort((x, y) => x.Importance.CompareTo(y.Importance));
|
||||
static void InsertIssue(ShipIssueWorker issue, List<ShipIssueWorker> list)
|
||||
{
|
||||
int index = 0;
|
||||
while (index < list.Count && list[index].Importance > issue.Importance)
|
||||
{
|
||||
index++;
|
||||
}
|
||||
list.Insert(index, issue);
|
||||
}
|
||||
|
||||
ShipIssueWorker mostImportantIssue = availableIssues.FirstOrDefault();
|
||||
|
||||
float bestValue = 0f;
|
||||
Character bestCharacter = null;
|
||||
|
||||
if (mostImportantIssue != null && mostImportantIssue.Importance > MinimumIssueThreshold)
|
||||
if (mostImportantIssue != null && mostImportantIssue.Importance >= MinimumIssueThreshold)
|
||||
{
|
||||
IEnumerable<Character> bestCharacters = CrewManager.GetCharactersSortedForOrder(mostImportantIssue.SuggestedOrder, AlliedCharacters, character, true);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user