mirror of
https://github.com/Anuken/Mindustry.git
synced 2025-01-25 22:58:47 +07:00
Item image fix / Overflow/router reload fix
This commit is contained in:
parent
b63c02cb10
commit
5c193a47eb
@ -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));
|
||||
|
||||
|
@ -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);
|
||||
|
@ -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){
|
||||
|
Loading…
Reference in New Issue
Block a user