mirror of
https://github.com/Anuken/Mindustry.git
synced 2026-10-01 18:50:27 +03:00
add which unitcommand it is to unitcommand actiontype (#11962)
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user