I've made the Picker mod which behaves like the middle mouse button in Minecraft: put your cursor over an entity and activate Picker with a hotkey, and it selects the corresponding item from your inventory. I'd like to extend it to be able to pick stone, concrete, and hazard concrete as well, but I don't see how to do it. I'm using player.selected to get the entity currently under the cursor--is there a corresponding pointer to the tile under the cursor?
I thought I found the answer with player.cursor_position, but that's a write-only property. I guess there are synchronization issues?
Read whether stone/concrete/ground is under mouse cursor?
Re: Read whether stone/concrete/ground is under mouse cursor?
You can't. The mouse position is not part of the game state and as such can't be read from mods.
If you want to get ahold of me I'm almost always on Discord.
Re: Read whether stone/concrete/ground is under mouse cursor?
Thanks for the definitive answer.Rseding91 wrote:You can't. The mouse position is not part of the game state and as such can't be read from mods.
- DedlySpyder
- Filter Inserter
- Posts: 253
- Joined: Fri Jun 20, 2014 11:42 am
- Contact:
Re: Read whether stone/concrete/ground is under mouse cursor?
Then what is the point of cursor_position?Rseding91 wrote:You can't. The mouse position is not part of the game state and as such can't be read from mods.
Re: Read whether stone/concrete/ground is under mouse cursor?
It's write only. It was put in to make the game trailer and never removed.DedlySpyder wrote:Then what is the point of cursor_position?Rseding91 wrote:You can't. The mouse position is not part of the game state and as such can't be read from mods.
If you want to get ahold of me I'm almost always on Discord.