remove QSBOWitemDoubleSocket

This commit is contained in:
JohnCorby 2022-01-25 21:34:43 -08:00
parent 0a423a8ce6
commit 85343384dd
2 changed files with 1 additions and 29 deletions

View File

@ -1,28 +0,0 @@
using QSB.ItemSync.WorldObjects.Items;
using QSB.WorldSync;
namespace QSB.ItemSync.WorldObjects.Sockets
{
// todo make this QSBOWItemSocket since it's identical
internal class QSBOWItemDoubleSocket<T> : WorldObject<T>, IQSBOWItemSocket
where T : OWItemSocket
{
public override void SendResyncInfo(uint to) { }
public virtual bool AcceptsItem(IQSBOWItem item)
{
var itemType = item.GetItemType();
var acceptableType = AttachedObject._acceptableType;
return (itemType & acceptableType) == itemType;
}
public virtual bool IsSocketOccupied()
=> AttachedObject.IsSocketOccupied();
public virtual bool PlaceIntoSocket(IQSBOWItem item)
=> AttachedObject.PlaceIntoSocket((OWItem)item.ReturnObject());
public virtual IQSBOWItem RemoveFromSocket()
=> AttachedObject.RemoveFromSocket().GetWorldObject<IQSBOWItem>();
}
}

View File

@ -1,6 +1,6 @@
namespace QSB.ItemSync.WorldObjects.Sockets
{
internal class QSBSlideProjectorSocket : QSBOWItemDoubleSocket<SlideProjectorSocket>
internal class QSBSlideProjectorSocket : QSBOWItemSocket<SlideProjectorSocket>
{
}
}