mirror of
https://github.com/Anuken/Mindustry.git
synced 2025-02-06 08:57:45 +07:00
Make a "unitCommandPosition" event so that unit commands issued to non-attack coordinates can still be listened for (#9650)
* Update InputHandler.java Make commandTap fire a Trigger.unitCommandPosition (in the event that it doesn't fire a Trigger.unitCommandAttack) * Update EventType.java Add "unitCommandPosition" to Trigger, for when selected units are commanded to move to a position (without that position being an attack).
This commit is contained in:
parent
3162f043d2
commit
0a512e05c3
@ -39,6 +39,7 @@ public class EventType{
|
||||
socketConfigChanged,
|
||||
update,
|
||||
unitCommandChange,
|
||||
unitCommandPosition,
|
||||
unitCommandAttack,
|
||||
importMod,
|
||||
draw,
|
||||
|
@ -1012,6 +1012,8 @@ public abstract class InputHandler implements InputProcessor, GestureListener{
|
||||
|
||||
if(attack != null){
|
||||
Events.fire(Trigger.unitCommandAttack);
|
||||
}else{
|
||||
Events.fire(Trigger.unitCommandPosition);
|
||||
}
|
||||
|
||||
int maxChunkSize = 200;
|
||||
|
Loading…
Reference in New Issue
Block a user