public void OnOccupantSet(Node n) { GD.Print(Name, " is setting occupant: ", n?.Name); (OccupantObserver as Node)?.QueueFree(); OccupantObserver = null; if (n != null) { OccupantObserver = (DefaultInvPV)EasyInstancer.GenObserver(n, ((IHasInvPV)n).ObserverPathInvPV); AddChild((Node)OccupantObserver); OccupantObserver.parent = this; RecomputeOccupantPos(); } }
//Purely a way for InventoryMenu to interact with provider Accept function public bool AcceptItem(DefaultInvPV item) { return(provider.AcceptItem(item.Provider)); }