Removed CoreLauncher
This commit is contained in:
@@ -22,7 +22,6 @@ import mindustry.graphics.g3d.PlanetRenderer.*;
|
||||
import mindustry.type.*;
|
||||
import mindustry.type.Sector.*;
|
||||
import mindustry.ui.*;
|
||||
import mindustry.world.blocks.campaign.CoreLauncher.*;
|
||||
|
||||
import static mindustry.Vars.*;
|
||||
import static mindustry.graphics.g3d.PlanetRenderer.*;
|
||||
@@ -36,7 +35,7 @@ public class PlanetDialog extends BaseDialog implements PlanetInterfaceRenderer{
|
||||
private int launchRange;
|
||||
private float zoom = 1f, selectAlpha = 1f;
|
||||
private @Nullable Sector selected, hovered, launchSector;
|
||||
private CoreLauncherEntity launcher;
|
||||
private Tilec launcher;
|
||||
private Mode mode = look;
|
||||
|
||||
public PlanetDialog(){
|
||||
@@ -98,7 +97,7 @@ public class PlanetDialog extends BaseDialog implements PlanetInterfaceRenderer{
|
||||
return super.show();
|
||||
}
|
||||
|
||||
public void show(Sector sector, int range, CoreLauncherEntity launcher){
|
||||
public void show(Sector sector, int range, Tilec launcher){
|
||||
this.launcher = launcher;
|
||||
selected = null;
|
||||
hovered = null;
|
||||
@@ -343,7 +342,7 @@ public class PlanetDialog extends BaseDialog implements PlanetInterfaceRenderer{
|
||||
}
|
||||
|
||||
if(mode == launch){
|
||||
launcher.launch();
|
||||
control.handleLaunch(launcher);
|
||||
zoom = 0.5f;
|
||||
|
||||
ui.hudfrag.showLaunchDirect();
|
||||
|
||||
@@ -24,6 +24,7 @@ import mindustry.net.Packets.*;
|
||||
import mindustry.type.*;
|
||||
import mindustry.ui.*;
|
||||
import mindustry.ui.dialogs.*;
|
||||
import mindustry.world.blocks.storage.*;
|
||||
|
||||
import static mindustry.Vars.*;
|
||||
|
||||
@@ -56,6 +57,7 @@ public class HudFragment extends Fragment{
|
||||
showToast("Sector[accent] captured[]!");
|
||||
});
|
||||
|
||||
//TODO full implementation
|
||||
Events.on(ResetEvent.class, e -> {
|
||||
coreItems.resetUsed();
|
||||
});
|
||||
@@ -145,7 +147,7 @@ public class HudFragment extends Fragment{
|
||||
cont.row();
|
||||
}
|
||||
|
||||
//TODO BUTTONS FOR VIEWING EXPORTS/IMPORTS/RESEARCH
|
||||
//TODO BUTTONS FOR VIEWING EXPORTS/IMPORTS/RESEARCH/MAP/ETC
|
||||
/*
|
||||
cont.table(t -> {
|
||||
|
||||
@@ -324,7 +326,7 @@ public class HudFragment extends Fragment{
|
||||
p.touchable(Touchable.disabled);
|
||||
});
|
||||
|
||||
//DEBUG: rate table
|
||||
//TODO DEBUG: rate table
|
||||
parent.fill(t -> {
|
||||
t.bottom().left();
|
||||
t.table(Styles.black6, c -> {
|
||||
@@ -355,8 +357,16 @@ public class HudFragment extends Fragment{
|
||||
rebuild.run();
|
||||
}
|
||||
});
|
||||
});
|
||||
}).visible(() -> state.isCampaign() && content.items().contains(i -> state.secinfo.getExport(i) > 0));
|
||||
});
|
||||
|
||||
//TODO move, select loadout, consume resources
|
||||
parent.fill(t -> {
|
||||
t.bottom().visible(() -> state.isCampaign() && player.team().core() != null);
|
||||
|
||||
t.button("test launch", Icon.warning, () -> {
|
||||
ui.planet.show(state.getSector(), ((CoreBlock)player.team().core().block).launchRange, player.team().core());
|
||||
}).width(150f);
|
||||
});
|
||||
|
||||
blockfrag.build(parent);
|
||||
|
||||
Reference in New Issue
Block a user