Remove ICollideSpecial
Handled in an ECS way by PreventCollideEvent. The disposals one doesn't work anyway and would've required a larger refactor of disposals to fix so out of scope.
This commit is contained in:
@@ -413,12 +413,12 @@ namespace Content.Server.GameObjects.Components.Buckle
|
||||
return new BuckleComponentState(Buckled, drawDepth, LastEntityBuckledTo, DontCollide);
|
||||
}
|
||||
|
||||
public void Update()
|
||||
public void Update(PhysicsComponent physics)
|
||||
{
|
||||
if (!DontCollide || Physics == null)
|
||||
if (!DontCollide)
|
||||
return;
|
||||
|
||||
Physics.WakeBody();
|
||||
physics.WakeBody();
|
||||
|
||||
if (!IsOnStrapEntityThisFrame && DontCollide)
|
||||
{
|
||||
|
||||
@@ -231,7 +231,7 @@ namespace Content.Server.GameObjects.Components.Doors
|
||||
// Disabled because it makes it suck hard to walk through double doors.
|
||||
|
||||
TryOpen(otherFixture.Body.Owner);
|
||||
|
||||
|
||||
}
|
||||
|
||||
#region Opening
|
||||
@@ -266,14 +266,14 @@ namespace Content.Server.GameObjects.Components.Doors
|
||||
return true;
|
||||
}
|
||||
|
||||
var doorSystem = EntitySystem.Get<ServerDoorSystem>();
|
||||
var doorSystem = EntitySystem.Get<DoorSystem>();
|
||||
var isAirlockExternal = HasAccessType("External");
|
||||
|
||||
return doorSystem.AccessType switch
|
||||
{
|
||||
ServerDoorSystem.AccessTypes.AllowAll => true,
|
||||
ServerDoorSystem.AccessTypes.AllowAllIdExternal => isAirlockExternal || access.IsAllowed(user),
|
||||
ServerDoorSystem.AccessTypes.AllowAllNoExternal => !isAirlockExternal,
|
||||
DoorSystem.AccessTypes.AllowAll => true,
|
||||
DoorSystem.AccessTypes.AllowAllIdExternal => isAirlockExternal || access.IsAllowed(user),
|
||||
DoorSystem.AccessTypes.AllowAllNoExternal => !isAirlockExternal,
|
||||
_ => access.IsAllowed(user)
|
||||
};
|
||||
}
|
||||
|
||||
@@ -15,11 +15,9 @@ using Robust.Shared.ViewVariables;
|
||||
namespace Content.Server.GameObjects.Components.Projectiles
|
||||
{
|
||||
[RegisterComponent]
|
||||
[ComponentReference(typeof(SharedProjectileComponent))]
|
||||
public class ProjectileComponent : SharedProjectileComponent, IStartCollide
|
||||
{
|
||||
protected override EntityUid Shooter => _shooter;
|
||||
|
||||
private EntityUid _shooter = EntityUid.Invalid;
|
||||
|
||||
[DataField("damages")] private Dictionary<DamageType, int> _damages = new();
|
||||
|
||||
@@ -49,7 +47,7 @@ namespace Content.Server.GameObjects.Components.Projectiles
|
||||
/// <param name="shooter"></param>
|
||||
public void IgnoreEntity(IEntity shooter)
|
||||
{
|
||||
_shooter = shooter.Uid;
|
||||
Shooter = shooter.Uid;
|
||||
Dirty();
|
||||
}
|
||||
|
||||
@@ -77,7 +75,7 @@ namespace Content.Server.GameObjects.Components.Projectiles
|
||||
|
||||
if (damage != null)
|
||||
{
|
||||
Owner.EntityManager.TryGetEntity(_shooter, out var shooter);
|
||||
Owner.EntityManager.TryGetEntity(Shooter, out var shooter);
|
||||
|
||||
foreach (var (damageType, amount) in _damages)
|
||||
{
|
||||
@@ -100,7 +98,7 @@ namespace Content.Server.GameObjects.Components.Projectiles
|
||||
|
||||
public override ComponentState GetComponentState(ICommonSession player)
|
||||
{
|
||||
return new ProjectileComponentState(NetID!.Value, _shooter, IgnoreShooter);
|
||||
return new ProjectileComponentState(Shooter, IgnoreShooter);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user