mirror of
https://github.com/Anuken/Mindustry.git
synced 2025-01-07 05:50:54 +07:00
Fixed #6164
This commit is contained in:
parent
e9e5fea306
commit
956cbe792b
@ -431,17 +431,16 @@ public class LExecutor{
|
|||||||
Call.pickedUnitPayload(unit, result);
|
Call.pickedUnitPayload(unit, result);
|
||||||
}
|
}
|
||||||
}else{ //buildings
|
}else{ //buildings
|
||||||
Building tile = world.buildWorld(unit.x, unit.y);
|
Building build = world.buildWorld(unit.x, unit.y);
|
||||||
|
|
||||||
//TODO copy pasted code
|
//TODO copy pasted code
|
||||||
if(tile != null && tile.team == unit.team){
|
if(build != null && build.team == unit.team){
|
||||||
if(tile.block.buildVisibility != BuildVisibility.hidden && tile.canPickup() && pay.canPickup(tile)){
|
Payload current = build.getPayload();
|
||||||
Call.pickedBuildPayload(unit, tile, true);
|
if(current != null && pay.canPickupPayload(current)){
|
||||||
}else{ //pick up block payload
|
Call.pickedBuildPayload(unit, build, false);
|
||||||
Payload current = tile.getPayload();
|
//pick up whole building directly
|
||||||
if(current != null && pay.canPickupPayload(current)){
|
}else if(build.block.buildVisibility != BuildVisibility.hidden && build.canPickup() && pay.canPickup(build)){
|
||||||
Call.pickedBuildPayload(unit, tile, false);
|
Call.pickedBuildPayload(unit, build, true);
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user