Various bugfixes
This commit is contained in:
@@ -252,7 +252,7 @@ public class UI extends SceneModule{
|
||||
public void showInfo(String info){
|
||||
Threads.assertGraphics();
|
||||
|
||||
new Dialog("$text.info.title", "dialog"){{
|
||||
new Dialog("", "dialog"){{
|
||||
getCell(content()).growX();
|
||||
content().margin(15).add(info).width(400f).wrap().get().setAlignment(Align.center, Align.center);
|
||||
buttons().addButton("$text.ok", this::hide).size(90, 50).pad(4);
|
||||
@@ -262,7 +262,7 @@ public class UI extends SceneModule{
|
||||
public void showInfo(String info, Runnable clicked){
|
||||
Threads.assertGraphics();
|
||||
|
||||
new Dialog("$text.info.title", "dialog"){{
|
||||
new Dialog("", "dialog"){{
|
||||
getCell(content()).growX();
|
||||
content().margin(15).add(info).width(400f).wrap().get().setAlignment(Align.center, Align.center);
|
||||
buttons().addButton("$text.ok", () -> {
|
||||
|
||||
@@ -320,10 +320,8 @@ public abstract class BaseUnit extends Unit implements ShooterTrait{
|
||||
|
||||
if(target != null) behavior();
|
||||
|
||||
if(!isWave && !isFlying()){
|
||||
x = Mathf.clamp(x, tilesize/2f, world.width() * tilesize - tilesize/2f);
|
||||
y = Mathf.clamp(y, tilesize/2f, world.height() * tilesize - tilesize/2f);
|
||||
}
|
||||
x = Mathf.clamp(x, tilesize, world.width() * tilesize - tilesize);
|
||||
y = Mathf.clamp(y, tilesize, world.height() * tilesize - tilesize);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -124,10 +124,11 @@ public class PlayerListFragment extends Fragment{
|
||||
}else{
|
||||
ui.showConfirm("$text.confirm", "$text.confirmadmin", () -> netServer.admins.adminPlayer(id, player.usid));
|
||||
}
|
||||
}).update(b -> {
|
||||
b.setChecked(player.isAdmin);
|
||||
b.setDisabled(Net.client());
|
||||
}).get().setTouchable(() -> Net.client() ? Touchable.disabled : Touchable.enabled);
|
||||
})
|
||||
.update(b -> b.setChecked(player.isAdmin))
|
||||
.disabled(b -> Net.client())
|
||||
.touchable(() -> Net.client() ? Touchable.disabled : Touchable.enabled)
|
||||
.checked(player.isAdmin);
|
||||
|
||||
t.addImageButton("icon-zoom-small", 14 * 2, () -> ui.showError("Currently unimplemented.")/*Call.onAdminRequest(player, AdminAction.trace)*/);
|
||||
|
||||
|
||||
@@ -90,7 +90,7 @@ public abstract class BaseBlock extends MappableContent{
|
||||
|
||||
public boolean acceptLiquid(Tile tile, Tile source, Liquid liquid, float amount){
|
||||
return hasLiquids && tile.entity.liquids.get(liquid) + amount < liquidCapacity &&
|
||||
(!singleLiquid || (tile.entity.liquids.current() == liquid || tile.entity.liquids.get(tile.entity.liquids.current()) < 0.01f)) &&
|
||||
(!singleLiquid || (tile.entity.liquids.current() == liquid || tile.entity.liquids.get(tile.entity.liquids.current()) < 0.2f)) &&
|
||||
(!consumes.has(ConsumeLiquid.class) || consumes.liquid() == liquid);
|
||||
}
|
||||
|
||||
|
||||
@@ -51,7 +51,7 @@ public class UnitFactory extends Block{
|
||||
hasItems = true;
|
||||
solid = false;
|
||||
itemCapacity = 10;
|
||||
flags = EnumSet.of(BlockFlag.producer);
|
||||
flags = EnumSet.of(BlockFlag.producer, BlockFlag.target);
|
||||
|
||||
consumes.require(ConsumeItems.class);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user