From 4fcb89cb2804b7301c310434d792c03f434a870e Mon Sep 17 00:00:00 2001 From: Anuken Date: Wed, 18 Feb 2026 21:43:25 -0500 Subject: [PATCH] Fixed #11690 --- core/src/mindustry/ai/types/CommandAI.java | 4 +++- core/src/mindustry/type/UnitType.java | 6 +++++- gradle.properties | 2 +- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/core/src/mindustry/ai/types/CommandAI.java b/core/src/mindustry/ai/types/CommandAI.java index 8753df6de8..805fa3c807 100644 --- a/core/src/mindustry/ai/types/CommandAI.java +++ b/core/src/mindustry/ai/types/CommandAI.java @@ -214,7 +214,9 @@ public class CommandAI extends AIController{ } } - if(!net.client() && command == UnitCommand.enterPayloadCommand && unit.buildOn() != null && (targetPos == null || (world.buildWorld(targetPos.x, targetPos.y) != null && world.buildWorld(targetPos.x, targetPos.y) == unit.buildOn()))){ + if(!net.client() && command == UnitCommand.enterPayloadCommand && unit.type.allowedInPayloads && unit.buildOn() != null && + (targetPos == null || (world.buildWorld(targetPos.x, targetPos.y) != null && world.buildWorld(targetPos.x, targetPos.y) == unit.buildOn()))){ + var build = unit.buildOn(); tmpPayload.unit = unit; if(build.team == unit.team && build.acceptPayload(build, tmpPayload)){ diff --git a/core/src/mindustry/type/UnitType.java b/core/src/mindustry/type/UnitType.java index e47316c1a1..0fca300470 100644 --- a/core/src/mindustry/type/UnitType.java +++ b/core/src/mindustry/type/UnitType.java @@ -1066,7 +1066,11 @@ public class UnitType extends UnlockableContent implements Senseable{ //assign default commands. if(commands.size == 0){ - commands.add(UnitCommand.moveCommand, UnitCommand.enterPayloadCommand); + commands.add(UnitCommand.moveCommand); + + if(allowedInPayloads){ + commands.add(UnitCommand.enterPayloadCommand); + } if(canBoost){ commands.add(UnitCommand.boostCommand); diff --git a/gradle.properties b/gradle.properties index e783eeedb3..385b7cd9b7 100644 --- a/gradle.properties +++ b/gradle.properties @@ -26,4 +26,4 @@ org.gradle.caching=true org.gradle.internal.http.socketTimeout=100000 org.gradle.internal.http.connectionTimeout=100000 android.enableR8.fullMode=false -archash=505f62e674 +archash=b6926f1d27