Quantum Resource Distribution

by eliont

Special chest can send placed items to ship quantum storage unit and retrieve from it. Also works for player inventory (optional). It's make resource management more like RTS for playing combat-oriented settings/mods. Compatible with multi-surface mods like Space Exploration - item transportation works on surface, but not between them. Should be UPS-friendly because using events to track entities, not find_entities_filtered.

Content
5 months ago
1.1
1.11K
Logistics Logistic network Circuit network Storage

b lost stored items if I request a lot of items

10 months ago
(updated 10 months ago)

If I set too many items (exceeds box capacity) on request, the function put discards non-insertable items.
I suggest subtracting the return value of the inv.insert, instead of needed:

global.pool[surface_name][item]['amount'] = global.pool[surface_name][item]['amount'] - inv.insert({name=item, count=needed})

I don't know if it causes problems or not, but inv.remove returns the removed item count too. so you may want to do the same for the function take.

10 months ago

Ok, thank you, i will take a look.

9 months ago

should be fixed

This thread has been locked.