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

@@ -44,7 +44,7 @@ public class BlockInventoryFragment extends Fragment{
@Remote(called = Loc.server, targets = Loc.both, forward = true)
public static void requestItem(Player player, Building tile, Item item, int amount){
if(player == null || tile == null || !tile.interactable(player.team())) return;
if(player == null || tile == null || !tile.interactable(player.team()) || !player.within(tile, buildingRange)) return;
amount = Math.min(player.unit().maxAccepted(item), amount);
int fa = amount;
@@ -165,7 +165,7 @@ public class BlockInventoryFragment extends Fragment{
container.add(i);
Boolp canPick = () -> player.unit().acceptsItem(item) && !state.isPaused();
Boolp canPick = () -> player.unit().acceptsItem(item) && !state.isPaused() && player.within(tile, itemTransferRange);
HandCursorListener l = new HandCursorListener();
l.setEnabled(canPick);