Don't let robots take only-in-cursor items

Place to ask discuss and request the modding support of Factorio. Don't request mods here.
Post Reply
PFQNiet
Filter Inserter
Filter Inserter
Posts: 289
Joined: Sat Sep 05, 2020 7:48 pm
Contact:

Don't let robots take only-in-cursor items

Post by PFQNiet »

This is very much a "me" problem but I have an issue and this is a solution I have come up with that doesn't involve tons of Lua.

My mod includes a "build gun" feature, where instead of crafting buildings you can just place them and the necessary materials are taken directly from your inventory. To make this work, the cursor stack is populated with the item needed to place the building, which has been given the only-in-cursor flag.

This all works fine, but only because my mod removed construction robots. I'd like to add them back in.

Deconstruction works just fine. But when placing a building, the robot sees that the item is in the cursor and happily takes the item to place the building - for free!

I think by far the easiest fix for this would be for robots to not take only-in-cursor items from your cursor. I don't believe this change will affect any existing mod, nor the base game. Could this change be implemented?

meifray
Long Handed Inserter
Long Handed Inserter
Posts: 61
Joined: Sat May 29, 2021 6:12 pm
Contact:

Re: Don't let robots take only-in-cursor items

Post by meifray »

I think the item in the cursor should really be protected,cause the thing you are already holding are probably important for thing you are currently working on,

I think instead only apply it on item with that flag,it should apply to all item.

Post Reply

Return to “Modding interface requests”