[1.1.55] clear_cursor does not work in on_built_entity
Posted: Fri Mar 04, 2022 1:28 pm
Using this code
I would expect the stack to be removed from the cursor when placing an entity (such as robots) and show the text "Cleared cursor: true".
Instead it does show "Cleared cursor: true" but the items remain on the cursor!
Code: Select all
script.on_event(defines.events.on_built_entity, function(event)
local player = game.get_player(event.player_index)
game.print("Cleared cursor: " .. tostring(player.clear_cursor()))
end)
Instead it does show "Cleared cursor: true" but the items remain on the cursor!