/// <summary> /// Respawns the modified container back into the world /// </summary> public void RetrieveInsertedContainer() { EjectInsertedContainer(); ItemStorage player = networkTab.LastInteractedPlayer().GetComponent <PlayerScript>().ItemStorage; HandInsert(player); }
/// <summary> /// Respawns the modified container back into the world /// </summary> public void EjectInsertedContainer() { ItemStorage player = networkTab.LastInteractedPlayer().GetComponent <PlayerScript>().ItemStorage; InsertedContainer.GetComponent <CustomNetTransform>().AppearAtPositionServer(gameObject.WorldPosServer()); HandInsert(player); hasContainerInserted = false; InsertedContainer = null; ServerOnExternalTankInserted.Invoke(false); }
/// <summary> /// Respawns the modified container back into the world - or into the player's hand, if possible. /// </summary> public void RetrieveInsertedContainer() { var gasContainer = InsertedContainer; EjectInsertedContainer(); var playerScript = networkTab.LastInteractedPlayer().GetComponent <PlayerScript>(); var bestHand = playerScript.DynamicItemStorage.GetBestHand(); if (bestHand != null) { Inventory.ServerAdd(gasContainer, bestHand); } }