[0.17.79] LuaPlayer.cursor_ghost allows set to non-placeable item

Bugs that are actually features.
Post Reply
Jorn86
Long Handed Inserter
Long Handed Inserter
Posts: 70
Joined: Sun May 01, 2016 7:08 pm
Contact:

[0.17.79] LuaPlayer.cursor_ghost allows set to non-placeable item

Post by Jorn86 »

The mod api allows me to make a call like

Code: Select all

player.cursor_ghost = 'deconstruction-planner'
It runs as expected, putting a ghost of the planner in my cursor. Also as expected, planner ghosts don't actually work.

However, it doesn't show the ghost icon and there's no indication that the item in cursor is a ghost, causing confusion if one tries to use the planner.

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

Re: [0.17.79] LuaPlayer.cursor_ghost allows set to non-placeable item

Post by Rseding91 »

Thanks for the report. The ghost cursor logic doesn't have any checks on it by design: to keep it simple. Simply don't set it to things which are useless if you don't want it to be something useless :P
If you want to get ahold of me I'm almost always on Discord.

Jorn86
Long Handed Inserter
Long Handed Inserter
Posts: 70
Joined: Sun May 01, 2016 7:08 pm
Contact:

Re: [0.17.79] LuaPlayer.cursor_ghost allows set to non-placeable item

Post by Jorn86 »

I figured that might be the solution :)

As a workaround, I'll check the place_result of the item and only set a ghost if it exists. Would I be missing anything that way?

Post Reply

Return to “Not a bug”