This commit is contained in:
Anuken
2026-02-18 21:43:25 -05:00
parent 50f6b1675e
commit 4fcb89cb28
3 changed files with 9 additions and 3 deletions

View File

@@ -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)){

View File

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