canWithdraw() + changes to displayable() (#6902)
* `shouldDiplay()` + `canWithdraw()` * Better implementation of `displayable()`
This commit is contained in:
@@ -577,7 +577,7 @@ public class PlacementFragment{
|
||||
if(Core.scene.hasMouse() || topTable.hit(v.x, v.y, false) != null) return null;
|
||||
|
||||
//check for a unit
|
||||
Unit unit = Units.closestOverlap(player.team(), Core.input.mouseWorldX(), Core.input.mouseWorldY(), 5f, u -> !u.isLocal());
|
||||
Unit unit = Units.closestOverlap(player.team(), Core.input.mouseWorldX(), Core.input.mouseWorldY(), 5f, u -> !u.isLocal() && u.displayable());
|
||||
//if cursor has a unit, display it
|
||||
if(unit != null) return unit;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user