Removes unneeded parameters passed to oxfordJoin

This commit is contained in:
2021-03-25 01:19:44 -07:00
parent 4426ed52eb
commit 6d95a5f094

View File

@@ -631,8 +631,7 @@ public class Monster: NSManagedObject {
get { get {
// TODO: sort "bludgeoning, piercing, and slashing from nonmagical attacks" to the end and use ; as a separator before it. // TODO: sort "bludgeoning, piercing, and slashing from nonmagical attacks" to the end and use ; as a separator before it.
let sortedVulnerabilities = self.damageVulnerabilities?.sorted() ?? [] let sortedVulnerabilities = self.damageVulnerabilities?.sorted() ?? []
return StringHelper.oxfordJoin(sortedVulnerabilities)
return StringHelper.oxfordJoin(sortedVulnerabilities, ", ", ", and ", " and ")
} }
} }
@@ -640,7 +639,7 @@ public class Monster: NSManagedObject {
get { get {
// TODO: sort "bludgeoning, piercing, and slashing from nonmagical attacks" to the end and use ; as a separator before it. // TODO: sort "bludgeoning, piercing, and slashing from nonmagical attacks" to the end and use ; as a separator before it.
let sortedResistances = self.damageResistances?.sorted() ?? [] let sortedResistances = self.damageResistances?.sorted() ?? []
return StringHelper.oxfordJoin(sortedResistances, ", ", ", and ", " and ") return StringHelper.oxfordJoin(sortedResistances)
} }
} }
@@ -648,14 +647,14 @@ public class Monster: NSManagedObject {
get { get {
// TODO: sort "bludgeoning, piercing, and slashing from nonmagical attacks" to the end and use ; as a separator before it. // TODO: sort "bludgeoning, piercing, and slashing from nonmagical attacks" to the end and use ; as a separator before it.
let sortedImmunities = self.damageImmunities?.sorted() ?? [] let sortedImmunities = self.damageImmunities?.sorted() ?? []
return StringHelper.oxfordJoin(sortedImmunities, ", ", ", and ", " and ") return StringHelper.oxfordJoin(sortedImmunities)
} }
} }
var conditionImmunitiesDescription: String { var conditionImmunitiesDescription: String {
get { get {
let sortedImmunities = self.conditionImmunities?.sorted() ?? [] let sortedImmunities = self.conditionImmunities?.sorted() ?? []
return StringHelper.oxfordJoin(sortedImmunities, ", ", ", and ", " and ") return StringHelper.oxfordJoin(sortedImmunities)
} }
} }