Fix throwing in space.

This commit is contained in:
Pieter-Jan Briers
2020-07-08 18:28:59 +02:00
parent e815de7563
commit 023fd60054
6 changed files with 17 additions and 3 deletions

View File

@@ -10,6 +10,7 @@ namespace Content.Client.GameObjects.Components.Clothing
{
[RegisterComponent]
[ComponentReference(typeof(ItemComponent))]
[ComponentReference(typeof(IItemComponent))]
public class ClothingComponent : ItemComponent
{
private FemaleClothingMask _femaleMask;

View File

@@ -17,7 +17,8 @@ using Robust.Shared.ViewVariables;
namespace Content.Client.GameObjects
{
[RegisterComponent]
public class ItemComponent : Component
[ComponentReference(typeof(IItemComponent))]
public class ItemComponent : Component, IItemComponent
{
public override string Name => "Item";
public override uint? NetID => ContentNetIDs.ITEM;

View File

@@ -18,6 +18,7 @@ namespace Content.Server.GameObjects
[RegisterComponent]
[ComponentReference(typeof(ItemComponent))]
[ComponentReference(typeof(StoreableComponent))]
[ComponentReference(typeof(IItemComponent))]
public class ClothingComponent : ItemComponent, IUse
{
#pragma warning disable 649

View File

@@ -25,7 +25,8 @@ namespace Content.Server.GameObjects
{
[RegisterComponent]
[ComponentReference(typeof(StoreableComponent))]
public class ItemComponent : StoreableComponent, IInteractHand, IExAct, IEquipped, IUnequipped
[ComponentReference(typeof(IItemComponent))]
public class ItemComponent : StoreableComponent, IInteractHand, IExAct, IEquipped, IUnequipped, IItemComponent
{
public override string Name => "Item";
public override uint? NetID => ContentNetIDs.ITEM;

View File

@@ -0,0 +1,9 @@
using Robust.Shared.Interfaces.GameObjects;
namespace Content.Shared.GameObjects.Components.Items
{
public interface IItemComponent : IComponent
{
}
}

View File

@@ -1,5 +1,6 @@
#nullable enable
using System.Diagnostics.CodeAnalysis;
using Content.Shared.GameObjects.Components.Items;
using Content.Shared.GameObjects.Components.Movement;
using Content.Shared.Physics;
using Robust.Shared.Configuration;
@@ -129,7 +130,7 @@ namespace Content.Shared.GameObjects.EntitySystems
// TODO: Item check.
var touching = ((collider.CollisionMask & otherCollider.CollisionLayer) != 0x0
|| (otherCollider.CollisionMask & collider.CollisionLayer) != 0x0) // Ensure collision
&& true; // !entity.HasComponent<ItemComponent>(); // This can't be an item
&& !entity.HasComponent<IItemComponent>(); // This can't be an item
if (touching)
{