Jump to content

Material sometimes missing micrograms

  • Branch: Live Branch Version: Windows Pending

I have noticed since the last update that sometimes when building stuff (it has happened to me when building tiles and electrical (heavy and "normal" cables") that it says that there are a couple of micrograms of material missing and dupes keeps delivering "nothing" over and over. Canceling and rebuilding with same material does not help, they will just add the same material wich are missing the micrograms again, changing material fixes it.

Steps to Reproduce
build stuff, let dupes run over and over with material that will never be enough.

User Feedback

I have a proposal for a solution to this problem. It became fairly obvious once I noticed PICKUPABLETUNING.MINIMUM_PICKABLE_AMOUNT in the source code.

if (massNeeded <= massStored)

First line seems to be the current setup and if massStored is just a tiny bit smaller due to rounding, then it's not enough to build, but too low to deliver.

The second line will create extra mass (currently 1 mg) in the comparison to make sure that either the building has enough mass or it is missing enough to trigger a dupe to deliver more mass. This should solve the problem.

Now what happens if we do that with a grill or another building with recipes. Mass in storage shouldn't go negative. There should be some sort of safeguard to set the stored mass to 0 if that happens.

Share this comment

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Create New...