mirror of
https://github.com/Anuken/Mindustry.git
synced 2025-03-09 20:29:06 +07:00
Option for conveyors to not push units around (#10166)
* Option to not push units around * Apply to playload conveyors as well
This commit is contained in:
parent
dc956c5b00
commit
afc1ff58c5
@ -30,6 +30,7 @@ public class Conveyor extends Block implements Autotiler{
|
||||
|
||||
public float speed = 0f;
|
||||
public float displayedSpeed = 0f;
|
||||
public boolean pushUnits = true;
|
||||
|
||||
public @Nullable Block junctionReplacement, bridgeReplacement;
|
||||
|
||||
@ -223,7 +224,7 @@ public class Conveyor extends Block implements Autotiler{
|
||||
@Override
|
||||
public void unitOn(Unit unit){
|
||||
|
||||
if(clogHeat > 0.5f || !enabled) return;
|
||||
if(!pushUnits || clogHeat > 0.5f || !enabled) return;
|
||||
|
||||
noSleep();
|
||||
|
||||
|
@ -21,6 +21,7 @@ public class PayloadConveyor extends Block{
|
||||
public @Load("@-edge") TextureRegion edgeRegion;
|
||||
public Interp interp = Interp.pow5;
|
||||
public float payloadLimit = 3f;
|
||||
public boolean pushUnits = true;
|
||||
|
||||
public PayloadConveyor(String name){
|
||||
super(name);
|
||||
@ -257,7 +258,7 @@ public class PayloadConveyor extends Block{
|
||||
|
||||
@Override
|
||||
public void unitOn(Unit unit){
|
||||
if(!enabled) return;
|
||||
if(!pushUnits || !enabled) return;
|
||||
|
||||
//calculate derivative of units moved last frame
|
||||
float delta = (curInterp - lastInterp) * size * tilesize;
|
||||
|
Loading…
Reference in New Issue
Block a user