Force Inventory Insert


Allows fast insert and stack transfer of items into chests with limited inventory size, without having to manually click on each slot.

Utilities
a day ago
1.1 - 2.0
14.3K
Storage

g Doesn't seem to work?

7 months ago

Doesn't seem to work in experimental. Ctrl or shift clicking an item doesn't move it into red slots.

7 months ago

Are you in multiplayer? I'm starting to think that experimental broke the mod for some reason.

6 months ago

Both, it doesn't work in solo or multiplayer for me.

6 months ago

It should work solo, I've never heard of it breaking in that way. Are there any other mods that could be interfering with that action?

Multiplayer not working is caused by an engine bug that is hopefully getting fixed next experimental version without any other issues, so we'll have to wait and see on that.

2 days ago

While the code did kind of work it had a bug where it first only tops off to non-red limit and then next Shift or Ctrl-click adds into red area. I used AI to figure out how to make it always insert into chest, and it worked. (Ollama app with gpt-oss:20b, free stuff entirely and most of it processed on the PC itself)

In control.lua: line 16:
--if inventory.get_insertable_count(item) > 0 then return end -- Original line
if inventory.get_insertable_count(item) > 0 then return bar end

I did some testing but didn't see any error in behavior, it works just like Dyson Sphere Program chest insertion from a glance. I don't understand what it did but... maybe you do? Of course it tried to explain it to me... AI summary:

Short answer

inventory.get_insertable_count(item) tells you how many more of that item the chest can hold.
The code that decides whether the chest’s “red‑area” bar can be activated must therefore **look for the case where that number is greater than zero (i.e., there is still room).

The original version returned nil when the number was > 0, so the bar was never set unless the chest was already full.
By inverting the test:

if inventory.get_insertable_count(item) > 0 then
return bar -- there is space → activate the bar
end
the function returns the current bar only when the chest can actually accept the stack, letting the split work immediately, even when the chest’s normal slots aren’t full.

New response