Better launch selection
This commit is contained in:
@@ -9,7 +9,6 @@ import arc.math.*;
|
|||||||
import arc.scene.ui.*;
|
import arc.scene.ui.*;
|
||||||
import arc.struct.*;
|
import arc.struct.*;
|
||||||
import arc.util.*;
|
import arc.util.*;
|
||||||
import mindustry.*;
|
|
||||||
import mindustry.audio.*;
|
import mindustry.audio.*;
|
||||||
import mindustry.content.*;
|
import mindustry.content.*;
|
||||||
import mindustry.core.GameState.*;
|
import mindustry.core.GameState.*;
|
||||||
@@ -25,7 +24,6 @@ import mindustry.maps.Map;
|
|||||||
import mindustry.type.*;
|
import mindustry.type.*;
|
||||||
import mindustry.ui.dialogs.*;
|
import mindustry.ui.dialogs.*;
|
||||||
import mindustry.world.*;
|
import mindustry.world.*;
|
||||||
import mindustry.world.blocks.storage.CoreBlock.*;
|
|
||||||
|
|
||||||
import java.io.*;
|
import java.io.*;
|
||||||
import java.text.*;
|
import java.text.*;
|
||||||
@@ -250,19 +248,6 @@ public class Control implements ApplicationListener, Loadable{
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
//TODO move
|
|
||||||
public void handleLaunch(CoreBuild tile){
|
|
||||||
LaunchCorec ent = LaunchCore.create();
|
|
||||||
ent.set(tile);
|
|
||||||
ent.block(Blocks.coreShard);
|
|
||||||
ent.lifetime(Vars.launchDuration);
|
|
||||||
ent.add();
|
|
||||||
|
|
||||||
//remove schematic requirements from core
|
|
||||||
tile.items.remove(universe.getLastLoadout().requirements());
|
|
||||||
tile.items.remove(universe.getLaunchResources());
|
|
||||||
}
|
|
||||||
|
|
||||||
public void playSector(Sector sector){
|
public void playSector(Sector sector){
|
||||||
playSector(sector, sector);
|
playSector(sector, sector);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -28,7 +28,7 @@ public class SectorInfo{
|
|||||||
/** Items stored in all cores. */
|
/** Items stored in all cores. */
|
||||||
public ItemSeq items = new ItemSeq();
|
public ItemSeq items = new ItemSeq();
|
||||||
/** The best available core type. */
|
/** The best available core type. */
|
||||||
public Block bestCoreType = Blocks.air;
|
public Block bestCoreType = Blocks.coreShard;
|
||||||
/** Max storage capacity. */
|
/** Max storage capacity. */
|
||||||
public int storageCapacity = 0;
|
public int storageCapacity = 0;
|
||||||
/** Whether a core is available here. */
|
/** Whether a core is available here. */
|
||||||
|
|||||||
@@ -352,10 +352,6 @@ public class DesktopInput extends InputHandler{
|
|||||||
table.button(Icon.map, Styles.clearPartiali, () -> {
|
table.button(Icon.map, Styles.clearPartiali, () -> {
|
||||||
ui.planet.show();
|
ui.planet.show();
|
||||||
}).visible(() -> state.isCampaign()).tooltip("@planetmap");
|
}).visible(() -> state.isCampaign()).tooltip("@planetmap");
|
||||||
|
|
||||||
table.button(Icon.up, Styles.clearPartiali, () -> {
|
|
||||||
ui.planet.showLaunch(state.getSector(), player.team().core());
|
|
||||||
}).visible(() -> state.isCampaign()).tooltip("@launchcore").disabled(b -> player.team().core() == null);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void pollInput(){
|
void pollInput(){
|
||||||
|
|||||||
@@ -21,6 +21,13 @@ public class ItemSeq implements Iterable<ItemStack>, Serializable{
|
|||||||
stacks.each(this::add);
|
stacks.each(this::add);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public ItemSeq copy(){
|
||||||
|
ItemSeq out = new ItemSeq();
|
||||||
|
out.total = total;
|
||||||
|
System.arraycopy(values, 0, out.values, 0, values.length);
|
||||||
|
return out;
|
||||||
|
}
|
||||||
|
|
||||||
public void each(ItemConsumer cons){
|
public void each(ItemConsumer cons){
|
||||||
for(int i = 0; i < values.length; i++){
|
for(int i = 0; i < values.length; i++){
|
||||||
if(values[i] != 0){
|
if(values[i] != 0){
|
||||||
@@ -46,6 +53,19 @@ public class ItemSeq implements Iterable<ItemStack>, Serializable{
|
|||||||
return values[item.id] > 0;
|
return values[item.id] > 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public boolean has(ItemSeq seq){
|
||||||
|
for(int i = 0; i < values.length; i++){
|
||||||
|
if(seq.values[i] > values[i]){
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean has(Item item, int amount){
|
||||||
|
return values[item.id] >= amount;
|
||||||
|
}
|
||||||
|
|
||||||
public int get(Item item){
|
public int get(Item item){
|
||||||
return values[item.id];
|
return values[item.id];
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -40,9 +40,22 @@ public class Sector{
|
|||||||
this.id = tile.id;
|
this.id = tile.id;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** @return a copy of the items in this sector - may be core items, or stored data. */
|
||||||
|
public ItemSeq getItems(){
|
||||||
|
if(isBeingPlayed()){
|
||||||
|
ItemSeq out = new ItemSeq();
|
||||||
|
if(state.rules.defaultTeam.core() != null) out.add(state.rules.defaultTeam.core().items);
|
||||||
|
return out;
|
||||||
|
}else{
|
||||||
|
return info.items;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public Seq<Sector> near(){
|
public Seq<Sector> near(){
|
||||||
tmpSeq1.clear();
|
tmpSeq1.clear();
|
||||||
near(tmpSeq1::add);
|
for(Ptile tile : tile.tiles){
|
||||||
|
tmpSeq1.add(planet.getSector(tile));
|
||||||
|
}
|
||||||
|
|
||||||
return tmpSeq1;
|
return tmpSeq1;
|
||||||
}
|
}
|
||||||
@@ -131,6 +144,12 @@ public class Sector{
|
|||||||
removeItem(item, -amount);
|
removeItem(item, -amount);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void removeItems(ItemSeq items){
|
||||||
|
ItemSeq copy = items.copy();
|
||||||
|
copy.each((i, a) -> copy.set(i, -a));
|
||||||
|
addItems(copy);
|
||||||
|
}
|
||||||
|
|
||||||
public void removeItem(Item item, int amount){
|
public void removeItem(Item item, int amount){
|
||||||
ItemSeq seq = new ItemSeq();
|
ItemSeq seq = new ItemSeq();
|
||||||
seq.add(item, -amount);
|
seq.add(item, -amount);
|
||||||
|
|||||||
@@ -30,7 +30,7 @@ public class LaunchLoadoutDialog extends BaseDialog{
|
|||||||
super("@configure");
|
super("@configure");
|
||||||
}
|
}
|
||||||
|
|
||||||
public void show(CoreBlock core, Building build, Runnable confirm){
|
public void show(CoreBlock core, Sector sector, Runnable confirm){
|
||||||
cont.clear();
|
cont.clear();
|
||||||
buttons.clear();
|
buttons.clear();
|
||||||
|
|
||||||
@@ -43,12 +43,14 @@ public class LaunchLoadoutDialog extends BaseDialog{
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
ItemSeq sitems = sector.getItems();
|
||||||
|
|
||||||
//updates sum requirements
|
//updates sum requirements
|
||||||
Runnable update = () -> {
|
Runnable update = () -> {
|
||||||
total.clear();
|
total.clear();
|
||||||
selected.requirements().each(total::add);
|
selected.requirements().each(total::add);
|
||||||
universe.getLaunchResources().each(total::add);
|
universe.getLaunchResources().each(total::add);
|
||||||
valid = build.items.has(total);
|
valid = sitems.has(total);
|
||||||
};
|
};
|
||||||
|
|
||||||
Cons<Table> rebuild = table -> {
|
Cons<Table> rebuild = table -> {
|
||||||
@@ -65,8 +67,8 @@ public class LaunchLoadoutDialog extends BaseDialog{
|
|||||||
String amountStr = "[lightgray]" + (al + " + [accent]" + as + "[lightgray]");
|
String amountStr = "[lightgray]" + (al + " + [accent]" + as + "[lightgray]");
|
||||||
|
|
||||||
table.add(
|
table.add(
|
||||||
build.items.has(s.item, s.amount) ? amountStr :
|
sitems.has(s.item, s.amount) ? amountStr :
|
||||||
"[scarlet]" + (Math.min(build.items.get(s.item), s.amount) + "[lightgray]/" + amountStr)).padLeft(2).left().padRight(4);
|
"[scarlet]" + (Math.min(sitems.get(s.item), s.amount) + "[lightgray]/" + amountStr)).padLeft(2).left().padRight(4);
|
||||||
|
|
||||||
if(++i % 4 == 0){
|
if(++i % 4 == 0){
|
||||||
table.row();
|
table.row();
|
||||||
@@ -108,7 +110,7 @@ public class LaunchLoadoutDialog extends BaseDialog{
|
|||||||
selected = s;
|
selected = s;
|
||||||
update.run();
|
update.run();
|
||||||
rebuildItems.run();
|
rebuildItems.run();
|
||||||
}).group(group).pad(4).disabled(!build.items.has(s.requirements())).checked(s == selected).size(200f);
|
}).group(group).pad(4).disabled(!sitems.has(s.requirements())).checked(s == selected).size(200f);
|
||||||
|
|
||||||
if(++i % cols == 0){
|
if(++i % cols == 0){
|
||||||
t.row();
|
t.row();
|
||||||
|
|||||||
@@ -78,10 +78,7 @@ public class PausedDialog extends BaseDialog{
|
|||||||
|
|
||||||
cont.buttonRow("@load", Icon.download, load::show).disabled(b -> net.active());
|
cont.buttonRow("@load", Icon.download, load::show).disabled(b -> net.active());
|
||||||
}else if(state.isCampaign()){
|
}else if(state.isCampaign()){
|
||||||
cont.buttonRow("@launchcore", Icon.up, () -> {
|
cont.buttonRow("@research", Icon.tree, ui.research::show);
|
||||||
hide();
|
|
||||||
ui.planet.showLaunch(state.getSector(), player.team().core());
|
|
||||||
}).disabled(b -> player.team().core() == null || net.client());
|
|
||||||
|
|
||||||
cont.row();
|
cont.row();
|
||||||
|
|
||||||
@@ -93,11 +90,7 @@ public class PausedDialog extends BaseDialog{
|
|||||||
cont.row();
|
cont.row();
|
||||||
}
|
}
|
||||||
|
|
||||||
if(state.isCampaign() && net.active()){
|
cont.buttonRow("@hostserver.mobile", Icon.host, ui.host::show).disabled(b -> net.active());
|
||||||
cont.buttonRow("@research", Icon.tree, ui.research::show);
|
|
||||||
}else{
|
|
||||||
cont.buttonRow("@hostserver.mobile", Icon.host, ui.host::show).disabled(b -> net.active());
|
|
||||||
}
|
|
||||||
|
|
||||||
cont.buttonRow("@quit", Icon.exit, this::showQuitConfirm).update(s -> {
|
cont.buttonRow("@quit", Icon.exit, this::showQuitConfirm).update(s -> {
|
||||||
s.setText(control.saves.getCurrent() != null && control.saves.getCurrent().isAutosave() ? "@save.quit" : "@quit");
|
s.setText(control.saves.getCurrent() != null && control.saves.getCurrent().isAutosave() ? "@save.quit" : "@quit");
|
||||||
|
|||||||
@@ -13,6 +13,7 @@ import arc.scene.event.*;
|
|||||||
import arc.scene.ui.*;
|
import arc.scene.ui.*;
|
||||||
import arc.scene.ui.layout.*;
|
import arc.scene.ui.layout.*;
|
||||||
import arc.util.*;
|
import arc.util.*;
|
||||||
|
import mindustry.content.*;
|
||||||
import mindustry.core.*;
|
import mindustry.core.*;
|
||||||
import mindustry.ctype.*;
|
import mindustry.ctype.*;
|
||||||
import mindustry.game.*;
|
import mindustry.game.*;
|
||||||
@@ -22,7 +23,6 @@ import mindustry.graphics.g3d.*;
|
|||||||
import mindustry.type.*;
|
import mindustry.type.*;
|
||||||
import mindustry.ui.*;
|
import mindustry.ui.*;
|
||||||
import mindustry.world.blocks.storage.*;
|
import mindustry.world.blocks.storage.*;
|
||||||
import mindustry.world.blocks.storage.CoreBlock.*;
|
|
||||||
|
|
||||||
import static mindustry.Vars.*;
|
import static mindustry.Vars.*;
|
||||||
import static mindustry.graphics.g3d.PlanetRenderer.*;
|
import static mindustry.graphics.g3d.PlanetRenderer.*;
|
||||||
@@ -40,7 +40,6 @@ public class PlanetDialog extends BaseDialog implements PlanetInterfaceRenderer{
|
|||||||
public int launchRange;
|
public int launchRange;
|
||||||
public float zoom = 1f, selectAlpha = 1f;
|
public float zoom = 1f, selectAlpha = 1f;
|
||||||
public @Nullable Sector selected, hovered, launchSector;
|
public @Nullable Sector selected, hovered, launchSector;
|
||||||
public CoreBuild launcher;
|
|
||||||
public Mode mode = look;
|
public Mode mode = look;
|
||||||
public boolean launching;
|
public boolean launching;
|
||||||
public Cons<Sector> listener = s -> {};
|
public Cons<Sector> listener = s -> {};
|
||||||
@@ -91,9 +90,16 @@ public class PlanetDialog extends BaseDialog implements PlanetInterfaceRenderer{
|
|||||||
mode = look;
|
mode = look;
|
||||||
selected = hovered = launchSector = null;
|
selected = hovered = launchSector = null;
|
||||||
launching = false;
|
launching = false;
|
||||||
|
|
||||||
|
zoom = 1f;
|
||||||
|
planets.zoom = 2f;
|
||||||
|
selectAlpha = 0f;
|
||||||
|
launchSector = state.getSector();
|
||||||
|
|
||||||
if(planets.planet.getLastSector() != null){
|
if(planets.planet.getLastSector() != null){
|
||||||
lookAt(planets.planet.getLastSector());
|
lookAt(planets.planet.getLastSector());
|
||||||
}
|
}
|
||||||
|
|
||||||
return super.show();
|
return super.show();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -115,37 +121,33 @@ public class PlanetDialog extends BaseDialog implements PlanetInterfaceRenderer{
|
|||||||
super.show();
|
super.show();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void showLaunch(Sector sector, CoreBuild launcher){
|
void lookAt(Sector sector){
|
||||||
if(launcher == null) return;
|
|
||||||
|
|
||||||
this.launcher = launcher;
|
|
||||||
selected = null;
|
|
||||||
hovered = null;
|
|
||||||
launching = false;
|
|
||||||
|
|
||||||
//update view to sector
|
|
||||||
lookAt(sector);
|
|
||||||
zoom = 1f;
|
|
||||||
planets.zoom = 2f;
|
|
||||||
selectAlpha = 0f;
|
|
||||||
launchRange = ((CoreBlock)launcher.block).launchRange;
|
|
||||||
launchSector = sector;
|
|
||||||
|
|
||||||
mode = launch;
|
|
||||||
|
|
||||||
super.show();
|
|
||||||
}
|
|
||||||
|
|
||||||
private void lookAt(Sector sector){
|
|
||||||
planets.camPos.set(Tmp.v33.set(sector.tile.v).rotate(Vec3.Y, -sector.planet.getRotation()));
|
planets.camPos.set(Tmp.v33.set(sector.tile.v).rotate(Vec3.Y, -sector.planet.getRotation()));
|
||||||
}
|
}
|
||||||
|
|
||||||
boolean canSelect(Sector sector){
|
boolean canSelect(Sector sector){
|
||||||
if(mode == select) return sector.hasBase();
|
if(mode == select) return sector.hasBase();
|
||||||
|
|
||||||
return mode == launch &&
|
return sector.near().contains(Sector::hasBase)//(sector.tile.v.within(launchSector.tile.v, (launchRange + 0.5f) * planets.planet.sectorApproxRadius*2) //within range
|
||||||
(sector.tile.v.within(launchSector.tile.v, (launchRange + 0.5f) * planets.planet.sectorApproxRadius*2) //within range
|
|| (sector.preset != null && sector.preset.unlocked()); //is an unlocked preset
|
||||||
|| (sector.preset != null && sector.preset.unlocked())); //is an unlocked preset
|
}
|
||||||
|
|
||||||
|
Sector findLauncher(Sector to){
|
||||||
|
//directly nearby.
|
||||||
|
if(to.near().contains(launchSector)) return launchSector;
|
||||||
|
|
||||||
|
Sector launchFrom = launchSector;
|
||||||
|
if(launchFrom == null){
|
||||||
|
//TODO pick one with the most resources
|
||||||
|
launchFrom = to.near().find(Sector::hasBase);
|
||||||
|
if(launchFrom == null && to.preset != null){
|
||||||
|
if(launchSector != null) return launchSector;
|
||||||
|
launchFrom = planets.planet.sectors.min(s -> !s.hasBase() ? Float.MAX_VALUE : s.tile.v.dst2(to.tile.v));
|
||||||
|
if(!launchFrom.hasBase()) launchFrom = null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return launchFrom;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -157,9 +159,10 @@ public class PlanetDialog extends BaseDialog implements PlanetInterfaceRenderer{
|
|||||||
|
|
||||||
if(selectAlpha > 0.01f){
|
if(selectAlpha > 0.01f){
|
||||||
if(canSelect(sec) || sec.unlocked()){
|
if(canSelect(sec) || sec.unlocked()){
|
||||||
if(sec.baseCoverage > 0){
|
//TODO remove completely?
|
||||||
planets.fill(sec, Tmp.c1.set(Team.crux.color).a(0.5f * sec.baseCoverage * selectAlpha), -0.002f);
|
//if(sec.baseCoverage > 0){
|
||||||
}
|
//planets.fill(sec, Tmp.c1.set(Team.crux.color).a(0.5f * sec.baseCoverage * selectAlpha), -0.002f);
|
||||||
|
//}
|
||||||
|
|
||||||
Color color =
|
Color color =
|
||||||
sec.hasBase() ? Team.sharded.color :
|
sec.hasBase() ? Team.sharded.color :
|
||||||
@@ -177,8 +180,10 @@ public class PlanetDialog extends BaseDialog implements PlanetInterfaceRenderer{
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if(launchSector != null){
|
Sector current = state.getSector() != null && state.getSector().isBeingPlayed() ? state.getSector() : null;
|
||||||
planets.fill(launchSector, hoverColor, -0.001f);
|
|
||||||
|
if(current != null){
|
||||||
|
planets.fill(current, hoverColor, -0.001f);
|
||||||
}
|
}
|
||||||
|
|
||||||
//draw hover border
|
//draw hover border
|
||||||
@@ -195,9 +200,10 @@ public class PlanetDialog extends BaseDialog implements PlanetInterfaceRenderer{
|
|||||||
|
|
||||||
planets.batch.flush(Gl.triangles);
|
planets.batch.flush(Gl.triangles);
|
||||||
|
|
||||||
if(mode == launch || mode == select){
|
if(hovered != null && !hovered.hasBase()){
|
||||||
if(hovered != launchSector && hovered != null && canSelect(hovered)){
|
Sector launchFrom = findLauncher(hovered);
|
||||||
planets.drawArc(planet, launchSector.tile.v, hovered.tile.v);
|
if(launchFrom != null && hovered != launchFrom && canSelect(hovered)){
|
||||||
|
planets.drawArc(planet, launchFrom.tile.v, hovered.tile.v);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -244,7 +250,7 @@ public class PlanetDialog extends BaseDialog implements PlanetInterfaceRenderer{
|
|||||||
addListener(new ElementGestureListener(){
|
addListener(new ElementGestureListener(){
|
||||||
@Override
|
@Override
|
||||||
public void tap(InputEvent event, float x, float y, int count, KeyCode button){
|
public void tap(InputEvent event, float x, float y, int count, KeyCode button){
|
||||||
if(hovered != null && ((mode == launch ? canSelect(hovered) && hovered != launchSector : hovered.unlocked()) || debugSelect)){
|
if(hovered != null && ((mode == look ? canSelect(hovered) && hovered != launchSector : hovered.unlocked()) || debugSelect)){
|
||||||
selected = hovered;
|
selected = hovered;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -263,9 +269,8 @@ public class PlanetDialog extends BaseDialog implements PlanetInterfaceRenderer{
|
|||||||
},
|
},
|
||||||
new Table(t -> {
|
new Table(t -> {
|
||||||
t.touchable = Touchable.disabled;
|
t.touchable = Touchable.disabled;
|
||||||
//TODO localize
|
|
||||||
t.top();
|
t.top();
|
||||||
t.label(() -> mode == select ? "@sectors.select" : mode == launch ? "Select Launch Sector" : "").style(Styles.outlineLabel).color(Pal.accent);
|
t.label(() -> mode == select ? "@sectors.select" : "").style(Styles.outlineLabel).color(Pal.accent);
|
||||||
}),
|
}),
|
||||||
new Table(t -> {
|
new Table(t -> {
|
||||||
t.right();
|
t.right();
|
||||||
@@ -322,7 +327,7 @@ public class PlanetDialog extends BaseDialog implements PlanetInterfaceRenderer{
|
|||||||
stable.toFront();
|
stable.toFront();
|
||||||
|
|
||||||
//smooth camera toward the sector
|
//smooth camera toward the sector
|
||||||
if(mode == launch && launching){
|
if(mode == look && launching){
|
||||||
float len = planets.camPos.len();
|
float len = planets.camPos.len();
|
||||||
planets.camPos.slerp(Tmp.v31.set(selected.tile.v).rotate(Vec3.Y,-selected.planet.getRotation()).setLength(len), 0.1f);
|
planets.camPos.slerp(Tmp.v31.set(selected.tile.v).rotate(Vec3.Y,-selected.planet.getRotation()).setLength(len), 0.1f);
|
||||||
}
|
}
|
||||||
@@ -453,16 +458,20 @@ public class PlanetDialog extends BaseDialog implements PlanetInterfaceRenderer{
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if(mode == launch && !sector.hasBase()){
|
if(mode == look && !sector.hasBase()){
|
||||||
Sector current = state.rules.sector;
|
|
||||||
shouldHide = false;
|
shouldHide = false;
|
||||||
loadouts.show((CoreBlock)launcher.block, launcher, () -> {
|
Sector from = findLauncher(sector);
|
||||||
control.handleLaunch(launcher);
|
CoreBlock block = from.info.bestCoreType instanceof CoreBlock b ? b : (CoreBlock)Blocks.coreShard;
|
||||||
|
|
||||||
|
loadouts.show(block, from, () -> {
|
||||||
|
from.removeItems(universe.getLastLoadout().requirements());
|
||||||
|
from.removeItems(universe.getLaunchResources());
|
||||||
|
|
||||||
launching = true;
|
launching = true;
|
||||||
zoom = 0.5f;
|
zoom = 0.5f;
|
||||||
|
|
||||||
ui.hudfrag.showLaunchDirect();
|
ui.hudfrag.showLaunchDirect();
|
||||||
Time.runTask(launchDuration, () -> control.playSector(current, sector));
|
Time.runTask(launchDuration, () -> control.playSector(from, sector));
|
||||||
});
|
});
|
||||||
}else if(mode == select){
|
}else if(mode == select){
|
||||||
listener.get(sector);
|
listener.get(sector);
|
||||||
@@ -500,8 +509,6 @@ public class PlanetDialog extends BaseDialog implements PlanetInterfaceRenderer{
|
|||||||
public enum Mode{
|
public enum Mode{
|
||||||
/** Look around for existing sectors. Can only deploy. */
|
/** Look around for existing sectors. Can only deploy. */
|
||||||
look,
|
look,
|
||||||
/** Launch to a new location. */
|
|
||||||
launch,
|
|
||||||
/** Select a sector for some purpose. */
|
/** Select a sector for some purpose. */
|
||||||
select
|
select
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -45,7 +45,7 @@ public class Fracker extends SolidPump{
|
|||||||
Draw.rect(region, x, y);
|
Draw.rect(region, x, y);
|
||||||
super.drawCracks();
|
super.drawCracks();
|
||||||
|
|
||||||
Drawf.liquid(liquidRegion, x, y, liquids.total() / liquidCapacity, result.color);
|
Drawf.liquid(liquidRegion, x, y, liquids.get(result) / liquidCapacity, result.color);
|
||||||
|
|
||||||
Draw.rect(rotatorRegion, x, y, pumpTime);
|
Draw.rect(rotatorRegion, x, y, pumpTime);
|
||||||
Draw.rect(topRegion, x, y);
|
Draw.rect(topRegion, x, y);
|
||||||
|
|||||||
Reference in New Issue
Block a user