Sound framework improvements

This commit is contained in:
Anuken
2020-11-12 18:07:26 -05:00
parent d163cacb6a
commit d1d3ef0c67
24 changed files with 162 additions and 355 deletions

View File

@@ -136,7 +136,7 @@ public class PlanetDialog extends BaseDialog implements PlanetInterfaceRenderer{
if(to.near().contains(launchSector)) return launchSector;
Sector launchFrom = launchSector;
if(launchFrom == null){
if(launchFrom == null || (to.preset == null && !to.near().contains(launchSector))){
//TODO pick one with the most resources
launchFrom = to.near().find(Sector::hasBase);
if(launchFrom == null && to.preset != null){
@@ -465,7 +465,7 @@ public class PlanetDialog extends BaseDialog implements PlanetInterfaceRenderer{
int i = 0;
for(ItemStack stack : items){
res.image(stack.item.icon(Cicon.small)).padRight(3);
res.add(UI.formatAmount(stack.amount)).color(Color.lightGray);
res.add(UI.formatAmount(Math.max(stack.amount, 0))).color(Color.lightGray);
if(++i % 2 == 0){
res.row();
}