Added map objective button
This commit is contained in:
@@ -310,6 +310,7 @@ openlink = Open Link
|
|||||||
copylink = Copy Link
|
copylink = Copy Link
|
||||||
back = Back
|
back = Back
|
||||||
max = Max
|
max = Max
|
||||||
|
objective = Map Objective
|
||||||
crash.export = Export Crash Logs
|
crash.export = Export Crash Logs
|
||||||
crash.none = No crash logs found.
|
crash.none = No crash logs found.
|
||||||
crash.exported = Crash logs exported.
|
crash.exported = Crash logs exported.
|
||||||
@@ -700,6 +701,7 @@ sector.impact0078.description = Here lie remnants of the interstellar transport
|
|||||||
sector.planetaryTerminal.description = The final target.\n\nThis coastal base contains a structure capable of launching Cores to local planets. It is extremely well guarded.\n\nProduce naval units. Eliminate the enemy as quickly as possible. Research the launch structure.
|
sector.planetaryTerminal.description = The final target.\n\nThis coastal base contains a structure capable of launching Cores to local planets. It is extremely well guarded.\n\nProduce naval units. Eliminate the enemy as quickly as possible. Research the launch structure.
|
||||||
|
|
||||||
sector.onset.name = The Onset
|
sector.onset.name = The Onset
|
||||||
|
sector.onset.description = The tutorial sector. This objective has not been created yet. Await further information.
|
||||||
|
|
||||||
status.burning.name = Burning
|
status.burning.name = Burning
|
||||||
status.freezing.name = Freezing
|
status.freezing.name = Freezing
|
||||||
|
|||||||
@@ -159,23 +159,23 @@ public class SectorPresets{
|
|||||||
new TextMarker("Hold [accent]shift[] to enter [accent]command mode[].\n[accent]Left-click and drag[] to select units.\n[accent]Right-click[] to order selected units to move or attack.", 258f * 8f, 116f * 8f)
|
new TextMarker("Hold [accent]shift[] to enter [accent]command mode[].\n[accent]Left-click and drag[] to select units.\n[accent]Right-click[] to order selected units to move or attack.", 258f * 8f, 116f * 8f)
|
||||||
),
|
),
|
||||||
new BuildCountObjective(Blocks.breach, 1).withMarkers(
|
new BuildCountObjective(Blocks.breach, 1).withMarkers(
|
||||||
new TextMarker("Units are effective, but [accent]turrets[] provide better defensive capabilities if used effectively.\n Place a [accent]Breach[] turret.\nTurrets require [accent]ammo[].", 258f * 8f, 114f * 8f)
|
new TextMarker("Units are effective, but [accent]turrets[] provide better defensive capabilities if used effectively.\n Place a [accent]Breach[] turret.\nTurrets require [accent]ammo[].", 258f * 8f, 114f * 8f)
|
||||||
),
|
),
|
||||||
new BuildCountObjective(Blocks.berylliumWall, 6).withMarkers(
|
new BuildCountObjective(Blocks.berylliumWall, 6).withMarkers(
|
||||||
new TextMarker("[accent]Walls[] can prevent oncoming damage from reaching buildings\nPlace some [accent]beryllium walls[] around the turret.", 276f * 8f, 133f * 8f)
|
new TextMarker("[accent]Walls[] can prevent oncoming damage from reaching buildings\nPlace some [accent]beryllium walls[] around the turret.", 276f * 8f, 133f * 8f)
|
||||||
),
|
),
|
||||||
new TimerObjective("@objective.enemiesapproaching",30 * 60).withMarkers(
|
new TimerObjective("@objective.enemiesapproaching",30 * 60).withMarkers(
|
||||||
new TextMarker("Enemy incoming, prepare to defend.", 276f * 8f, 133f * 8f)
|
new TextMarker("Enemy incoming, prepare to defend.", 276f * 8f, 133f * 8f)
|
||||||
).withFlags("defStart"),
|
).withFlags("defStart"),
|
||||||
new DestroyUnitsObjective(2).withFlags("defDone"),
|
new DestroyUnitsObjective(2).withFlags("defDone"),
|
||||||
new DestroyBlockObjective(Blocks.coreBastion , 288, 198, Team.malis).withMarkers(
|
new DestroyBlockObjective(Blocks.coreBastion , 288, 198, Team.malis).withMarkers(
|
||||||
new TextMarker("The enemy is vulnerable. Counter-attack.", 276f * 8f, 133f * 8f)
|
new TextMarker("The enemy is vulnerable. Counter-attack.", 276f * 8f, 133f * 8f)
|
||||||
),
|
),
|
||||||
new BuildCountObjective(Blocks.coreBastion, 1).withMarkers(
|
new BuildCountObjective(Blocks.coreBastion, 1).withMarkers(
|
||||||
new ShapeTextMarker("New cores can be placed on [accent]core tiles[].\nNew cores function as forward bases and share a resource inventory with other cores.\nPlace a core.", 287.5f * 8f, 197.5f * 8f, 9f * 2.6f, 0f, 12f)
|
new ShapeTextMarker("New cores can be placed on [accent]core tiles[].\nNew cores function as forward bases and share a resource inventory with other cores.\nPlace a core.", 287.5f * 8f, 197.5f * 8f, 9f * 2.6f, 0f, 12f)
|
||||||
),
|
),
|
||||||
new TimerObjective("Set up defenses", 120 * 60).withMarkers(
|
new TimerObjective("Set up defenses", 120 * 60).withMarkers(
|
||||||
new TextMarker("The enemy will be able to detect you in 2 minutes.\nSet up defenses, mining, and production.", 288f * 8f, 202f * 8f)
|
new TextMarker("The enemy will be able to detect you in 2 minutes.\nSet up defenses, mining, and production.", 288f * 8f, 202f * 8f)
|
||||||
).withFlags("openMap")
|
).withFlags("openMap")
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
@@ -186,19 +186,19 @@ public class SectorPresets{
|
|||||||
|
|
||||||
rules = r -> {
|
rules = r -> {
|
||||||
r.objectives.addAll(
|
r.objectives.addAll(
|
||||||
new UnitCountObjective(UnitTypes.stell, 2).withMarkers(
|
new UnitCountObjective(UnitTypes.stell, 2).withMarkers(
|
||||||
new TextMarker("The enemy will attack soon.\n Build units to defend your core.", 276f * 8f, 133f * 8f)
|
new TextMarker("The enemy will attack soon.\n Build units to defend your core.", 276f * 8f, 133f * 8f)
|
||||||
),
|
),
|
||||||
new BuildCountObjective(Blocks.breach, 1).withMarkers(
|
new BuildCountObjective(Blocks.breach, 1).withMarkers(
|
||||||
new TextMarker("Units are effective, but [accent]turrets[] provide better defensive capabilities if used effectively.\n Place a [accent]Breach[] turret.\nTurrets require [accent]ammo[].", 276f * 8f, 133f * 8f)
|
new TextMarker("Units are effective, but [accent]turrets[] provide better defensive capabilities if used effectively.\n Place a [accent]Breach[] turret.\nTurrets require [accent]ammo[].", 276f * 8f, 133f * 8f)
|
||||||
).withFlags("defDone"),
|
).withFlags("defDone"),
|
||||||
new BuildCountObjective(Blocks.berylliumWall, 6).withMarkers(
|
new BuildCountObjective(Blocks.berylliumWall, 6).withMarkers(
|
||||||
new TextMarker("[accent]Walls[] can prevent oncoming damage from reaching your buildings\nPlace some [accent]beryllium walls[] around the turret.", 276f * 8f, 133f * 8f)
|
new TextMarker("[accent]Walls[] can prevent oncoming damage from reaching your buildings\nPlace some [accent]beryllium walls[] around the turret.", 276f * 8f, 133f * 8f)
|
||||||
),
|
),
|
||||||
new BuildCountObjective(Blocks.coreBastion, 1).withMarkers(
|
new BuildCountObjective(Blocks.coreBastion, 1).withMarkers(
|
||||||
new TextMarker("You must expand.\nBuild more units and go on the offensive", 276f * 8f, 133f * 8f),
|
new TextMarker("You must expand.\nBuild more units and go on the offensive", 276f * 8f, 133f * 8f),
|
||||||
new TextMarker("Cores can only be placed in special zone tiles.", 287 * 8f, 201 * 8f)
|
new TextMarker("Cores can only be placed in special zone tiles.", 287 * 8f, 201 * 8f)
|
||||||
).withFlags("def2Done")
|
).withFlags("def2Done")
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
}};
|
}};
|
||||||
|
|||||||
@@ -72,6 +72,7 @@ public class UI implements ApplicationListener, Loadable{
|
|||||||
public ModsDialog mods;
|
public ModsDialog mods;
|
||||||
public ColorPicker picker;
|
public ColorPicker picker;
|
||||||
public LogicDialog logic;
|
public LogicDialog logic;
|
||||||
|
public FullTextDialog fullText;
|
||||||
|
|
||||||
public Cursor drillCursor, unloadCursor, targetCursor;
|
public Cursor drillCursor, unloadCursor, targetCursor;
|
||||||
|
|
||||||
@@ -197,6 +198,7 @@ public class UI implements ApplicationListener, Loadable{
|
|||||||
mods = new ModsDialog();
|
mods = new ModsDialog();
|
||||||
schematics = new SchematicsDialog();
|
schematics = new SchematicsDialog();
|
||||||
logic = new LogicDialog();
|
logic = new LogicDialog();
|
||||||
|
fullText = new FullTextDialog();
|
||||||
|
|
||||||
Group group = Core.scene.root;
|
Group group = Core.scene.root;
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,21 @@
|
|||||||
|
package mindustry.ui.dialogs;
|
||||||
|
|
||||||
|
import arc.util.*;
|
||||||
|
|
||||||
|
public class FullTextDialog extends BaseDialog{
|
||||||
|
|
||||||
|
public FullTextDialog(){
|
||||||
|
super("");
|
||||||
|
shouldPause = true;
|
||||||
|
addCloseButton();
|
||||||
|
}
|
||||||
|
|
||||||
|
public void show(String titleText, String text){
|
||||||
|
title.setText(titleText);
|
||||||
|
cont.clear();
|
||||||
|
cont.add(text).grow().wrap().labelAlign(Align.center);
|
||||||
|
|
||||||
|
super.show();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -32,6 +32,12 @@ public class PausedDialog extends BaseDialog{
|
|||||||
float dw = 220f;
|
float dw = 220f;
|
||||||
cont.defaults().width(dw).height(55).pad(5f);
|
cont.defaults().width(dw).height(55).pad(5f);
|
||||||
|
|
||||||
|
cont.button("@objective", Icon.info, () -> {
|
||||||
|
//TODO pause game, better dialog.
|
||||||
|
ui.fullText.show("@objective", state.rules.sector.preset.description);
|
||||||
|
}).padTop(-60f).colspan(2)
|
||||||
|
.visible(() -> state.rules.sector != null && state.rules.sector.preset != null && state.rules.sector.preset.description != null).row();
|
||||||
|
|
||||||
cont.button("@back", Icon.left, this::hide).name("back");
|
cont.button("@back", Icon.left, this::hide).name("back");
|
||||||
cont.button("@settings", Icon.settings, ui.settings::show).name("settings");
|
cont.button("@settings", Icon.settings, ui.settings::show).name("settings");
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user