Fix throwing in space.
This commit is contained in:
@@ -10,6 +10,7 @@ namespace Content.Client.GameObjects.Components.Clothing
|
|||||||
{
|
{
|
||||||
[RegisterComponent]
|
[RegisterComponent]
|
||||||
[ComponentReference(typeof(ItemComponent))]
|
[ComponentReference(typeof(ItemComponent))]
|
||||||
|
[ComponentReference(typeof(IItemComponent))]
|
||||||
public class ClothingComponent : ItemComponent
|
public class ClothingComponent : ItemComponent
|
||||||
{
|
{
|
||||||
private FemaleClothingMask _femaleMask;
|
private FemaleClothingMask _femaleMask;
|
||||||
|
|||||||
@@ -17,7 +17,8 @@ using Robust.Shared.ViewVariables;
|
|||||||
namespace Content.Client.GameObjects
|
namespace Content.Client.GameObjects
|
||||||
{
|
{
|
||||||
[RegisterComponent]
|
[RegisterComponent]
|
||||||
public class ItemComponent : Component
|
[ComponentReference(typeof(IItemComponent))]
|
||||||
|
public class ItemComponent : Component, IItemComponent
|
||||||
{
|
{
|
||||||
public override string Name => "Item";
|
public override string Name => "Item";
|
||||||
public override uint? NetID => ContentNetIDs.ITEM;
|
public override uint? NetID => ContentNetIDs.ITEM;
|
||||||
|
|||||||
@@ -18,6 +18,7 @@ namespace Content.Server.GameObjects
|
|||||||
[RegisterComponent]
|
[RegisterComponent]
|
||||||
[ComponentReference(typeof(ItemComponent))]
|
[ComponentReference(typeof(ItemComponent))]
|
||||||
[ComponentReference(typeof(StoreableComponent))]
|
[ComponentReference(typeof(StoreableComponent))]
|
||||||
|
[ComponentReference(typeof(IItemComponent))]
|
||||||
public class ClothingComponent : ItemComponent, IUse
|
public class ClothingComponent : ItemComponent, IUse
|
||||||
{
|
{
|
||||||
#pragma warning disable 649
|
#pragma warning disable 649
|
||||||
|
|||||||
@@ -25,7 +25,8 @@ namespace Content.Server.GameObjects
|
|||||||
{
|
{
|
||||||
[RegisterComponent]
|
[RegisterComponent]
|
||||||
[ComponentReference(typeof(StoreableComponent))]
|
[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 string Name => "Item";
|
||||||
public override uint? NetID => ContentNetIDs.ITEM;
|
public override uint? NetID => ContentNetIDs.ITEM;
|
||||||
|
|||||||
@@ -0,0 +1,9 @@
|
|||||||
|
using Robust.Shared.Interfaces.GameObjects;
|
||||||
|
|
||||||
|
namespace Content.Shared.GameObjects.Components.Items
|
||||||
|
{
|
||||||
|
public interface IItemComponent : IComponent
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,5 +1,6 @@
|
|||||||
#nullable enable
|
#nullable enable
|
||||||
using System.Diagnostics.CodeAnalysis;
|
using System.Diagnostics.CodeAnalysis;
|
||||||
|
using Content.Shared.GameObjects.Components.Items;
|
||||||
using Content.Shared.GameObjects.Components.Movement;
|
using Content.Shared.GameObjects.Components.Movement;
|
||||||
using Content.Shared.Physics;
|
using Content.Shared.Physics;
|
||||||
using Robust.Shared.Configuration;
|
using Robust.Shared.Configuration;
|
||||||
@@ -129,7 +130,7 @@ namespace Content.Shared.GameObjects.EntitySystems
|
|||||||
// TODO: Item check.
|
// TODO: Item check.
|
||||||
var touching = ((collider.CollisionMask & otherCollider.CollisionLayer) != 0x0
|
var touching = ((collider.CollisionMask & otherCollider.CollisionLayer) != 0x0
|
||||||
|| (otherCollider.CollisionMask & collider.CollisionLayer) != 0x0) // Ensure collision
|
|| (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)
|
if (touching)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user