Planet selection for mods

This commit is contained in:
Anuken
2020-10-13 18:50:18 -04:00
parent 3bd3dcf03b
commit 1554fd0394
9 changed files with 50 additions and 24 deletions

View File

@@ -522,6 +522,10 @@ sectors.launch = Launch
sectors.select = Select sectors.select = Select
sectors.nonelaunch = [lightgray]none (sun) sectors.nonelaunch = [lightgray]none (sun)
planet.serpulo.name = Serpulo
#TODO better name
planet.sun.name = Sun
#NOTE TO TRANSLATORS: don't bother editing these, they'll be removed and/or rewritten anyway #NOTE TO TRANSLATORS: don't bother editing these, they'll be removed and/or rewritten anyway
sector.groundZero.name = Ground Zero sector.groundZero.name = Ground Zero
sector.craters.name = The Craters sector.craters.name = The Craters

View File

@@ -19,7 +19,7 @@ import static mindustry.Vars.*;
public class Planet extends UnlockableContent{ public class Planet extends UnlockableContent{
/** Default spacing between planet orbits in world units. */ /** Default spacing between planet orbits in world units. */
private static final float orbitSpacing = 6f; private static final float orbitSpacing = 8f;
/** intersect() temp var. */ /** intersect() temp var. */
private static final Vec3 intersectResult = new Vec3(); private static final Vec3 intersectResult = new Vec3();
/** Mesh used for rendering. Created on load() - will be null on the server! */ /** Mesh used for rendering. Created on load() - will be null on the server! */
@@ -46,6 +46,8 @@ public class Planet extends UnlockableContent{
public float sectorApproxRadius; public float sectorApproxRadius;
/** Whether this planet is tidally locked relative to its parent - see https://en.wikipedia.org/wiki/Tidal_locking */ /** Whether this planet is tidally locked relative to its parent - see https://en.wikipedia.org/wiki/Tidal_locking */
public boolean tidalLock = false; public boolean tidalLock = false;
/** Whether or not this planet is listed in the planet access UI. **/
public boolean accessible = true;
/** The default starting sector displayed to the map dialog. */ /** The default starting sector displayed to the map dialog. */
public int startSector = 0; public int startSector = 0;
/** Whether the bloom render effect is enabled. */ /** Whether the bloom render effect is enabled. */

View File

@@ -266,6 +266,27 @@ public class PlanetDialog extends BaseDialog implements PlanetInterfaceRenderer{
//TODO localize //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" : mode == launch ? "Select Launch Sector" : "").style(Styles.outlineLabel).color(Pal.accent);
}),
new Table(t -> {
t.right();
if(content.planets().count(p -> p.accessible) > 1) {
t.table(Styles.black6, pt -> {
//TODO localize
pt.add("[accent]Planets[]");
pt.row();
pt.image().growX().height(4f).pad(6f).color(Pal.accent);
pt.row();
for(int i = 0; i < content.planets().size; i++){
Planet planet = content.planets().get(i);
if(planet.accessible){
pt.button(planet.localizedName, Styles.clearTogglet, () -> {
renderer.planets.planet = planet;
}).width(200).height(40).growX().update(bb -> bb.setChecked(renderer.planets.planet == planet));
pt.row();
}
}
});
}
})).grow(); })).grow();
} }

View File

@@ -0,0 +1,9 @@
Mindustry 6.0 is now in beta. This means most mechanics outside of the campaign have been more or less finalized. Any significant new content is unlikely to be added.
- Added Foreshadow turret
- Added Tsunami turret (initial implementation by Slava0135, sprite by EyeOfDarkness)
- Added logic unit control system
- Added space floor block
- Added button to center map to editor
- Added rule setting for enemy lights
- Changed armored conduits to not leak

View File

@@ -1,10 +0,0 @@
Ini adalah rilis alpha v6.0 pertama, kampanye besar-besaran dan pembaruan konten.
Meskipun versi ini telah diuji dalam multipemain, mungkin masih ada banyak masalah. Seperti biasa, laporkan masalah di Github.
Ada terlalu banyak perubahan untuk dicantumkan di sini, tetapi bagian pentingnya meliputi:
- Sistem produksi unit baru, dengan peningkatan bertahap
- Unit langsung dan kontrol menara
- Unit diganti namanya dan diperbarui
- Blok dan unit baru
- Satuan angkatan laut dan unit berbentuk serangga lainnya