mirror of
https://github.com/Anuken/Mindustry.git
synced 2025-07-31 23:19:43 +07:00
Tutorial fixes
This commit is contained in:
@ -871,22 +871,23 @@ tutorial.intro = You have entered the[scarlet] Mindustry Tutorial.[]\nBegin by[a
|
||||
tutorial.drill = Mining manually is inefficient.\n[accent]Drills []can mine automatically.\nClick the drill tab in the bottom right.\nSelect the[accent] mechanical drill[]. Place it on a copper vein by clicking.\n[accent]Right-click[] to stop building.
|
||||
tutorial.drill.mobile = Mining manually is inefficient.\n[accent]Drills []can mine automatically.\nTap the drill tab in the bottom right.\nSelect the[accent] mechanical drill[].\nPlace it on a copper vein by tapping, then press the[accent] checkmark[] below to confirm your selection.\nPress the[accent] X button[] to cancel placement.
|
||||
tutorial.blockinfo = Each block has different stats. Each drill can only mine certain ores.\nTo check a block's info and stats,[accent] tap the "?" button while selecting it in the build menu.[]\n\n[accent]Access the Mechanical Drill's stats now.[]
|
||||
tutorial.conveyor = [accent]Conveyors[] are used to transport items to the core.\nMake a line of conveyors from the drill to the core.\n[accent]Hold down the mouse to place in a line.[]\nHold[accent] CTRL[] while selecting a line to place diagonally.\n\n[accent]{0}/{1} conveyors\n[accent]0/1 items delivered
|
||||
tutorial.conveyor.mobile = [accent]Conveyors[] are used to transport items to the core.\nMake a line of conveyors from the drill to the core.\n[accent] Place in a line by holding down your finger for a few seconds[] and dragging in a direction.\n\n[accent]{0}/{1} conveyors\n[accent]0/1 items delivered
|
||||
tutorial.conveyor = [accent]Conveyors[] are used to transport items to the core.\nMake a line of conveyors from the drill to the core.\n[accent]Hold down the mouse to place in a line.[]\nHold[accent] CTRL[] while selecting a line to place diagonally.\n\n[accent]{0}/{1} conveyors placed in line\n[accent]0/1 items delivered
|
||||
tutorial.conveyor.mobile = [accent]Conveyors[] are used to transport items to the core.\nMake a line of conveyors from the drill to the core.\n[accent] Place in a line by holding down your finger for a few seconds[] and dragging in a direction.\n\n[accent]{0}/{1} conveyors placed in line\n[accent]0/1 items delivered
|
||||
tutorial.turret = Defensive structures must be built to repel the[lightgray] enemy[].\nBuild a[accent] duo turret[] near your base.
|
||||
tutorial.drillturret = Duo turrets require[accent] copper ammo []to shoot.\nPlace a drill near to the turret\n Lead conveyors into the turret to supply it with copper.\n\n[accent]Ammo delivered: 0/1
|
||||
tutorial.drillturret = Duo turrets require[accent] copper ammo []to shoot.\nPlace a drill near the turret.\nLead conveyors into the turret to supply it with copper.\n\n[accent]Ammo delivered: 0/1
|
||||
tutorial.pause = During battle, you are able to[accent] pause the game.[]\nYou may queue buildings while paused.\n\n[accent]Press space to pause.
|
||||
tutorial.pause.mobile = During battle, you are able to[accent] pause the game.[]\nYou may queue buildings while paused.\n\n[accent]Press this button in the top left to pause.
|
||||
tutorial.unpause = Now press space again to unpause.
|
||||
tutorial.unpause.mobile = Now press it again to unpause.
|
||||
tutorial.breaking = Blocks frequently need to be destroyed.\n[accent]Hold down right-click[] to destroy all blocks in a selection.[]\n\n[accent]Destroy all the scrap blocks to the right of your core.
|
||||
tutorial.breaking.mobile = Blocks frequently need to be destroyed.\n[accent]Select deconstruction mode[], then tap a block to begin breaking it.\nDestroy an area by holding down your finger for a few seconds[] and dragging in a direction.\nPress the checkmark button to confirm breaking.\n\n[accent]Destroy all the scrap blocks to the right of your core.
|
||||
tutorial.withdraw = In some situations, taking items directly from blocks is necessary.\nTo do this, [accent]tap a block[] with items in it, then [accent]tap the item[] in the inventory. Multiple items can be withdrawn by [accent]tapping and holding[].\n\n[accent]Withdraw some copper from the core.[]
|
||||
tutorial.breaking = Blocks frequently need to be destroyed.\n[accent]Hold down right-click[] to destroy all blocks in a selection.[]\n\n[accent]Destroy all the scrap blocks to the left of your core using area selection.
|
||||
tutorial.breaking.mobile = Blocks frequently need to be destroyed.\n[accent]Select deconstruction mode[], then tap a block to begin breaking it.\nDestroy an area by holding down your finger for a few seconds[] and dragging in a direction.\nPress the checkmark button to confirm breaking.\n\n[accent]Destroy all the scrap blocks to the left of your core using area selection.
|
||||
tutorial.withdraw = In some situations, taking items directly from blocks is necessary.\nTo do this, [accent]tap a block[] with items in it, then [accent]tap the item[] in the inventory.\nMultiple items can be withdrawn by [accent]tapping and holding[].\n\n[accent]Withdraw some copper from the core.[]
|
||||
tutorial.deposit = Deposit items into blocks by dragging from your ship to the destination block.\n\n[accent]Deposit your copper back into the core.[]
|
||||
tutorial.waves = The[lightgray] enemy[] approaches.\n\nDefend the core for 2 waves.[accent] Click[] to shoot.\nBuild more turrets and drills. Mine more copper.
|
||||
tutorial.waves.mobile = The[lightgray] enemy[] approaches.\n\nDefend the core for 2 waves. Your ship will automatically fire at enemies.\nBuild more turrets and drills. Mine more copper.
|
||||
tutorial.launch = Once you reach a specific wave, you are able to[accent] launch the core[], leaving your defenses behind and[accent] obtaining all the resources in your core.[]\nThese resources can then be used to research new technology.\n\n[accent]Press the launch button.
|
||||
|
||||
|
||||
item.copper.description = The most basic structural material. Used extensively in all types of blocks.
|
||||
item.lead.description = A basic starter material. Used extensively in electronics and liquid transportation blocks.
|
||||
item.metaglass.description = A super-tough glass compound. Extensively used for liquid distribution and storage.
|
||||
|
@ -344,8 +344,8 @@ public class Control implements ApplicationListener{
|
||||
Platform.instance.updateRPC();
|
||||
|
||||
//play tutorial on stop
|
||||
if(!settings.getBool("tutorial", false)){
|
||||
Core.app.post(this::playTutorial);
|
||||
if(!settings.getBool("playedtutorial", false)){
|
||||
Core.app.post(() -> Core.app.post(this::playTutorial));
|
||||
}
|
||||
|
||||
//display UI scale changed dialog
|
||||
|
@ -1,15 +1,13 @@
|
||||
package io.anuke.mindustry.game;
|
||||
|
||||
import io.anuke.arc.Core;
|
||||
import io.anuke.arc.Events;
|
||||
import io.anuke.arc.*;
|
||||
import io.anuke.arc.collection.*;
|
||||
import io.anuke.mindustry.Vars;
|
||||
import io.anuke.mindustry.content.Items;
|
||||
import io.anuke.mindustry.game.EventType.UnlockEvent;
|
||||
import io.anuke.mindustry.*;
|
||||
import io.anuke.mindustry.content.*;
|
||||
import io.anuke.mindustry.game.EventType.*;
|
||||
import io.anuke.mindustry.type.*;
|
||||
|
||||
import static io.anuke.mindustry.Vars.content;
|
||||
import static io.anuke.mindustry.Vars.state;
|
||||
import static io.anuke.mindustry.Vars.*;
|
||||
|
||||
/** Stores player unlocks. Clientside only. */
|
||||
public class GlobalData{
|
||||
@ -40,7 +38,9 @@ public class GlobalData{
|
||||
}
|
||||
|
||||
public void addItem(Item item, int amount){
|
||||
unlockContent(item);
|
||||
if(amount > 0){
|
||||
unlockContent(item);
|
||||
}
|
||||
modified = true;
|
||||
items.getAndIncrement(item, 0, amount);
|
||||
state.stats.itemsDelivered.getAndIncrement(item, 0, amount);
|
||||
|
@ -20,7 +20,7 @@ import static io.anuke.mindustry.Vars.*;
|
||||
/** Handles tutorial state. */
|
||||
public class Tutorial{
|
||||
private static final int mineCopper = 18;
|
||||
private static final int blocksToBreak = 3, blockOffset = 5;
|
||||
private static final int blocksToBreak = 3, blockOffset = -6;
|
||||
|
||||
private ObjectSet<String> events = new ObjectSet<>();
|
||||
private ObjectIntMap<Block> blocksPlaced = new ObjectIntMap<>();
|
||||
@ -179,7 +179,7 @@ public class Tutorial{
|
||||
state.wave = 5;
|
||||
|
||||
//end tutorial, never show it again
|
||||
Core.settings.put("tutorial", true);
|
||||
Core.settings.put("playedtutorial", true);
|
||||
Core.settings.save();
|
||||
}
|
||||
|
||||
@ -230,7 +230,7 @@ public class Tutorial{
|
||||
Tile core = state.teams.get(defaultTeam).cores.first();
|
||||
for(int i = 0; i < blocksToBreak; i++){
|
||||
world.removeBlock(world.ltile(core.x + blockOffset, core.y + i));
|
||||
world.tile(core.x + blockOffset, core.y + i).setBlock(Blocks.scrapWall);
|
||||
world.tile(core.x + blockOffset, core.y + i).setBlock(Blocks.scrapWall, defaultTeam);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -457,7 +457,7 @@ public class MobileInput extends InputHandler implements GestureListener{
|
||||
selecting = hasRequest(cursor) && isPlacing() && mode == placing;
|
||||
|
||||
//call tap events
|
||||
if(pointer == 0 && !selecting && mode == none){
|
||||
if(pointer == 0 && !selecting){
|
||||
if(!tryTapPlayer(worldx, worldy) && Core.settings.getBool("keyboard")){
|
||||
//shoot on touch down when in keyboard mode
|
||||
player.isShooting = true;
|
||||
|
@ -90,7 +90,7 @@ public class PausedDialog extends FloatingDialog{
|
||||
void showQuitConfirm(){
|
||||
ui.showConfirm("$confirm", state.rules.tutorial ? "$quit.confirm.tutorial" : "$quit.confirm", () -> {
|
||||
if(state.rules.tutorial){
|
||||
Core.settings.put("tutorial", true);
|
||||
Core.settings.put("playedtutorial", true);
|
||||
Core.settings.save();
|
||||
}
|
||||
wasClient = Net.client();
|
||||
|
@ -141,40 +141,23 @@ public class SettingsMenuDialog extends SettingsDialog{
|
||||
game.pref(new Setting(){
|
||||
@Override
|
||||
public void add(SettingsTable table){
|
||||
table.addButton("$settings.cleardata", () -> {
|
||||
FloatingDialog dialog = new FloatingDialog("$settings.cleardata");
|
||||
dialog.setFillParent(false);
|
||||
dialog.cont.defaults().size(230f, 60f).pad(3);
|
||||
dialog.addCloseButton();
|
||||
dialog.cont.addButton("$settings.clearunlocks", () -> {
|
||||
ui.showConfirm("$confirm", "$settings.clear.confirm", () -> {
|
||||
data.reset();
|
||||
dialog.hide();
|
||||
});
|
||||
});
|
||||
dialog.cont.row();
|
||||
dialog.cont.addButton("$settings.clearall", () -> {
|
||||
ui.showConfirm("$confirm", "$settings.clearall.confirm", () -> {
|
||||
ObjectMap<String, Object> map = new ObjectMap<>();
|
||||
for(String value : Core.settings.keys()){
|
||||
if(value.contains("usid") || value.contains("uuid")){
|
||||
map.put(value, Core.settings.getString(value));
|
||||
}
|
||||
}
|
||||
Core.settings.clear();
|
||||
Core.settings.putAll(map);
|
||||
Core.settings.save();
|
||||
table.addButton("$settings.cleardata", () -> ui.showConfirm("$confirm", "$settings.clearall.confirm", () -> {
|
||||
ObjectMap<String, Object> map = new ObjectMap<>();
|
||||
for(String value : Core.settings.keys()){
|
||||
if(value.contains("usid") || value.contains("uuid")){
|
||||
map.put(value, Core.settings.getString(value));
|
||||
}
|
||||
}
|
||||
Core.settings.clear();
|
||||
Core.settings.putAll(map);
|
||||
Core.settings.save();
|
||||
|
||||
for(FileHandle file : dataDirectory.list()){
|
||||
file.deleteDirectory();
|
||||
}
|
||||
for(FileHandle file : dataDirectory.list()){
|
||||
file.deleteDirectory();
|
||||
}
|
||||
|
||||
Core.app.exit();
|
||||
});
|
||||
});
|
||||
dialog.cont.row();
|
||||
dialog.show();
|
||||
}).size(220f, 60f).pad(6).left();
|
||||
Core.app.exit();
|
||||
})).size(220f, 60f).pad(6).left();
|
||||
table.add();
|
||||
table.row();
|
||||
}
|
||||
|
@ -105,7 +105,7 @@ public class ZoneInfoDialog extends FloatingDialog{
|
||||
cont.row();
|
||||
cont.table(desc -> {
|
||||
desc.left().defaults().left().width(Core.graphics.isPortrait() ? 350f : 500f);
|
||||
desc.pane(t -> t.marginRight(12f).add(zone.description).wrap().growX()).fillX().maxHeight(mobile ? 240f : 400f).pad(2).padBottom(8f).get().setScrollingDisabled(true, false);
|
||||
desc.pane(t -> t.marginRight(12f).add(zone.description).wrap().growX()).fillX().maxHeight(mobile ? 300f : 450f).pad(2).padBottom(8f).get().setScrollingDisabled(true, false);
|
||||
desc.row();
|
||||
|
||||
desc.table(t -> {
|
||||
|
@ -419,7 +419,8 @@ public class HudFragment extends Fragment{
|
||||
/** Show unlock notification for a new recipe. */
|
||||
public void showUnlock(UnlockableContent content){
|
||||
//some content may not have icons... yet
|
||||
if(content.getContentIcon() == null || state.is(State.menu)) return;
|
||||
//also don't play in the tutorial to prevent confusion
|
||||
if(content.getContentIcon() == null || state.is(State.menu) || state.rules.tutorial) return;
|
||||
|
||||
Sounds.message.play();
|
||||
|
||||
|
Reference in New Issue
Block a user