mirror of
https://github.com/psforever/PSF-LoginServer.git
synced 2026-01-20 02:54:46 +00:00
jammered mines explode again (he mines were exploding for incorrect reasons) (#1175)
This commit is contained in:
parent
44f1560a94
commit
d049146b4f
|
|
@ -54,7 +54,7 @@ class ExplosiveDeployableDefinition(private val objectId: Int)
|
||||||
DetonateOnJamming
|
DetonateOnJamming
|
||||||
}
|
}
|
||||||
|
|
||||||
override def Initialize(obj: Deployable, context: ActorContext) = {
|
override def Initialize(obj: Deployable, context: ActorContext): Unit = {
|
||||||
obj.Actor =
|
obj.Actor =
|
||||||
context.actorOf(Props(classOf[MineDeployableControl], obj), PlanetSideServerObject.UniqueActorName(obj))
|
context.actorOf(Props(classOf[MineDeployableControl], obj), PlanetSideServerObject.UniqueActorName(obj))
|
||||||
}
|
}
|
||||||
|
|
@ -70,8 +70,8 @@ abstract class ExplosiveDeployableControl(mine: ExplosiveDeployable)
|
||||||
extends Actor
|
extends Actor
|
||||||
with DeployableBehavior
|
with DeployableBehavior
|
||||||
with Damageable {
|
with Damageable {
|
||||||
def DeployableObject = mine
|
def DeployableObject: ExplosiveDeployable = mine
|
||||||
def DamageableObject = mine
|
def DamageableObject: ExplosiveDeployable = mine
|
||||||
|
|
||||||
override def postStop(): Unit = {
|
override def postStop(): Unit = {
|
||||||
super.postStop()
|
super.postStop()
|
||||||
|
|
|
||||||
|
|
@ -17,19 +17,19 @@ import net.psforever.objects.vital.resolution.DamageAndResistance
|
||||||
final case class TrippedMineReason(mine: DeployableSource, owner: SourceEntry)
|
final case class TrippedMineReason(mine: DeployableSource, owner: SourceEntry)
|
||||||
extends DamageReason {
|
extends DamageReason {
|
||||||
|
|
||||||
def source: DamageProperties = mine.Definition.innateDamage.getOrElse(TrippedMineReason.triggered)
|
def source: DamageProperties = TrippedMineReason.triggered
|
||||||
|
|
||||||
def resolution: DamageResolution.Value = DamageResolution.Resolved
|
def resolution: DamageResolution.Value = DamageResolution.Resolved
|
||||||
|
|
||||||
def same(test: DamageReason): Boolean = test match {
|
def same(test: DamageReason): Boolean = test match {
|
||||||
case trip: TrippedMineReason => mine == trip.mine && mine.OwnerName == trip.mine.OwnerName
|
case trip: TrippedMineReason => mine.unique == trip.mine.unique && owner.unique == owner.unique
|
||||||
case _ => false
|
case _ => false
|
||||||
}
|
}
|
||||||
|
|
||||||
/** lay the blame on the player who laid this mine, if possible */
|
/** lay the blame on the player who laid this mine, if possible */
|
||||||
def adversary: Option[SourceEntry] = Some(owner)
|
def adversary: Option[SourceEntry] = Some(owner)
|
||||||
|
|
||||||
override def damageModel : DamageAndResistance = mine.Definition
|
override def damageModel: DamageAndResistance = mine.Definition
|
||||||
|
|
||||||
override def attribution: Int = mine.Definition.ObjectId
|
override def attribution: Int = mine.Definition.ObjectId
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue