Mindustry icon indicating copy to clipboard operation
Mindustry copied to clipboard

Selecting only 1 block as a schematic picks it instead

Open Garen7 opened this issue 2 years ago • 2 comments

Selects the block so it can be used for dragging a line of the block and for the UI helpers such as the drill range one the Plasma Bores. Doesn't select the block instead if its something that you might want to save as a one block schematic such as a logic block. I coded this for mobile too originally but tbh it just felt easier to select the block the normal way instead of copying it so I didn't add that to the PR.

Note that unlike the Pick block hotkey this does not change the category on the block selector panel since afaik there isn't a nice way to do that without being in the PlacementFragment class, not sure if that's a deal breaker but I didn't notice any bugs as a result of that.

If your pull request is not translation or serverlist-related, read the list of requirements below and check each box:

  • [X] I have read the contribution guidelines.
  • [X] I have ensured that my code compiles, if applicable.
  • [X] I have ensured that any new features in this PR function correctly in-game, if applicable.

Garen7 avatar Nov 17 '22 07:11 Garen7

Why would one need that if there is a pick block hotkey again?

LeoSko avatar Nov 17 '22 08:11 LeoSko

Why not merge the two hotkeys and remove the pick block hotkey to keep things simple?

Garen7 avatar Nov 17 '22 09:11 Garen7

I don't see a good reason to change this. Block picking trigger immediately and cannot be dragged, schematic selections can. Making a one-block schematic can copy configuration that block picking may not.

Anuken avatar Jan 07 '23 16:01 Anuken