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