[Genhis][2.0.72] LuaPlayer::build_from_cursor with cursor_ghost fails

Gweneph
Long Handed Inserter
Long Handed Inserter
Posts: 73
Joined: Thu Nov 14, 2019 11:51 pm
Contact:

[Genhis][2.0.72] LuaPlayer::build_from_cursor with cursor_ghost fails

Post by Gweneph »

Right now it seems that build_from_cursor and can_build from cursor ignore any crusor_ghost you have: doing nothing and returning false respectively.

Reproduction:
/c game.player.clear_cursor()
/c game.player.cursor_ghost = "stone-furnace"
/c game.player.build_from_cursor{ position = game.player.position, build_mode = defines.build_mode.forced }

Actual result:
no ghost

Expected result:
a ghost right where the player is.

can_build_from_cursor agrees that nothing will happen.

If this behavoir is expected, then this post is a mod interface request to have these functions consider the cursor_ghost.
Genhis
Factorio Staff
Factorio Staff
Posts: 892
Joined: Wed Dec 24, 2014 8:19 am
Contact:

Re: [Genhis][2.0.72] LuaPlayer::build_from_cursor with cursor_ghost fails

Post by Genhis »

Thanks for the report, this is fixed for 2.1.
Post Reply

Return to “Fixed for 2.1”