* Engine namespace changes.
* Automated remove redundant using statements.
* Simplified Graphics namespace.
* Apparently the container system stores full type names in the map file.😞 This updates those names.
* API Changes to LocalizationManager.LoadCulture.
* Update submodule to v0.3.2
33 lines
850 B
C#
33 lines
850 B
C#
using Content.Server.GameObjects.Components.Explosion;
|
|
using Robust.Shared.GameObjects;
|
|
|
|
namespace Content.Server.GameObjects.Components.Projectiles
|
|
{
|
|
[RegisterComponent]
|
|
public class ExplosiveProjectileComponent : Component, ICollideBehavior
|
|
{
|
|
public override string Name => "ExplosiveProjectile";
|
|
|
|
public override void Initialize()
|
|
{
|
|
base.Initialize();
|
|
|
|
Owner.EnsureComponent<ExplosiveComponent>();
|
|
}
|
|
|
|
void ICollideBehavior.CollideWith(IEntity entity)
|
|
{
|
|
if (Owner.TryGetComponent(out ExplosiveComponent explosive))
|
|
{
|
|
explosive.Explosion();
|
|
}
|
|
}
|
|
|
|
// Projectile should handle the deleting
|
|
void ICollideBehavior.PostCollide(int collisionCount)
|
|
{
|
|
return;
|
|
}
|
|
}
|
|
}
|