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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user