mirror of
https://github.com/Anuken/Mindustry.git
synced 2025-07-26 23:57:39 +07:00
Fixed #2507
This commit is contained in:
@ -49,7 +49,7 @@ public class UnitType extends UnlockableContent{
|
|||||||
public boolean destructibleWreck = true;
|
public boolean destructibleWreck = true;
|
||||||
public float groundLayer = Layer.groundUnit;
|
public float groundLayer = Layer.groundUnit;
|
||||||
public float sway = 1f;
|
public float sway = 1f;
|
||||||
public int payloadCapacity = 1;
|
public float payloadCapacity = 1;
|
||||||
public int commandLimit = 24;
|
public int commandLimit = 24;
|
||||||
public float visualElevation = -1f;
|
public float visualElevation = -1f;
|
||||||
public boolean allowLegStep = false;
|
public boolean allowLegStep = false;
|
||||||
|
@ -45,9 +45,11 @@ public class BlockInventoryFragment extends Fragment{
|
|||||||
@Remote(called = Loc.server, targets = Loc.both, forward = true)
|
@Remote(called = Loc.server, targets = Loc.both, forward = true)
|
||||||
public static void requestItem(Player player, Building tile, Item item, int amount){
|
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())) return;
|
||||||
amount = Mathf.clamp(amount, 0, player.unit().itemCapacity());
|
amount = Math.min(player.unit().maxAccepted(item), amount);
|
||||||
int fa = amount;
|
int fa = amount;
|
||||||
|
|
||||||
|
if(amount == 0) return;
|
||||||
|
|
||||||
if(net.server() && (!Units.canInteract(player, tile) ||
|
if(net.server() && (!Units.canInteract(player, tile) ||
|
||||||
!netServer.admins.allowAction(player, ActionType.withdrawItem, tile.tile(), action -> {
|
!netServer.admins.allowAction(player, ActionType.withdrawItem, tile.tile(), action -> {
|
||||||
action.item = item;
|
action.item = item;
|
||||||
|
Reference in New Issue
Block a user