LuaItemStack::create_blueprint always includes tile ghosts

This subforum contains all the issues which we already resolved.
Post Reply
User avatar
mickael9
Fast Inserter
Fast Inserter
Posts: 112
Joined: Mon Mar 14, 2016 4:04 am
Contact:

LuaItemStack::create_blueprint always includes tile ghosts

Post by mickael9 »

When using LuaItemStack::create_blueprint() with always_include_tiles = false, tile ghosts are always included in the resulting blueprint, even if the area contains other entities. This doesn't happen when creating a blueprint manually over the same area.

Blueprint created via script:
create_blueprint.png
create_blueprint.png (111.83 KiB) Viewed 2195 times
Blueprint created manually:
manual_blueprint.png
manual_blueprint.png (146.3 KiB) Viewed 2195 times
Command used:

Code: Select all

/c p = game.player; pp = p.position; p.cursor_stack.set_stack('blueprint'); p.cursor_stack.create_blueprint{area = {{ pp.x - 5, pp.y - 5 }, { pp.x + 5, pp.y + 5 }}, surface = p.surface, force = p.force}
Last edited by mickael9 on Sun Jul 02, 2017 7:25 pm, edited 1 time in total.

Rseding91
Factorio Staff
Factorio Staff
Posts: 13209
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: LuaItemStack::create_blueprint always includes tile ghosts

Post by Rseding91 »

Thanks for the report. The standard blueprint "include tiles" logic was changed a while ago and the Lua interface hasn't been updated to operate the same way.

I can change it to work similar to the normal GUI does but it's going to cause any mods using the current system to break.
If you want to get ahold of me I'm almost always on Discord.

User avatar
mickael9
Fast Inserter
Fast Inserter
Posts: 112
Joined: Mon Mar 14, 2016 4:04 am
Contact:

Re: LuaItemStack::create_blueprint always includes tile ghosts

Post by mickael9 »

Personally I would go with the change, unless there are other differences than just how tile ghosts are handled.
I don't think anyone should depend on this strange behavior since it's obviously a bug

Post Reply

Return to “Resolved Problems and Bugs”