Page 1 of 1

Add a way to see/set what ghost is in a player's hand and appropriate events.

Posted: Wed Feb 27, 2019 11:44 pm
by dewiniaid
Factorio 0.17 has a nice feature where you can (optionally) have items selected from the quickbar or via pipette create a placeable ghost if you lack the actual item.

However, there does not appear to be a way to query (or change) what this ghost is -- it is not an item in player.cursor_stack and does not raise the on_player_cursor_stack_changed event.

Is there any chance we can get this changed? It would affect any mod that wants to extend what the pipette tool does -- and my particular usage is so QuickItemSwap can rotate between belts/splitters/undergrounds even when holding a ghost or rotating to an item that's not in the player inventory.

Re: Add a way to see/set what ghost is in a player's hand and appropriate events.

Posted: Tue Mar 05, 2019 5:19 pm
by Boodals
I have implemented this for the next version of 0.17 (I have source access).
LuaControl::cursor_ghost [R/W] (ItemPrototypeSpecification)

No events because I made some before and I hated it. If you really need them, i'd recommend making a new request topic specifically for the events.

Re: Add a way to see/set what ghost is in a player's hand and appropriate events.

Posted: Tue Mar 05, 2019 5:21 pm
by Bilka
Note that this is part of 0.17.7, not 0.17.6.