Exact Grab

by merlish

Precisely select the number of items you're holding - without click spam.

Utilities
2 years ago
1.1
266
Owner:
merlish
Source:
https://github.com/leafi/exact-grab
Homepage:
N/A
License:
MIT
Created:
2 years ago
Latest Version:
0.1.1 (2 years ago)
Factorio version:
1.1
Downloaded by:
266 users

Stacks and half-stacks are all well and good, but sometimes you need to grab an exact number of items - not an approximate number of items.

Features

  • "Scroll" up and down the number of items you've selected from your inventory, by picking a stack and then using Ctrl+MouseWheelUp and Ctrl+MouseWheelDown: (other increments are supported, check Controls in-game)

  • Select e.g. exactly 12 items by picking a stack and then pressing 'CTRL+1' and then 'CTRL+2'. (Like typing '12' with Ctrl held down.)

  • Recall your last stack from your inventory with CTRL+R

Limitations

  • Items usually travel via your inventory to get the stack count right
  • You can't hold more than 1 full stack of items at once - the count will be capped to however many items you have available or the stacking limit for that item, whichever is less
  • When holding a special item in your cursor with extra data/sub-inventories on it, the mod will not accept commands and will show a message instead (so we don't accidentally lose data). Plenty of these items don't stack anyway. Ammo count, durability and health of items are explicitly tracked & work fine.
  • Some special source inventories are on a deny list, as it's hard to get a correct reference to them. This doesn't matter in practice, because very often when you pick up a stack from e.g. a machine, Factorio instantly forgets the source inventory, and this mod ends up shuffling items through the player inventory instead, which works quite well.

Other than that, it seems to work pretty well for me. Helped me swap some Trees for Rubber Trees in my greenhouses in a modded playthrough.

Feel free to fork this mod and make improvements. I'll try to check in now and again, but I'm not much of a maintainer.