mirror of
https://github.com/2revoemag/PSF-BotServer.git
synced 2026-01-19 18:14:44 +00:00
Lodestar repairs vehicles now and damage interrupts repairing
This commit is contained in:
parent
d228784e1c
commit
26824da624
|
|
@ -9937,8 +9937,8 @@ object GlobalDefinitions {
|
|||
lodestar_repair_terminal.Name = "lodestar_repair_terminal"
|
||||
lodestar_repair_terminal.Interval = 1000
|
||||
lodestar_repair_terminal.HealAmount = 60
|
||||
lodestar_repair_terminal.UseRadius = 20
|
||||
lodestar_repair_terminal.TargetValidation += EffectTarget.Category.Vehicle -> EffectTarget.Validation.RepairSilo
|
||||
lodestar_repair_terminal.UseRadius = 40
|
||||
lodestar_repair_terminal.TargetValidation += EffectTarget.Category.Vehicle -> EffectTarget.Validation.LodestarRepair
|
||||
lodestar_repair_terminal.Damageable = false
|
||||
lodestar_repair_terminal.Repairable = false
|
||||
|
||||
|
|
|
|||
|
|
@ -53,6 +53,12 @@ object EffectTarget {
|
|||
case _ => false
|
||||
}
|
||||
|
||||
def LodestarRepair(target: PlanetSideGameObject): Boolean =
|
||||
target match {
|
||||
case v: Vehicle => RepairSilo(v) || PadLanding(v)
|
||||
case _ => false
|
||||
}
|
||||
|
||||
/**
|
||||
* To repair at this silo, the vehicle:
|
||||
* can not be a flight vehicle,
|
||||
|
|
@ -79,7 +85,7 @@ object EffectTarget {
|
|||
|
||||
private def CommonRepairConditions(v: Vehicle): Boolean = {
|
||||
v.Health > 0 && v.Health < v.MaxHealth &&
|
||||
(v.History.findLast { entry => entry.isInstanceOf[DamagingActivity] } match {
|
||||
(v.History.find { entry => entry.isInstanceOf[DamagingActivity] } match {
|
||||
case Some(entry) if System.currentTimeMillis() - entry.time < 5000L => false
|
||||
case _ => true
|
||||
})
|
||||
|
|
|
|||
Loading…
Reference in a new issue