add which unitcommand it is to unitcommand actiontype (#11962)

This commit is contained in:
bendn
2026-04-22 09:51:24 -04:00
committed by GitHub
parent 4fed863744
commit f8d13af736
2 changed files with 3 additions and 0 deletions
@@ -407,6 +407,7 @@ public abstract class InputHandler implements InputProcessor, GestureListener{
if(net.server() && !netServer.admins.allowAction(player, ActionType.commandUnits, event -> {
event.unitIDs = unitIds;
event.unitCommand = command;
})){
throw new ValidateException(player, "Player cannot command units.");
}
@@ -8,6 +8,7 @@ import arc.util.Log.*;
import arc.util.pooling.Pool.*;
import arc.util.pooling.*;
import mindustry.*;
import mindustry.ai.*;
import mindustry.gen.*;
import mindustry.type.*;
import mindustry.world.*;
@@ -701,6 +702,7 @@ public class Administration{
/** valid only for command unit events */
public @Nullable int[] unitIDs;
public @Nullable UnitCommand unitCommand;
/** valid only for command building events */
public @Nullable int[] buildingPositions;