Page 1 of 1

[kovarex][0.18.46]Item prototype flag "only-in-cursor" does not block placing into the blueprint library

Posted: Sat Jul 25, 2020 3:53 am
by raiguard
If you set the only-in-cursor flag on an item, it would stand to reason that you wouldn't be able to put it anywhere. However, even with that flag set, you can still place a blueprint in the blueprint library:
2020-07-24 21_52_09-Factorio 0.18.36.png
2020-07-24 21_52_09-Factorio 0.18.36.png (35.5 KiB) Viewed 816 times

If this is intended, then I would like to request a new flag to prevent an item from being stored in the library.

Thank you!

Re: Item prototype flag "only-in-cursor" does not block placing into the blueprint library

Posted: Thu Aug 06, 2020 2:21 pm
by kovarex
Hello, what is this version? Based on the snippet of the gui it looks, like it is the old blueprint library. In the new blueprint library, I'm pretty sure that this flag works for our items, so there is no reason why it couldn't for yours.

Re: Item prototype flag "only-in-cursor" does not block placing into the blueprint library

Posted: Thu Aug 06, 2020 4:22 pm
by raiguard
Unfortunately it still occurs with the new library. To reproduce:

1. Download Recipe Book (it requires the Factorio Library mod as well)
2. Open it with Control + B or by using the shortcut
3. Search for any recipe
4. Click one of the "made in" items to get a temporary blueprint
5. Place the blueprint in the library (this shouldn't be possible)

Furthermore, with the new library, if you take it out of the library and stick it in your inventory, it also doesn't get destroyed. You have to then pick it up and place it back in your inventory again for it to disappear.
2020-08-06 10_20_36-Factorio 0.18.42.png
2020-08-06 10_20_36-Factorio 0.18.42.png (592.27 KiB) Viewed 717 times
Temporary blueprint item code:

Code: Select all

local data_util = require("__flib__.data_util")

data:extend {
  {
    type = "blueprint",
    name = "rb-crafter-blueprint",
    icons = {{icon=data_util.planner_base_image, icon_size=64, icon_mipmaps=4, tint={r=0.2, g=1, b=1}}},
    stack_size = 1,
    flags = {"hidden", "only-in-cursor", "not-stackable"},
    draw_label_for_cursor_render = true,
    selection_color = {0, 1, 0},
    alt_selection_color = {0, 1, 0},
    selection_mode = {"blueprint"},
    alt_selection_mode = {"blueprint"},
    selection_cursor_box_type = "copy",
    alt_selection_cursor_box_type = "copy"
  }
}

Re: [kovarex][0.18.46]Item prototype flag "only-in-cursor" does not block placing into the blueprint library

Posted: Tue Sep 29, 2020 10:51 pm
by kovarex
Thanks for the report, it is now fixed for the 1.1 release.