Merge remote-tracking branch 'origin/master'
This commit is contained in:
@@ -155,7 +155,7 @@ public class Weapon implements Cloneable{
|
||||
Draw.rect(outlineRegion,
|
||||
wx, wy,
|
||||
outlineRegion.width * Draw.scl * -Mathf.sign(flipSprite),
|
||||
region.height * Draw.scl,
|
||||
outlineRegion.height * Draw.scl,
|
||||
weaponRotation);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -265,6 +265,8 @@ public class Block extends UnlockableContent{
|
||||
public boolean quickRotate = true;
|
||||
/** Main subclass. Non-anonymous. */
|
||||
public @Nullable Class<?> subclass;
|
||||
/** Determines if this block gets a higher unloader priority. */
|
||||
public boolean highUnloadPriority = false;
|
||||
|
||||
public float selectScroll; //scroll position for certain blocks
|
||||
public Prov<Building> buildType = null; //initialized later
|
||||
|
||||
@@ -42,6 +42,7 @@ public class StackConveyor extends Block implements Autotiler{
|
||||
hasItems = true;
|
||||
itemCapacity = 10;
|
||||
conveyorPlacement = true;
|
||||
highUnloadPriority = true;
|
||||
|
||||
ambientSound = Sounds.conveyor;
|
||||
ambientSoundVolume = 0.004f;
|
||||
|
||||
@@ -25,6 +25,7 @@ public class StorageBlock extends Block{
|
||||
flags = EnumSet.of(BlockFlag.storage);
|
||||
allowResupply = true;
|
||||
envEnabled = Env.any;
|
||||
highUnloadPriority = true;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -11,7 +11,6 @@ import mindustry.gen.*;
|
||||
import mindustry.type.*;
|
||||
import mindustry.world.*;
|
||||
import mindustry.world.blocks.*;
|
||||
import mindustry.world.blocks.distribution.*;
|
||||
import mindustry.world.meta.*;
|
||||
|
||||
import static mindustry.Vars.*;
|
||||
@@ -139,7 +138,7 @@ public class Unloader extends Block{
|
||||
|
||||
//sort so it gives full priority to blocks that can give but not receive (stackConveyors and Storage), and then by load
|
||||
possibleBlocks.sort(Structs.comps(
|
||||
Structs.comparingBool(e -> e.building.block instanceof StorageBlock || e.building.block instanceof StackConveyor),
|
||||
Structs.comparingBool(e -> e.building.block.highUnloadPriority),
|
||||
Structs.comparingFloat(e -> e.loadFactor)
|
||||
));
|
||||
|
||||
@@ -163,7 +162,7 @@ public class Unloader extends Block{
|
||||
}
|
||||
|
||||
//trade the items
|
||||
if(dumpingFrom != null && dumpingTo != null && dumpingFrom.loadFactor != dumpingTo.loadFactor){
|
||||
if(dumpingFrom != null && dumpingTo != null && (dumpingFrom.loadFactor != dumpingTo.loadFactor || dumpingFrom.building.block.highUnloadPriority)){
|
||||
dumpingTo.building.handleItem(this, item);
|
||||
dumpingFrom.building.removeStack(item, 1);
|
||||
any = true;
|
||||
@@ -232,4 +231,4 @@ public class Unloader extends Block{
|
||||
sortItem = id == -1 ? null : content.items().get(id);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,8 +4,8 @@
|
||||
"address": ["185.104.248.61", "easyplay.su"]
|
||||
},
|
||||
{
|
||||
"name": "SMokeOfAnarchy.duckdns.org",
|
||||
"address": ["smokeofanarchy.duckdns.org:6853"]
|
||||
"name": "SkaarjDustry",
|
||||
"address": ["skaarjproject.duckdns.org"]
|
||||
},
|
||||
{
|
||||
"name": "{AA}",
|
||||
|
||||
@@ -59,6 +59,10 @@
|
||||
"name": "Phoenix Network",
|
||||
"address": ["172.104.253.198"]
|
||||
},
|
||||
{
|
||||
"name": "Xpdustry",
|
||||
"address": ["xpdustry.fr:7000"]
|
||||
},
|
||||
{
|
||||
"name": "Pandorum",
|
||||
"address": ["pandorum.su:5018", "pandorum.su:5019", "pandorum.su:5020"]
|
||||
|
||||
Reference in New Issue
Block a user