Remove incorrect comment and merge nested conditionals.
This commit is contained in:
@@ -121,10 +121,7 @@ namespace OpenRA.Mods.Common.Traits
|
||||
if (Info.TotalCap > 0)
|
||||
{
|
||||
var totalCount = permanentTokens.Values.Sum(t => t.Count) + timedTokens.Count;
|
||||
if (totalCount >= Info.TotalCap)
|
||||
{
|
||||
// Prefer tokens from the same source
|
||||
if (timedTokens.Count > 0)
|
||||
if (totalCount >= Info.TotalCap && timedTokens.Count > 0)
|
||||
{
|
||||
var expire = timedTokens[0].Token;
|
||||
if (self.TokenValid(expire))
|
||||
@@ -133,7 +130,6 @@ namespace OpenRA.Mods.Common.Traits
|
||||
timedTokens.RemoveAt(0);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
var timedToken = new TimedToken(token, self, source, remaining);
|
||||
var index = timedTokens.FindIndex(t => t.Expires >= timedToken.Expires);
|
||||
|
||||
Reference in New Issue
Block a user