Add basic meteor swarm (#4420)

* Add basic meteor swarm

* Map fixes

* Dependency cache

* Fix projectile crash

* Last of the reviews
This commit is contained in:
metalgearsloth
2021-08-23 13:28:47 +10:00
committed by GitHub
parent 92209aac9a
commit 8fa7f902a1
7 changed files with 187 additions and 2 deletions

View File

@@ -26,7 +26,7 @@ namespace Content.Server.Projectiles.Components
public bool DeleteOnCollide { get; } = true;
// Get that juicy FPS hit sound
[DataField("soundHit", required: true)] public SoundSpecifier SoundHit = default!;
[DataField("soundHit", required: true)] public SoundSpecifier? SoundHit = default!;
[DataField("soundHitSpecies")] public SoundSpecifier? SoundHitSpecies = null;
public bool DamagedEntity;

View File

@@ -39,7 +39,10 @@ namespace Content.Server.Projectiles
}
else
{
SoundSystem.Play(playerFilter, component.SoundHit.GetSound(), coordinates);
var soundHit = component.SoundHit?.GetSound();
if (!string.IsNullOrEmpty(soundHit))
SoundSystem.Play(playerFilter, soundHit, coordinates);
}
if (!otherEntity.Deleted && otherEntity.TryGetComponent(out IDamageableComponent? damage))