Item image fix / Overflow/router reload fix
This commit is contained in:
@@ -15,7 +15,7 @@ public class ItemImage extends Stack{
|
|||||||
public ItemImage(TextureRegion region, Supplier<CharSequence> text){
|
public ItemImage(TextureRegion region, Supplier<CharSequence> text){
|
||||||
Table t = new Table().left().bottom();
|
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.row();
|
||||||
t.label(text).get().setFontScale(Unit.dp.scl(0.5f));
|
t.label(text).get().setFontScale(Unit.dp.scl(0.5f));
|
||||||
|
|
||||||
@@ -26,7 +26,7 @@ public class ItemImage extends Stack{
|
|||||||
public ItemImage(ItemStack stack){
|
public ItemImage(ItemStack stack){
|
||||||
Table t = new Table().left().bottom();
|
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.row();
|
||||||
t.add(stack.amount + "").get().setFontScale(Unit.dp.scl(0.5f));
|
t.add(stack.amount + "").get().setFontScale(Unit.dp.scl(0.5f));
|
||||||
|
|
||||||
|
|||||||
@@ -17,6 +17,11 @@ public class OverflowGate extends Router{
|
|||||||
@Override
|
@Override
|
||||||
public void update(Tile tile){
|
public void update(Tile tile){
|
||||||
SplitterEntity entity = tile.entity();
|
SplitterEntity entity = tile.entity();
|
||||||
|
|
||||||
|
if(entity.lastItem == null && entity.items.total() > 0){
|
||||||
|
entity.items.clear();
|
||||||
|
}
|
||||||
|
|
||||||
if(entity.lastItem != null){
|
if(entity.lastItem != null){
|
||||||
entity.time += 1f/speed * Timers.delta();
|
entity.time += 1f/speed * Timers.delta();
|
||||||
Tile target = getTileTarget(tile, entity.lastItem, entity.lastInput, false);
|
Tile target = getTileTarget(tile, entity.lastItem, entity.lastInput, false);
|
||||||
|
|||||||
@@ -34,8 +34,7 @@ public class Router extends Block{
|
|||||||
SplitterEntity entity = tile.entity();
|
SplitterEntity entity = tile.entity();
|
||||||
|
|
||||||
if(entity.lastItem == null && entity.items.total() > 0){
|
if(entity.lastItem == null && entity.items.total() > 0){
|
||||||
entity.lastItem = entity.items.take();
|
entity.items.clear();
|
||||||
entity.items.add(entity.lastItem, 1);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if(entity.lastItem != null){
|
if(entity.lastItem != null){
|
||||||
|
|||||||
Reference in New Issue
Block a user