[solved] Setting player cursor stack?
- aubergine18
- Smart Inserter
- Posts: 1264
- Joined: Fri Jul 22, 2016 8:51 pm
- Contact:
[solved] Setting player cursor stack?
Is it possible to set the player cursor stack? I can see how to clear it with LuaPlayer.clean_cursor(), but the LuaPlayer.cursor_stack property is read-only (according to docs) so.... how do I set a cursor stack? Also the LuaPlayer.character.stack property is also read-only (not sure if that's a different type of stack though).
Last edited by aubergine18 on Sat Oct 08, 2016 1:49 am, edited 1 time in total.
Better forum search for modders: Enclose your search term in quotes, eg. "font_color" or "custom-input" - it prevents the forum search from splitting on hypens and underscores, resulting in much more accurate results.
Re: Setting player cursor stack?
The return type is LuaItemStack which has methods to set the stack/count/durability and so on.
If you want to get ahold of me I'm almost always on Discord.
- aubergine18
- Smart Inserter
- Posts: 1264
- Joined: Fri Jul 22, 2016 8:51 pm
- Contact:
Re: Setting player cursor stack?
Ah, awesome! Thank you !! 

Better forum search for modders: Enclose your search term in quotes, eg. "font_color" or "custom-input" - it prevents the forum search from splitting on hypens and underscores, resulting in much more accurate results.