Item image fix / Overflow/router reload fix

This commit is contained in:
Anuken 2018-11-05 09:02:45 -05:00
parent b63c02cb10
commit 5c193a47eb
3 changed files with 8 additions and 4 deletions

View File

@ -15,7 +15,7 @@ public class ItemImage extends Stack{
public ItemImage(TextureRegion region, Supplier<CharSequence> text){
Table t = new Table().left().bottom();
t.label(text).color(Color.DARK_GRAY).padBottom(-Core.skin.font().getData().capHeight * 2).get().setFontScale(Unit.dp.scl(0.5f));
t.label(text).color(Color.DARK_GRAY).padBottom(-Core.skin.font().getData().capHeight * 2 / Unit.dp.scl(1f)).get().setFontScale(Unit.dp.scl(0.5f));
t.row();
t.label(text).get().setFontScale(Unit.dp.scl(0.5f));
@ -26,7 +26,7 @@ public class ItemImage extends Stack{
public ItemImage(ItemStack stack){
Table t = new Table().left().bottom();
t.add(stack.amount + "").color(Color.DARK_GRAY).padBottom(-Core.skin.font().getData().capHeight * 2).get().setFontScale(Unit.dp.scl(0.5f));
t.add(stack.amount + "").color(Color.DARK_GRAY).padBottom(-Core.skin.font().getData().capHeight * 2 / Unit.dp.scl(1f)).get().setFontScale(Unit.dp.scl(0.5f));
t.row();
t.add(stack.amount + "").get().setFontScale(Unit.dp.scl(0.5f));

View File

@ -17,6 +17,11 @@ public class OverflowGate extends Router{
@Override
public void update(Tile tile){
SplitterEntity entity = tile.entity();
if(entity.lastItem == null && entity.items.total() > 0){
entity.items.clear();
}
if(entity.lastItem != null){
entity.time += 1f/speed * Timers.delta();
Tile target = getTileTarget(tile, entity.lastItem, entity.lastInput, false);

View File

@ -34,8 +34,7 @@ public class Router extends Block{
SplitterEntity entity = tile.entity();
if(entity.lastItem == null && entity.items.total() > 0){
entity.lastItem = entity.items.take();
entity.items.add(entity.lastItem, 1);
entity.items.clear();
}
if(entity.lastItem != null){