Wave balancing / Smoother conveyor items

This commit is contained in:
Anuken
2019-02-10 20:23:20 -05:00
parent 718f56172e
commit 52593252c5
2 changed files with 7 additions and 6 deletions

View File

@@ -195,7 +195,7 @@ public class Zones implements ContentList{
}},
new SpawnGroup(UnitTypes.dagger){{
begin = 2;
begin = 1;
spacing = 2;
unitScaling = 2;
}},
@@ -271,20 +271,20 @@ public class Zones implements ContentList{
}},
new SpawnGroup(UnitTypes.dagger){{
begin = 2;
begin = 1;
unitScaling = 1;
spacing = 2;
}},
new SpawnGroup(UnitTypes.dagger){{
begin = 10;
begin = 11;
spacing = 2;
unitScaling = 2;
unitAmount = 2;
}},
new SpawnGroup(UnitTypes.ghoul){{
begin = 5;
begin = 6;
unitScaling = 0.5f;
unitAmount = 1;
spacing = 5;

View File

@@ -181,7 +181,9 @@ public class Conveyor extends Block{
ConveyorEntity entity = tile.entity();
entity.minitem = 1f;
Tile next = tile.getNearby(tile.getRotation());
float nextMax = next.block() instanceof Conveyor ? 1f - Math.max(itemSpace - next.<ConveyorEntity>entity().minitem, 0) : 1f;
int minremove = Integer.MAX_VALUE;
for(int i = entity.convey.size - 1; i >= 0; i--){
@@ -205,10 +207,9 @@ public class Conveyor extends Block{
pos.x = Mathf.lerpDelta(pos.x, 0, 0.1f);
}
pos.y = Mathf.clamp(pos.y);
pos.y = Mathf.clamp(pos.y, 0, nextMax);
if(pos.y >= 0.9999f && offloadDir(tile, pos.item)){
Tile next = tile.getNearby(tile.getRotation());
if(next.block() instanceof Conveyor){
ConveyorEntity othere = next.entity();