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

This subforum contains all the issues which we already resolved.
Post Reply
User avatar
raiguard
Factorio Staff
Factorio Staff
Posts: 447
Joined: Wed Dec 13, 2017 8:29 pm
Contact:

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

Post 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 794 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!
Don't forget, you're here forever.

kovarex
Factorio Staff
Factorio Staff
Posts: 8078
Joined: Wed Feb 06, 2013 12:00 am
Contact:

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

Post 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.

User avatar
raiguard
Factorio Staff
Factorio Staff
Posts: 447
Joined: Wed Dec 13, 2017 8:29 pm
Contact:

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

Post 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 695 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"
  }
}
Don't forget, you're here forever.

kovarex
Factorio Staff
Factorio Staff
Posts: 8078
Joined: Wed Feb 06, 2013 12:00 am
Contact:

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

Post by kovarex »

Thanks for the report, it is now fixed for the 1.1 release.

Post Reply

Return to “Resolved Problems and Bugs”