Created tutorial branch
This commit is contained in:
@@ -7,6 +7,7 @@ import io.anuke.arc.input.*;
|
|||||||
import io.anuke.arc.scene.ui.*;
|
import io.anuke.arc.scene.ui.*;
|
||||||
import io.anuke.arc.scene.ui.layout.Unit;
|
import io.anuke.arc.scene.ui.layout.Unit;
|
||||||
import io.anuke.arc.util.*;
|
import io.anuke.arc.util.*;
|
||||||
|
import io.anuke.mindustry.content.*;
|
||||||
import io.anuke.mindustry.core.GameState.*;
|
import io.anuke.mindustry.core.GameState.*;
|
||||||
import io.anuke.mindustry.entities.*;
|
import io.anuke.mindustry.entities.*;
|
||||||
import io.anuke.mindustry.entities.type.*;
|
import io.anuke.mindustry.entities.type.*;
|
||||||
@@ -252,23 +253,15 @@ public class Control implements ApplicationListener{
|
|||||||
public void init(){
|
public void init(){
|
||||||
Platform.instance.updateRPC();
|
Platform.instance.updateRPC();
|
||||||
|
|
||||||
if(!Core.settings.getBool("4.0-warning-2", false)){
|
//play tutorial on stop
|
||||||
|
if(!settings.getBool("tutorial", false)){
|
||||||
Time.run(5f, () -> {
|
Core.app.post(() -> {
|
||||||
FloatingDialog dialog = new FloatingDialog("VERY IMPORTANT");
|
playZone(Zones.groundZero);
|
||||||
dialog.buttons.addButton("$ok", () -> {
|
state.rules.tutorial = true;
|
||||||
dialog.hide();
|
|
||||||
Core.settings.put("4.0-warning-2", true);
|
|
||||||
Core.settings.save();
|
|
||||||
}).size(100f, 60f);
|
|
||||||
dialog.cont.add("Reminder: The alpha version you are about to play is very unstable, and is [accent]not representative of the final v4 release.[]\n\n " +
|
|
||||||
"\nThere is currently[scarlet] no sound implemented[]; this is intentional.\n" +
|
|
||||||
"All current art and UI is unfinished, and will be changed before release. " +
|
|
||||||
"\n\n[accent]Saves may be corrupted without warning between updates.").wrap().width(400f);
|
|
||||||
dialog.show();
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//display UI scale changed dialog
|
||||||
if(Core.settings.getBool("uiscalechanged", false)){
|
if(Core.settings.getBool("uiscalechanged", false)){
|
||||||
FloatingDialog dialog = new FloatingDialog("$confirm");
|
FloatingDialog dialog = new FloatingDialog("$confirm");
|
||||||
|
|
||||||
|
|||||||
@@ -65,6 +65,8 @@ public class Rules{
|
|||||||
public boolean attackMode = false;
|
public boolean attackMode = false;
|
||||||
/** Whether this is the editor gamemode. */
|
/** Whether this is the editor gamemode. */
|
||||||
public boolean editor = false;
|
public boolean editor = false;
|
||||||
|
/** Whether the tutorial is enabled. False by default.*/
|
||||||
|
public boolean tutorial = false;
|
||||||
/** Starting items put in cores */
|
/** Starting items put in cores */
|
||||||
public Array<ItemStack> loadout = Array.with(ItemStack.with(Items.copper, 200));
|
public Array<ItemStack> loadout = Array.with(ItemStack.with(Items.copper, 200));
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user