Object sense support / Bugfixes

This commit is contained in:
Anuken
2020-09-09 19:02:40 -04:00
parent c03e3f56aa
commit 5259969384
14 changed files with 101 additions and 23 deletions

View File

@@ -161,7 +161,7 @@ public class OverlayRenderer{
Draw.reset();
Building tile = world.buildWorld(v.x, v.y);
if(tile != null && tile.interactable(player.team()) && tile.acceptStack(player.unit().item(), player.unit().stack.amount, player.unit()) > 0){
if(tile != null && tile.interactable(player.team()) && tile.acceptStack(player.unit().item(), player.unit().stack.amount, player.unit()) > 0 && player.within(tile, itemTransferRange)){
Lines.stroke(3f, Pal.gray);
Lines.square(tile.x, tile.y, tile.block().size * tilesize / 2f + 3 + Mathf.absin(Time.time(), 5f, 1f));
Lines.stroke(1f, Pal.place);