mirror of
https://github.com/Anuken/Mindustry.git
synced 2025-01-05 13:08:20 +07:00
Fixed #5012
This commit is contained in:
parent
e81219dd3e
commit
66594a2b32
@ -489,7 +489,7 @@ public class LExecutor{
|
||||
|
||||
Building build = exec.building(p1);
|
||||
int dropped = Math.min(unit.stack.amount, exec.numi(p2));
|
||||
if(build != null && build.isValid() && dropped > 0 && unit.within(build, logicItemTransferRange + build.block.size * tilesize/2f)){
|
||||
if(build != null && build.team == unit.team && build.isValid() && dropped > 0 && unit.within(build, logicItemTransferRange + build.block.size * tilesize/2f)){
|
||||
int accepted = build.acceptStack(unit.item(), dropped, unit);
|
||||
if(accepted > 0){
|
||||
Call.transferItemTo(unit, unit.item(), accepted, unit.x, unit.y, build);
|
||||
@ -503,7 +503,8 @@ public class LExecutor{
|
||||
Building build = exec.building(p1);
|
||||
int amount = exec.numi(p3);
|
||||
|
||||
if(build != null && build.isValid() && build.items != null && exec.obj(p2) instanceof Item item && unit.within(build, logicItemTransferRange + build.block.size * tilesize/2f)){
|
||||
if(build != null && build.team == unit.team && build.isValid() && build.items != null &&
|
||||
exec.obj(p2) instanceof Item item && unit.within(build, logicItemTransferRange + build.block.size * tilesize/2f)){
|
||||
int taken = Math.min(build.items.get(item), Math.min(amount, unit.maxAccepted(item)));
|
||||
|
||||
if(taken > 0){
|
||||
|
Loading…
Reference in New Issue
Block a user