Merge pull request #734 from Fate-JH/gen-boom

The Exploding Generator
This commit is contained in:
Fate-JH 2021-03-24 14:02:31 -04:00 committed by GitHub
commit 3d3b3eceae
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -89,7 +89,7 @@ class GeneratorControl(gen: Generator)
//TODO this only works with projectiles right now!
val zone = gen.Zone
gen.Health = 0
super.DestructionAwareness(gen, gen.LastShot.get)
super.DestructionAwareness(gen, gen.LastDamage.get)
GeneratorControl.UpdateOwner(gen, Some(GeneratorControl.Event.Destroyed))
//kaboom
zone.AvatarEvents ! AvatarServiceMessage(
@ -128,7 +128,7 @@ class GeneratorControl(gen: Generator)
case GeneratorControl.Destabilized() =>
//if the generator is destabilized but has no ntu, it will not explode
gen.Health = 0
super.DestructionAwareness(gen, gen.LastShot.get)
super.DestructionAwareness(gen, gen.LastDamage.get)
queuedExplosion.cancel()
queuedExplosion = Default.Cancellable
imminentExplosion = false