[1.1.5] "only-in-cursor" items can be quick-inserted into entities without inventory (i.e. rocks).

We are aware of them, but they have low priority. We have more important things to do. They go here in order not to take space in the main bug thread list.
User avatar
eradicator
Smart Inserter
Smart Inserter
Posts: 5207
Joined: Tue Jul 12, 2016 9:03 am
Contact:

[1.1.5] "only-in-cursor" items can be quick-inserted into entities without inventory (i.e. rocks).

Post by eradicator »

What?

Ctrl+LeftClick on any entity with inventory and on some entities without inventory "deletes" the cursor stack if the cursor stack has the "only-in-cursor" flag.

Expected Bahavior

"only-in-cursor" items can not be inserted into anything, so they should never be affected by "insert" actions.

Reproduction

Rocks are just an example. I also confirmed it on electric-energy-interface, rail, electric-pole, ... and then i stopped testing.
  1. Press Ctrl+C to get a copy-paste tool.
  2. Walk up to a rock and press Ctrl+LeftClick.
  3. Notice how your cursor is now empty.
Author of: Belt Planner, Hand Crank Generator, Screenshot Maker, /sudo and more.
Mod support languages: 日本語, Deutsch, English
My code in the post above is dedicated to the public domain under CC0.

User avatar
Klonan
Factorio Staff
Factorio Staff
Posts: 5246
Joined: Sun Jan 11, 2015 2:09 pm
Contact:

Re: [1.1.5] "only-in-cursor" items can be quick-inserted into entities without inventory (i.e. rocks).

Post by Klonan »

"only-in-cursor" items can not be inserted into anything, so they should never be affected by "insert" actions.
Actually they can be inserted just fine, moved with any normal item

Just they are deleted if they are ever detected outside of a cursor stack

I am tempted to call this a minor issue/not a bug/won't fix


User avatar
eradicator
Smart Inserter
Smart Inserter
Posts: 5207
Joined: Tue Jul 12, 2016 9:03 am
Contact:

Re: [1.1.5] "only-in-cursor" items can be quick-inserted into entities without inventory (i.e. rocks).

Post by eradicator »

Klonan wrote:
Wed Dec 16, 2020 9:41 am
"only-in-cursor" items can not be inserted into anything, so they should never be affected by "insert" actions.
Actually they can be inserted just fine
I meant they can't conceptually be inserted from the players perspective. Obviously it's technically working or otherwise we wouldn't be here :D. If it had only been entities *with* inventory i might not have written this, but the without thing was rather weird. It actually happend to me when i was trying to drag a selection area and accidentially held ctrl instead of shift. I can see how it's not a major issue, but was hoping that it would be as easy as adding one line of code to the quick insert. Ah well, another time then :D.
Author of: Belt Planner, Hand Crank Generator, Screenshot Maker, /sudo and more.
Mod support languages: 日本語, Deutsch, English
My code in the post above is dedicated to the public domain under CC0.

User avatar
eradicator
Smart Inserter
Smart Inserter
Posts: 5207
Joined: Tue Jul 12, 2016 9:03 am
Contact:

Re: [1.1.5] "only-in-cursor" items can be quick-inserted into entities without inventory (i.e. rocks).

Post by eradicator »

Sigh. Working on Belt Planner this just cost me several hours again trying to figure out why my selection-tool suddenly disappears on ctrl-click. Until I remembered this thread...
Author of: Belt Planner, Hand Crank Generator, Screenshot Maker, /sudo and more.
Mod support languages: 日本語, Deutsch, English
My code in the post above is dedicated to the public domain under CC0.

User avatar
eradicator
Smart Inserter
Smart Inserter
Posts: 5207
Joined: Tue Jul 12, 2016 9:03 am
Contact:

Re: [1.1.5] "only-in-cursor" items can be quick-inserted into entities without inventory (i.e. rocks).

Post by eradicator »

It also seems that on_player_fast_transferred is NOT raised in this case. Which isn't helping...
Author of: Belt Planner, Hand Crank Generator, Screenshot Maker, /sudo and more.
Mod support languages: 日本語, Deutsch, English
My code in the post above is dedicated to the public domain under CC0.

User avatar
eradicator
Smart Inserter
Smart Inserter
Posts: 5207
Joined: Tue Jul 12, 2016 9:03 am
Contact:

Re: [1.1.5] "only-in-cursor" items can be quick-inserted into entities without inventory (i.e. rocks).

Post by eradicator »

Ok...so everything I try to make this works fails.
  1. Can not prevent insertion even into neutral objects.
  2. Can not detect this happening because on_player_fast_transferred event is not raised.
  3. Can not prevent insertion because fast-transfer ignores empty player selection.
I don't know what other kind of ugly hack I'm supposed to try next :/.
Attachments
zz-bugtest-linked-control-test_0.0.1.zip
(3.03 KiB) Downloaded 149 times
Author of: Belt Planner, Hand Crank Generator, Screenshot Maker, /sudo and more.
Mod support languages: 日本語, Deutsch, English
My code in the post above is dedicated to the public domain under CC0.

Post Reply

Return to “Minor issues”