add profit to search and rescue
This commit is contained in:
parent
8cf8d7f529
commit
5fe652f98c
@ -39,7 +39,7 @@ public class DiscordLogGenerator {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (sb.Length > 0) {
|
if (sb.Length > 0) {
|
||||||
sb.Append(", ");
|
sb.Append("; ");
|
||||||
}
|
}
|
||||||
|
|
||||||
sb.Append(summary);
|
sb.Append(summary);
|
||||||
|
@ -6,13 +6,17 @@ namespace EliteBGS.LogGenerator;
|
|||||||
|
|
||||||
public class SearchAndRescueFormat : GenericFormat<SearchAndRescue> {
|
public class SearchAndRescueFormat : GenericFormat<SearchAndRescue> {
|
||||||
public override string GenerateSummary(Objective objective) {
|
public override string GenerateSummary(Objective objective) {
|
||||||
long profit = objective
|
long tons = objective
|
||||||
.EnabledOfType<SearchAndRescue>()
|
.EnabledOfType<SearchAndRescue>()
|
||||||
.Sum(x => x.Count)
|
.Sum(x => x.Count)
|
||||||
;
|
;
|
||||||
if (profit <= 0) {
|
long profit = objective
|
||||||
|
.EnabledOfType<SearchAndRescue>()
|
||||||
|
.Sum(x => x.Reward)
|
||||||
|
;
|
||||||
|
if (tons <= 0) {
|
||||||
return "";
|
return "";
|
||||||
}
|
}
|
||||||
return string.Format("S&R: {0}t", profit);
|
return string.Format("S&R: {0}t, {1} profit", tons, Credits.FormatMillions(profit));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user