Player.clean_cursor() return true/false

Nexela
Smart Inserter
Smart Inserter
Posts: 1828
Joined: Wed May 25, 2016 11:09 am
Contact:

Player.clean_cursor() return true/false

Post by Nexela »

If this is easily possible could player.clean_cursor() return true if it was able to fully clear the cursor/cursor is already empty or false if something still remains in the cursor.
This is more of a make code prettier request then anything :) Thanks for looking into this!

Currently :

Code: Select all

player.clean_cursor()
if not player.cursor_stack.valid_for_read then
--code
end
Potential:

Code: Select all

if player.clean_cursor() then
--code
end
Rseding91
Factorio Staff
Factorio Staff
Posts: 14913
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: Player.clean_cursor() return true/false

Post by Rseding91 »

Added for 0.15.
If you want to get ahold of me I'm almost always on Discord.
Post Reply

Return to “Implemented mod requests”