mirror of
https://github.com/Anuken/Mindustry.git
synced 2026-10-02 03:00:29 +03:00
Disallow conveyor bridge/phase bridge from accepting items when disabled (#12585)
* Disallow conveyor bridge/phase bridge from accepting items when disabled * re23rwsdwed
This commit is contained in:
@@ -38,6 +38,7 @@ public class ItemBridge extends Block{
|
|||||||
public float arrowSpacing = 4f, arrowOffset = 2f, arrowPeriod = 0.4f;
|
public float arrowSpacing = 4f, arrowOffset = 2f, arrowPeriod = 0.4f;
|
||||||
public float arrowTimeScl = 6.2f;
|
public float arrowTimeScl = 6.2f;
|
||||||
public float bridgeWidth = 6.5f;
|
public float bridgeWidth = 6.5f;
|
||||||
|
/** If true, this bridge will not accept items or liquids when disabled. */
|
||||||
public boolean noAcceptDisabled = false;
|
public boolean noAcceptDisabled = false;
|
||||||
|
|
||||||
//for autolink
|
//for autolink
|
||||||
@@ -434,7 +435,7 @@ public class ItemBridge extends Block{
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean acceptItem(Building source, Item item){
|
public boolean acceptItem(Building source, Item item){
|
||||||
return hasItems && team == source.team && items.total() < itemCapacity && checkAccept(source, world.tile(link));
|
return hasItems && team == source.team && items.total() < itemCapacity && checkAccept(source, world.tile(link)) && (!noAcceptDisabled || enabled);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
Reference in New Issue
Block a user