Item Splitting Causing Duplication

Nicholas Stanfill shared this bug 2 years ago

A bug in one of my scripts was causing Oxygen Bottles to be split into hundreds or thousands of Oxygen Bottles with reduced mass and volume.

This was the function used, the others probably work the same way.

IMyInventory.TransferItemFrom(IMyInventory sourceInventory, MyInventoryItem item, MyFixedPoint? amount = default(MyFixedPoint?));
I was able to split a single Oxygen Bottle into as many parts as I desired. The split bottles couldn't be used or disassembled but when the server restarts, all Oxygen Bottles became whole again creating duplicates.

Once I fixed the bug in my script and the servers restarted, the people using my script were treated to large amounts of Iron, Silicon, and Nickel as all excess bottles (ranging from 250 - 3000) were automatically disassembled.

I could probably do the same for any tool, ammunition, bottle, or component that normally can't be split into decimals. This could be exploited to generate resources if you know when the server will restart.

The item transfer functions shouldn't allow items stored as whole numbers to be split.

Comments (1)


Hello, Engineer!

Thank you for your feedback! Your topic has been added between considered issues.

Please keep voting for the issue as it will help us to identify the most serious bugs.

We really appreciate your patience.

Kind Regards

Keen Software House: QA Department