mirror of
https://github.com/Anuken/Mindustry.git
synced 2026-10-02 03:00:29 +03:00
Bundle cleanup
This commit is contained in:
@@ -61,7 +61,7 @@ mods.browser.sortstars = Sort by stars
|
||||
export.file = Export File
|
||||
import.file = Import File
|
||||
copy.clipboard = Copy to Clipboard
|
||||
import.clipboard = Import from Clipboard
|
||||
import.clipboard = Load from Clipboard
|
||||
workshop.browse = Browse Workshop
|
||||
workshop.share = Share on Workshop
|
||||
|
||||
@@ -609,8 +609,6 @@ waves.max = max units
|
||||
waves.guardian = Guardian
|
||||
waves.preview = Preview
|
||||
waves.random = Random
|
||||
waves.copy = Copy to Clipboard
|
||||
waves.load = Load from Clipboard
|
||||
waves.invalid = Invalid waves in clipboard.
|
||||
waves.copied = Waves copied.
|
||||
waves.none = No enemies defined.\nNote that empty wave layouts will automatically be replaced with the default layout.
|
||||
|
||||
Binary file not shown.
@@ -91,12 +91,12 @@ public class MapGenerateDialog extends BaseDialog{
|
||||
p.table(Tex.button, in -> {
|
||||
in.defaults().size(280f, 60f).left();
|
||||
|
||||
in.button("@waves.copy", Icon.copy, style, () -> {
|
||||
in.button("@copy.clipboard", Icon.copy, style, () -> {
|
||||
dialog.hide();
|
||||
|
||||
Core.app.setClipboardText(JsonIO.write(filters));
|
||||
}).marginLeft(12f).row();
|
||||
in.button("@waves.load", Icon.download, style, () -> {
|
||||
in.button("@load.clipboard", Icon.download, style, () -> {
|
||||
dialog.hide();
|
||||
try{
|
||||
filters.set(JsonIO.read(Seq.class, Core.app.getClipboardText()));
|
||||
|
||||
@@ -430,12 +430,12 @@ public class MapLocalesDialog extends BaseDialog{
|
||||
p.table(Tex.button, t -> {
|
||||
t.defaults().size(350f, 60f).left();
|
||||
|
||||
t.button("@waves.copy", Icon.copy, Styles.flatt, () -> {
|
||||
t.button("@copy.clipboard", Icon.copy, Styles.flatt, () -> {
|
||||
Core.app.setClipboardText(writeLocale(locale));
|
||||
ui.showInfoFade("@copied");
|
||||
dialog.hide();
|
||||
}).marginLeft(12f).row();
|
||||
t.button("@waves.load", Icon.download, Styles.flatt, () -> {
|
||||
t.button("@load.clipboard", Icon.download, Styles.flatt, () -> {
|
||||
locales.put(locale, readLocale(Core.app.getClipboardText()));
|
||||
buildTables();
|
||||
saved = false;
|
||||
@@ -456,12 +456,12 @@ public class MapLocalesDialog extends BaseDialog{
|
||||
p.table(Tex.button, t -> {
|
||||
t.defaults().size(450f, 60f).left();
|
||||
|
||||
t.button("@waves.copy", Icon.copy, Styles.flatt, () -> {
|
||||
t.button("@copy.clipboard", Icon.copy, Styles.flatt, () -> {
|
||||
Core.app.setClipboardText(writeBundles());
|
||||
ui.showInfoFade("@copied");
|
||||
dialog.hide();
|
||||
}).marginLeft(12f).row();
|
||||
t.button("@waves.load", Icon.download, Styles.flatt, () -> {
|
||||
t.button("@load.clipboard", Icon.download, Styles.flatt, () -> {
|
||||
locales = readBundles(Core.app.getClipboardText());
|
||||
buildTables();
|
||||
saved = false;
|
||||
|
||||
@@ -414,7 +414,7 @@ public class MapObjectivesDialog extends BaseDialog{
|
||||
t.left();
|
||||
t.margin(10f);
|
||||
|
||||
if(name.length() > 0) t.add(name + ":").color(Pal.accent);
|
||||
if(name.length() > 0) t.add(name).color(Pal.accent);
|
||||
t.add().growX();
|
||||
|
||||
Cell<ImageButton> remove = null;
|
||||
@@ -494,13 +494,13 @@ public class MapObjectivesDialog extends BaseDialog{
|
||||
var style = Styles.cleart;
|
||||
t.defaults().size(280f, 64f).pad(2f);
|
||||
|
||||
t.button("@waves.copy", Icon.copy, style, () -> {
|
||||
t.button("@copy.clipboard", Icon.copy, style, () -> {
|
||||
ui.showInfoFade("@copied");
|
||||
Core.app.setClipboardText(JsonIO.write(new MapObjectives(canvas.objectives)));
|
||||
dialog.hide();
|
||||
}).disabled(b -> canvas.objectives.isEmpty()).marginLeft(12f).row();
|
||||
|
||||
t.button("@waves.load", Icon.download, style, () -> {
|
||||
t.button("@load.clipboard", Icon.download, style, () -> {
|
||||
try{
|
||||
rebuildObjectives(new Seq<>(JsonIO.read(MapObjectives.class, Core.app.getClipboardText()).all));
|
||||
}catch(Exception e){
|
||||
|
||||
@@ -57,13 +57,13 @@ public class WaveInfoDialog extends BaseDialog{
|
||||
var style = Styles.cleart;
|
||||
t.defaults().size(280f, 64f).pad(2f);
|
||||
|
||||
t.button("@waves.copy", Icon.copy, style, () -> {
|
||||
t.button("@copy.clipboard", Icon.copy, style, () -> {
|
||||
ui.showInfoFade("@waves.copied");
|
||||
Core.app.setClipboardText(maps.writeWaves(groups));
|
||||
dialog.hide();
|
||||
}).disabled(b -> groups == null || groups.isEmpty()).marginLeft(12f).row();
|
||||
|
||||
t.button("@waves.load", Icon.download, style, () -> {
|
||||
t.button("@load.clipboard", Icon.download, style, () -> {
|
||||
try{
|
||||
groups = maps.readWaves(Core.app.getClipboardText());
|
||||
buildGroups();
|
||||
|
||||
@@ -548,7 +548,7 @@ public abstract class SaveVersion extends SaveFileReader{
|
||||
|
||||
for(int i = 0; i < total; i++){
|
||||
byte typeId = stream.readByte();
|
||||
if(typeId < 0 || typeId >= DataAssetType.all.length) throw new IOException("Invalid asset type ID: " + typeId);
|
||||
if(typeId < 0 || typeId >= DataAssetType.all.length) throw new IOException("Invalid asset type ID: " + typeId + ". You are likely loading trying to load a save from a newer version of the game, possibly a beta.");
|
||||
|
||||
String path = stream.readUTF();
|
||||
boolean embedded = stream.readBoolean();
|
||||
|
||||
@@ -69,7 +69,7 @@ public class CustomRulesDialog extends BaseDialog{
|
||||
var style = Styles.cleart;
|
||||
t.defaults().size(280f, 64f).pad(2f);
|
||||
|
||||
t.button("@waves.copy", Icon.copy, style, () -> {
|
||||
t.button("@copy.clipboard", Icon.copy, style, () -> {
|
||||
ui.showInfoFade("@copied");
|
||||
|
||||
//hack: don't write the spawns, they just waste space
|
||||
@@ -80,7 +80,7 @@ public class CustomRulesDialog extends BaseDialog{
|
||||
dialog.hide();
|
||||
}).marginLeft(12f).row();
|
||||
|
||||
t.button("@waves.load", Icon.download, style, () -> {
|
||||
t.button("@load.clipboard", Icon.download, style, () -> {
|
||||
try{
|
||||
Rules newRules = JsonIO.read(Rules.class, Core.app.getClipboardText());
|
||||
//objectives and spawns are considered to be map-specific; don't use them
|
||||
|
||||
Reference in New Issue
Block a user