mirror of
https://github.com/misternebula/quantum-space-buddies.git
synced 2025-01-18 13:23:05 +00:00
30 lines
734 B
C#
30 lines
734 B
C#
using QSB.ItemSync.WorldObjects.Items;
|
|
using QSB.WorldSync;
|
|
|
|
namespace QSB.ItemSync.WorldObjects.Sockets
|
|
{
|
|
public class QSBItemSocket : WorldObject<OWItemSocket>
|
|
{
|
|
public override void SendInitialState(uint to)
|
|
{
|
|
// todo SendResyncInfo
|
|
}
|
|
|
|
public bool AcceptsItem(QSBItem item)
|
|
{
|
|
var itemType = item.GetItemType();
|
|
var acceptableType = AttachedObject._acceptableType;
|
|
return (itemType & acceptableType) == itemType;
|
|
}
|
|
|
|
public bool IsSocketOccupied()
|
|
=> AttachedObject.IsSocketOccupied();
|
|
|
|
public bool PlaceIntoSocket(QSBItem item)
|
|
=> AttachedObject.PlaceIntoSocket(item.AttachedObject);
|
|
|
|
public QSBItem RemoveFromSocket()
|
|
=> AttachedObject.RemoveFromSocket().GetWorldObject<QSBItem>();
|
|
}
|
|
}
|