More tutorial info

This commit is contained in:
Anuken
2019-09-29 21:51:45 -04:00
parent 002a052371
commit 73e9f55e55
5 changed files with 20 additions and 7 deletions

View File

@@ -946,11 +946,11 @@ unit.eradicator.name = Eradicator
unit.lich.name = Lich unit.lich.name = Lich
unit.reaper.name = Reaper unit.reaper.name = Reaper
tutorial.next = [lightgray]<Tap to continue> tutorial.next = [lightgray]<Tap to continue>
tutorial.intro = You have entered the[scarlet] Mindustry Tutorial.[]\nBegin by[accent] mining copper[]. Use [[WASD] to move, then tap a copper ore vein near your core to do this.\n\n[accent]{0}/{1} copper tutorial.intro = You have entered the[scarlet] Mindustry Tutorial.[]\nUse [[WASD] to move.\n[accent] Hold [[Ctrl] while scrolling[] to zoom in and out.\nBegin by[accent] mining copper[]. Move close to it, then tap a copper ore vein near your core to do this.\n\n[accent]{0}/{1} copper
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, and[accent] Hold Ctrl while scrolling[] to zoom in and out. 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.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.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]Place 2 conveyors with the line tool, then deliver an item into the core. 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.\nUse the scrollwheel to rotate blocks before placing them.\n[accent]Place 2 conveyors with the line tool, then deliver an item into the core.
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]Place 2 conveyors with the line tool, then deliver an item into the core. 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]Place 2 conveyors with the line tool, then deliver an item into the core.
tutorial.turret = Once an item enters your core, it can be used for building.\nKeep in mind that not all items can be used for building.\nItems that are not used for building, such as[accent] coal[] or[accent] scrap[], cannot be put into the core.\nDefensive structures must be built to repel the[lightgray] enemy[].\nBuild a[accent] duo turret[] near your base. tutorial.turret = Once an item enters your core, it can be used for building.\nKeep in mind that not all items can be used for building.\nItems that are not used for building, such as[accent] coal[] or[accent] scrap[], cannot be put into the core.\nDefensive 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 the turret.\nLead 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

View File

@@ -76,6 +76,7 @@ public class NetClient implements ApplicationListener{
ConnectPacket c = new ConnectPacket(); ConnectPacket c = new ConnectPacket();
c.name = player.name; c.name = player.name;
c.mods = mods.getModStrings();
c.mobile = mobile; c.mobile = mobile;
c.versionType = Version.type; c.versionType = Version.type;
c.color = Color.rgba8888(player.color); c.color = Color.rgba8888(player.color);

View File

@@ -216,6 +216,11 @@ public class Mods implements Loadable{
return loaded; return loaded;
} }
/** @return a list of mods and versions, in the format name:version. */
public Array<String> getModStrings(){
return loaded.select(l -> !l.meta.hidden).map(l -> l.name + ":" + l.meta.version);
}
/** Iterates through each mod with a main class.*/ /** Iterates through each mod with a main class.*/
public void each(Consumer<Mod> cons){ public void each(Consumer<Mod> cons){
loaded.each(p -> p.mod != null, p -> cons.accept(p.mod)); loaded.each(p -> p.mod != null, p -> cons.accept(p.mod));

View File

@@ -1,6 +1,7 @@
package io.anuke.mindustry.net; package io.anuke.mindustry.net;
import io.anuke.arc.Core; import io.anuke.arc.Core;
import io.anuke.arc.collection.*;
import io.anuke.arc.util.serialization.Base64Coder; import io.anuke.arc.util.serialization.Base64Coder;
import io.anuke.mindustry.game.Version; import io.anuke.mindustry.game.Version;
import io.anuke.mindustry.io.TypeIO; import io.anuke.mindustry.io.TypeIO;
@@ -65,7 +66,7 @@ public class Packets{
public static class ConnectPacket implements Packet{ public static class ConnectPacket implements Packet{
public int version; public int version;
public String versionType; public String versionType;
public String mods; public Array<String> mods = new Array<>();
public String name, uuid, usid; public String name, uuid, usid;
public boolean mobile; public boolean mobile;
public int color; public int color;
@@ -74,12 +75,15 @@ public class Packets{
public void write(ByteBuffer buffer){ public void write(ByteBuffer buffer){
buffer.putInt(Version.build); buffer.putInt(Version.build);
TypeIO.writeString(buffer, versionType); TypeIO.writeString(buffer, versionType);
TypeIO.writeString(buffer, mods);
TypeIO.writeString(buffer, name); TypeIO.writeString(buffer, name);
TypeIO.writeString(buffer, usid); TypeIO.writeString(buffer, usid);
buffer.put(mobile ? (byte)1 : 0); buffer.put(mobile ? (byte)1 : 0);
buffer.putInt(color); buffer.putInt(color);
buffer.put(Base64Coder.decode(uuid)); buffer.put(Base64Coder.decode(uuid));
buffer.putInt(mods.size);
for(int i = 0; i < mods.size; i++){
TypeIO.writeString(buffer, mods.get(i));
}
} }
@Override @Override
@@ -88,12 +92,15 @@ public class Packets{
versionType = TypeIO.readString(buffer); versionType = TypeIO.readString(buffer);
name = TypeIO.readString(buffer); name = TypeIO.readString(buffer);
usid = TypeIO.readString(buffer); usid = TypeIO.readString(buffer);
mods = TypeIO.readString(buffer);
mobile = buffer.get() == 1; mobile = buffer.get() == 1;
color = buffer.getInt(); color = buffer.getInt();
byte[] idbytes = new byte[8]; byte[] idbytes = new byte[8];
buffer.get(idbytes); buffer.get(idbytes);
uuid = new String(Base64Coder.encode(idbytes)); uuid = new String(Base64Coder.encode(idbytes));
int totalMods = buffer.getInt();
for(int i = 0; i < totalMods; i++){
mods.add(TypeIO.readString(buffer));
}
} }
} }

View File

@@ -1,3 +1,3 @@
org.gradle.daemon=true org.gradle.daemon=true
org.gradle.jvmargs=-Xms256m -Xmx1024m org.gradle.jvmargs=-Xms256m -Xmx1024m
archash=678237e0fd2a2e0c26de1ea562960d1effe5ab97 archash=840b75daba69d93a5c493e740a573463e03f9ada