Mindustry
Mindustry copied to clipboard
Selecting only 1 block as a schematic picks it instead
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.
Why would one need that if there is a pick block hotkey again?
Why not merge the two hotkeys and remove the pick block hotkey to keep things simple?
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.