private void GetItemsFromCargoBoxesOnOnMissionSuccess(MyMissionBase sender) { m_myInventory.Clear(); var cargobox = (MyCargoBox)MyScriptWrapper.GetEntity((uint)EntityID.FakeCargo); m_myInventory.AddRange(cargobox.Inventory.GetInventoryItems()); MyScriptWrapper.AddInventoryItems(MyScriptWrapper.GetPlayerInventory(), m_myInventory, ((MyPrefabHangar)MyScriptWrapper.GetMothershipHangar(MyScriptWrapper.GetEntity("Madelyn"))).Inventory); cargobox.Inventory.ClearInventoryItems(false); MyScriptWrapper.PlayDialogue(MyDialogueEnum.FORT_VALIANT_C_2600); }