Fix various issues with the emitter (#3329)

Co-authored-by: cyclowns <cyclowns@protonmail.ch>
This commit is contained in:
mirrorcult
2021-03-14 15:02:22 -07:00
committed by GitHub
parent c73ef7c9af
commit e81db48cd1
15 changed files with 147 additions and 86 deletions

View File

@@ -2,8 +2,7 @@
using System;
using System.Diagnostics.CodeAnalysis;
using System.Linq;
using Content.Server.GameObjects.Components.Projectiles;
using Content.Server.Utility;
using Content.Shared.GameObjects.Components.Tag;
using Content.Shared.Physics;
using Robust.Shared.GameObjects;
using Robust.Shared.IoC;
@@ -85,11 +84,7 @@ namespace Content.Server.GameObjects.Components.Singularity
private void OnAnchoredChanged()
{
if(_collidableComponent?.Anchored == true)
{
Owner.SnapToGrid();
}
else
if(_collidableComponent?.Anchored != true)
{
_connection1?.Item2.Dispose();
_connection2?.Item2.Dispose();
@@ -186,8 +181,7 @@ namespace Content.Server.GameObjects.Components.Singularity
void IStartCollide.CollideWith(IPhysBody ourBody, IPhysBody otherBody, in Manifold manifold)
{
if (otherBody.Entity.HasComponent<EmitterBoltComponent>())
{
if(otherBody.Entity.HasTag("EmitterBolt")) {
ReceivePower(4);
}
}