Example #1
0
        /// <summary>
        /// Respawns the modified container back into the world
        /// </summary>
        public void RetrieveInsertedContainer()
        {
            EjectInsertedContainer();
            ItemStorage player = networkTab.LastInteractedPlayer().GetComponent <PlayerScript>().ItemStorage;

            HandInsert(player);
        }
Example #2
0
    /// <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);
    }
Example #3
0
        /// <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);
            }
        }