26 lines
702 B
C#
Raw Permalink Normal View History

2021-11-01 15:49:00 +00:00
using QSB.ItemSync.WorldObjects.Items;
2021-02-25 14:53:34 +00:00
using QSB.WorldSync;
2021-02-23 14:42:18 +00:00
2022-03-02 19:46:33 -08:00
namespace QSB.ItemSync.WorldObjects.Sockets;
2023-07-28 19:30:57 +01:00
public class QSBItemSocket : WorldObject<OWItemSocket>
2021-02-23 14:42:18 +00:00
{
2022-03-23 14:27:20 -07:00
public bool IsSocketOccupied() => AttachedObject.IsSocketOccupied();
2021-03-26 20:56:57 +00:00
public void PlaceIntoSocket(IQSBItem item)
{
AttachedObject.PlaceIntoSocket((OWItem)item.AttachedObject);
// Don't let other users unsocket a DreamLantern in the dreamworld that doesn't belong to them
// DreamLanternSockets only exist in the DreamWorld
AttachedObject.EnableInteraction(AttachedObject is not DreamLanternSocket);
}
2022-03-02 19:46:33 -08:00
public void RemoveFromSocket()
{
AttachedObject.RemoveFromSocket();
AttachedObject.EnableInteraction(true);
}
2022-08-28 22:21:20 -07:00
}