Better mission display / Improved tutorial item amounts
This commit is contained in:
@@ -48,7 +48,7 @@ public class Vars{
|
||||
public static final int maxNameLength = 40;
|
||||
public static final float itemSize = 5f;
|
||||
public static final int tilesize = 8;
|
||||
public static final int sectorSize = 140;
|
||||
public static final int sectorSize = 130;
|
||||
public static final int mapPadding = 3;
|
||||
public static final int invalidSector = Integer.MAX_VALUE;
|
||||
public static Locale[] locales;
|
||||
|
||||
@@ -260,6 +260,7 @@ public class Sectors{
|
||||
new WaveMission(5),
|
||||
new ExpandMission(1, 0),
|
||||
new ItemMission(Items.lead, 30),
|
||||
new ItemMission(Items.copper, 150),
|
||||
new BlockMission(CraftingBlocks.smelter),
|
||||
new ItemMission(Items.densealloy, 30),
|
||||
new BlockMission(PowerBlocks.combustionGenerator),
|
||||
@@ -268,7 +269,7 @@ public class Sectors{
|
||||
new ItemMission(Items.silicon, 30),
|
||||
new BlockMission(UnitBlocks.daggerFactory),
|
||||
new UnitMission(UnitTypes.dagger),
|
||||
new ExpandMission(0, 1),
|
||||
new ExpandMission(-1, 0),
|
||||
new BattleMission()
|
||||
));
|
||||
}else{
|
||||
|
||||
@@ -13,8 +13,15 @@ import io.anuke.ucore.scene.ui.layout.Table;
|
||||
|
||||
public interface Mission{
|
||||
boolean isComplete();
|
||||
|
||||
/**Returns the string that is displayed in-game near the menu.*/
|
||||
String displayString();
|
||||
|
||||
/**Returns the info string displayed in the sector dialog (menu)*/
|
||||
default String menuDisplayString(){
|
||||
return displayString();
|
||||
}
|
||||
|
||||
default GameMode getMode(){
|
||||
return GameMode.noWaves;
|
||||
}
|
||||
|
||||
@@ -37,7 +37,12 @@ public class WaveMission implements Mission{
|
||||
|
||||
@Override
|
||||
public String displayString(){
|
||||
return Bundles.format("text.mission.wave", state.wave);
|
||||
return Bundles.format("text.mission.wave", state.wave, target);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String menuDisplayString(){
|
||||
return Bundles.format("text.mission.wave.menu", target);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -43,7 +43,7 @@ public class SectorsDialog extends FloatingDialog{
|
||||
(selected.hasSave() ? " [accent]/[white] " + Bundles.format("text.sector.time", selected.getSave().getPlayTime()) : ""))));
|
||||
content().row();
|
||||
content().label(() -> Bundles.format("text.mission", selected == null || selected.completedMissions >= selected.missions.size
|
||||
? Bundles.get("text.none") : selected.missions.get(selected.completedMissions).displayString())
|
||||
? Bundles.get("text.none") : selected.missions.get(selected.completedMissions).menuDisplayString())
|
||||
+ "[WHITE] " + (selected == null ? "" : Bundles.format("text.save.difficulty", "[LIGHT_GRAY]" + selected.getDifficulty().toString())));
|
||||
content().row();
|
||||
content().add(new SectorView()).grow();
|
||||
|
||||
@@ -4,6 +4,7 @@ import com.badlogic.gdx.Gdx;
|
||||
import com.badlogic.gdx.graphics.Color;
|
||||
import com.badlogic.gdx.graphics.g2d.TextureRegion;
|
||||
import com.badlogic.gdx.math.Interpolation;
|
||||
import com.badlogic.gdx.utils.Align;
|
||||
import com.badlogic.gdx.utils.Array;
|
||||
import com.badlogic.gdx.utils.Scaling;
|
||||
import io.anuke.mindustry.core.GameState.State;
|
||||
@@ -320,7 +321,9 @@ public class HudFragment extends Fragment{
|
||||
IntFormat timef = new IntFormat("text.wave.waiting");
|
||||
|
||||
table.background("button");
|
||||
table.left().labelWrap(() -> world.getSector() == null ? wavef.get(state.wave) : world.getSector().currentMission().displayString()).left().growX();
|
||||
table.labelWrap(() -> world.getSector() == null ? wavef.get(state.wave) :
|
||||
Bundles.format("text.mission.display", world.getSector().currentMission().displayString())).growX()
|
||||
.get().setAlignment(Align.center, Align.center);
|
||||
|
||||
table.visible(() -> !((world.getSector() == null && state.mode.disableWaves) || !state.mode.showMission));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user