caspark / factorio-a11y

An accessibility mod which implements voice control for Factorio
14 stars 0 forks source link

Mining interface #1

Open EphDoering opened 1 year ago

EphDoering commented 1 year ago

Hi, I saw in your bugs that mining should take time. I think it's probably easiest to use the built in mining api to do that:

  1. take control of the selection by setting player.game_view_settings.update_entity_selection=false
  2. select entity to mine via player.selected =
  3. make the player mine: player.mining_state.mining=true
  4. in an event like a cancel input, on_player_mined_item, etc. select a new mining target or restore selection control to the mouse.
caspark commented 1 year ago

I'm not working on this right now, but that said: WOW, those new APIs definitely make a lot of things much easier to implement if I ever come back to hacking on this mod - thanks for the heads up!