Loop unit transfer command

This commit is contained in:
Anuken
2024-06-20 17:26:10 -04:00
parent b81553f490
commit 5b9d3029a5
9 changed files with 86 additions and 12 deletions

View File

@@ -147,7 +147,8 @@ abstract class PayloadComp implements Posc, Rotc, Hitboxc, Unitc{
Unit u = payload.unit;
//can't drop ground units
if(!u.canPass(tileX(), tileY()) || Units.count(x, y, u.physicSize(), o -> o.isGrounded()) > 1){
//allow stacking for small units for now - otherwise, unit transfer would get annoying
if(!u.canPass(tileX(), tileY()) || Units.count(x, y, u.physicSize(), o -> o.isGrounded() && o.hitSize > 14f) > 1){
return false;
}