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:
jp-x-g 2024-03-18 06:30:18 -07:00 committed by GitHub
parent 3162f043d2
commit 0a512e05c3
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 3 additions and 0 deletions

View File

@ -39,6 +39,7 @@ public class EventType{
socketConfigChanged,
update,
unitCommandChange,
unitCommandPosition,
unitCommandAttack,
importMod,
draw,

View File

@ -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;