示例#1
0
        /// <summary>
        /// Add maxNeeded amount of items into inventory.
        /// -If not maxNeeded could be added as amany as possible is added and the added amout is returned
        /// -If maxNeeded is less than MyFixedPoint can handle 0 is returned
        /// </summary>
        public static float AddMaxItems(this IMyInventory destInventory, float maxNeeded, MyObjectBuilder_PhysicalObject objectBuilder)
        {
            var maxNeededFP = (VRage.MyFixedPoint)maxNeeded;

            return((float)destInventory.AddMaxItems(maxNeededFP, objectBuilder));
        }