Update EffectTarget.scala

Set back to findLast after review
This commit is contained in:
ScrawnyRonnie 2023-11-07 21:38:28 -05:00 committed by GitHub
parent 537417f880
commit 9e76fcc42a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -85,7 +85,7 @@ object EffectTarget {
private def CommonRepairConditions(v: Vehicle): Boolean = {
v.Health > 0 && v.Health < v.MaxHealth &&
(v.History.find { entry => entry.isInstanceOf[DamagingActivity] } match {
(v.History.findLast { entry => entry.isInstanceOf[DamagingActivity] } match {
case Some(entry) if System.currentTimeMillis() - entry.time < 5000L => false
case _ => true
})