mirror of
https://github.com/2revoemag/PSF-BotServer.git
synced 2026-01-19 18:14:44 +00:00
Merge pull request #5 from ScrawnyRonnie/Lodestar
Lodestar, repair interrupt, and more crystal fixes
This commit is contained in:
commit
12b90f0bc2
|
|
@ -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
|
||||
})
|
||||
|
|
|
|||
|
|
@ -578,7 +578,7 @@ object Zones {
|
|||
)
|
||||
case "crystals_energy_a" | "crystals_energy_b" =>
|
||||
zoneMap.addLocalObject(
|
||||
obj.guid + 1,
|
||||
obj.guid + 2000,
|
||||
ProximityTerminal.Constructor(obj.position, GlobalDefinitions.crystals_energy),
|
||||
owningBuildingGuid = ownerGuid
|
||||
)
|
||||
|
|
|
|||
Loading…
Reference in a new issue