diff --git a/core/assets/bundles/bundle.properties b/core/assets/bundles/bundle.properties index 37df1c9623..1b5aec8b31 100644 --- a/core/assets/bundles/bundle.properties +++ b/core/assets/bundles/bundle.properties @@ -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. diff --git a/core/assets/maps/serpulo/hidden/20.msav b/core/assets/maps/serpulo/hidden/20.msav index cc7a36543b..983f181b0e 100644 Binary files a/core/assets/maps/serpulo/hidden/20.msav and b/core/assets/maps/serpulo/hidden/20.msav differ diff --git a/core/src/mindustry/editor/MapGenerateDialog.java b/core/src/mindustry/editor/MapGenerateDialog.java index 1527053bee..a90e5624da 100644 --- a/core/src/mindustry/editor/MapGenerateDialog.java +++ b/core/src/mindustry/editor/MapGenerateDialog.java @@ -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())); diff --git a/core/src/mindustry/editor/MapLocalesDialog.java b/core/src/mindustry/editor/MapLocalesDialog.java index 063a61bfc3..6f274cab61 100644 --- a/core/src/mindustry/editor/MapLocalesDialog.java +++ b/core/src/mindustry/editor/MapLocalesDialog.java @@ -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; diff --git a/core/src/mindustry/editor/MapObjectivesDialog.java b/core/src/mindustry/editor/MapObjectivesDialog.java index eb7a1a41b5..e915bb3810 100644 --- a/core/src/mindustry/editor/MapObjectivesDialog.java +++ b/core/src/mindustry/editor/MapObjectivesDialog.java @@ -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 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){ diff --git a/core/src/mindustry/editor/WaveInfoDialog.java b/core/src/mindustry/editor/WaveInfoDialog.java index fa8e6b4177..116f6a13c3 100644 --- a/core/src/mindustry/editor/WaveInfoDialog.java +++ b/core/src/mindustry/editor/WaveInfoDialog.java @@ -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(); diff --git a/core/src/mindustry/io/SaveVersion.java b/core/src/mindustry/io/SaveVersion.java index 777afe9080..4e7c59fadc 100644 --- a/core/src/mindustry/io/SaveVersion.java +++ b/core/src/mindustry/io/SaveVersion.java @@ -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(); diff --git a/core/src/mindustry/ui/dialogs/CustomRulesDialog.java b/core/src/mindustry/ui/dialogs/CustomRulesDialog.java index 9194e23da0..b307d01daf 100644 --- a/core/src/mindustry/ui/dialogs/CustomRulesDialog.java +++ b/core/src/mindustry/ui/dialogs/CustomRulesDialog.java @@ -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