Mindustry
Mindustry copied to clipboard
Logic sensor
Add some logic sensors
buildX/buildY: The position of the build currently being placed/broken by a unit/build turretbuilding/breaking: On unit & build turret: the current block being placed/broken or null; on blocks being constructed: the type of block being constructedselectedBlock: The current block selected by a player
- [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.
I would reccomend making buildX and buildY return null instead of -1 when not building (Double.NaN instead of -1)
Would it be better to have building and breaking be exclusive and return the currently placed/broken build or keep it as is with building returning any building from a builder unit and breaking allowing to test if it's being broken?
no idea tbh. i would choose the variation where it uses the same thing and then reverses it
also the way its right now kinda feels weird