From cf2ba356ae1832d1a04cbc79faea02f7b6d06ce1 Mon Sep 17 00:00:00 2001 From: TheRadioactiveBanana <89061718+TheRadioactiveBanana@users.noreply.github.com> Date: Thu, 1 Feb 2024 00:03:44 +0530 Subject: [PATCH 1/2] Moving server on to an edge node, deleting unused ips (#9505) Moving rapid on edge node for stability, deleting some ips that were mindlessly added and I dont plan on ever using --- servers_v7.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/servers_v7.json b/servers_v7.json index f7da7e20f1..b5b263f7a3 100644 --- a/servers_v7.json +++ b/servers_v7.json @@ -133,7 +133,7 @@ }, { "name": "Eradication Mindustry", - "address": ["140.238.246.78:7000", "140.238.246.78:7001", "140.238.246.78:7002", "140.238.246.78:7003", "140.238.246.78:7004", "140.238.246.78:7005", "130.61.22.183:7000", "130.61.22.183:7001", "130.61.22.183:7002", "130.61.22.183:7003", "130.61.22.183:7004", "130.61.22.183:7005", "77.99.254.211:7000", "77.99.254.211:7001", "77.99.254.211:7002", "141.148.196.135:7000"] + "address": ["140.238.246.78:7000", "140.238.246.78:7001", "140.238.246.78:7002", "140.238.246.78:7003", "140.238.246.78:7004", "130.61.22.183:7000", "130.61.22.183:7001", "130.61.22.183:7002", "130.61.22.183:7003", "130.61.22.183:7004", "77.99.254.211:7000", "77.99.254.211:7001", "77.99.254.211:7002", "141.148.196.135:7000", "130.61.220.99:7000", "130.61.220.99:7001"] }, { "name": "Conservatory", From 999a63c5f42c7acf4c8871749d1295ebcb21ed56 Mon Sep 17 00:00:00 2001 From: ApsZoldat <128713348+ApsZoldat@users.noreply.github.com> Date: Thu, 1 Feb 2024 00:12:49 +0300 Subject: [PATCH 2/2] Minor fixes (#9467) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Minor fixes * Change javadoc for statusSpeed() * πŸ§ πŸ”¨ --- core/assets/bundles/bundle.properties | 2 +- core/assets/bundles/bundle_ru.properties | 4 ++-- core/assets/contributors | 1 + .../mindustry/editor/MapLocalesDialog.java | 24 ++++++++++++------- .../mindustry/entities/comp/StatusComp.java | 4 ++-- 5 files changed, 22 insertions(+), 13 deletions(-) diff --git a/core/assets/bundles/bundle.properties b/core/assets/bundles/bundle.properties index b8a1089fe3..82ad500884 100644 --- a/core/assets/bundles/bundle.properties +++ b/core/assets/bundles/bundle.properties @@ -613,7 +613,7 @@ filter.option.threshold2 = Secondary Threshold filter.option.radius = Radius filter.option.percentile = Percentile -locales.info = Here, you can add locale bundles for specific languages to your map. In locale bundles, each property has a name and a value. These properties can be used by world processors and objectives using their names. They support text formatting (replacing placeholders with actual values).\n\n[cyan]Example property:\n[]name: [accent]timer[]\nvalue: [accent]Example timer, time left: @[]\n\n[cyan]Usage:\n[]Set it as objective's text: [accent]@timer\n\n[]Print it in a world processor:\n[accent]localeprint "timer"\nformat time\n[gray](where time is a separately calculated variable) +locales.info = Here, you can add locale bundles for specific languages to your map. In locale bundles, each property has a name and a value. These properties can be used by world processors and objectives using their names. They support text formatting (replacing placeholders with actual values).\n\n[cyan]Example property:\n[]name: [accent]timer[]\nvalue: [accent]Example timer, time left: {0}[]\n\n[cyan]Usage:\n[]Set it as objective's text: [accent]@timer\n\n[]Print it in a world processor:\n[accent]localeprint "timer"\nformat time\n[gray](where time is a separately calculated variable) locales.deletelocale = Are you sure you want to delete this locale bundle? locales.applytoall = Apply Changes To All Locales locales.addtoother = Add To Other Locales diff --git a/core/assets/bundles/bundle_ru.properties b/core/assets/bundles/bundle_ru.properties index 219d23880d..21cdbc14c2 100644 --- a/core/assets/bundles/bundle_ru.properties +++ b/core/assets/bundles/bundle_ru.properties @@ -1904,13 +1904,13 @@ onset.turrets = Π‘ΠΎΠ΅Π²Ρ‹Π΅ Π΅Π΄ΠΈΠ½ΠΈΡ†Ρ‹ эффСктивны, Π½ΠΎ [accent] onset.turretammo = Π‘Π½Π°Π±Π΄ΠΈΡ‚Π΅ Ρ‚ΡƒΡ€Π΅Π»ΡŒ [accent]Π±Π΅Ρ€ΠΈΠ»Π»ΠΈΠ΅Π²Ρ‹ΠΌΠΈ боСприпасами.[] onset.walls = [accent]Π‘Ρ‚Π΅Π½Ρ‹[] ΠΌΠΎΠ³ΡƒΡ‚ ΠΏΡ€Π΅Π΄ΠΎΡ‚Π²Ρ€Π°Ρ‚ΠΈΡ‚ΡŒ ΠΏΠΎΠ²Ρ€Π΅ΠΆΠ΄Π΅Π½ΠΈΠ΅ Π±Π»ΠΈΠ·Π»Π΅ΠΆΠ°Ρ‰ΠΈΡ… построСк.\nΠŸΠΎΡΡ‚Π°Π²ΡŒΡ‚Π΅ \uf6ee [accent]Π±Π΅Ρ€ΠΈΠ»Π»ΠΈΠ΅Π²Ρ‹Π΅ стСны[] Π²ΠΎΠΊΡ€ΡƒΠ³ Ρ‚ΡƒΡ€Π΅Π»ΠΈ. onset.enemies = Π’Ρ€Π°Π³ Π½Π° ΠΏΠΎΠ΄Ρ…ΠΎΠ΄Π΅, ΠΏΡ€ΠΈΠ³ΠΎΡ‚ΠΎΠ²ΡŒΡ‚Π΅ΡΡŒ Π·Π°Ρ‰ΠΈΡ‰Π°Ρ‚ΡŒΡΡ. -onset.defenses = [accent]Set up defenses:[lightgray] {0} +onset.defenses = [accent]ΠŸΡ€ΠΈΠ³ΠΎΡ‚ΠΎΠ²ΡŒΡ‚Π΅ ΠΎΠ±ΠΎΡ€ΠΎΠ½Ρƒ:[lightgray] {0} onset.attack = Π’Ρ€Π°Π³ уязвим. НачнитС ΠΊΠΎΠ½Ρ‚Ρ€Π°Ρ‚Π°ΠΊΡƒ. onset.cores = НовыС ядра ΠΌΠΎΠ³ΡƒΡ‚ Π±Ρ‹Ρ‚ΡŒ поставлСны Π½Π° [accent]Π·ΠΎΠ½Ρ‹ ядра[].\nНовыС ядра Ρ„ΡƒΠ½ΠΊΡ†ΠΈΠΎΠ½ΠΈΡ€ΡƒΡŽΡ‚ ΠΊΠ°ΠΊ ΠΏΠ΅Ρ€Π΅Π΄ΠΎΠ²Ρ‹Π΅ Π±Π°Π·Ρ‹ ΠΈ ΠΈΠΌΠ΅ΡŽΡ‚ ΠΎΠ±Ρ‰ΠΈΠΉ ΠΈΠ½Π²Π΅Π½Ρ‚Π°Ρ€ΡŒ ΠΌΠ΅ΠΆΠ΄Ρƒ Π΄Ρ€ΡƒΠ³ΠΈΠΌΠΈ ядрами.\nΠŸΠΎΡΡ‚Π°Π²ΡŒΡ‚Π΅ \uf725 ядро. onset.detect = Π’Ρ€Π°Π³ ΠΎΠ±Π½Π°Ρ€ΡƒΠΆΠΈΡ‚ вас Ρ‡Π΅Ρ€Π΅Π· 2 ΠΌΠΈΠ½ΡƒΡ‚Ρ‹.\nΠŸΡ€ΠΈΠ³ΠΎΡ‚ΠΎΠ²ΡŒΡ‚Π΅ ΠΎΠ±ΠΎΡ€ΠΎΠ½Ρƒ, Π΄ΠΎΠ±Ρ‹Ρ‡Ρƒ ΠΈ производство. onset.commandmode = Π£Π΄Π΅Ρ€ΠΆΠΈΠ²Π°ΠΉΡ‚Π΅ [accent]shift[], Ρ‡Ρ‚ΠΎΠ±Ρ‹ Π²ΠΎΠΉΡ‚ΠΈ Π² [accent]Ρ€Π΅ΠΆΠΈΠΌ командования[].\n[accent]Π©Π΅Π»ΠΊΠ½ΠΈΡ‚Π΅ Π»Π΅Π²ΠΎΠΉ ΠΊΠ½ΠΎΠΏΠΊΠΎΠΉ ΠΌΡ‹ΡˆΠΈ ΠΈ Π²Ρ‹Π΄Π΅Π»ΠΈΡ‚Π΅ ΠΎΠ±Π»Π°ΡΡ‚ΡŒ[] для Π²Ρ‹Π±ΠΎΡ€Π° Π±ΠΎΠ΅Π²Ρ‹Ρ… Π΅Π΄ΠΈΠ½ΠΈΡ†.\n[accent]Π©Π΅Π»ΠΊΠ½ΠΈΡ‚Π΅ ΠΏΡ€Π°Π²ΠΎΠΉ ΠΊΠ½ΠΎΠΏΠΊΠΎΠΉ ΠΌΡ‹ΡˆΠΈ[], Ρ‡Ρ‚ΠΎΠ±Ρ‹ ΠΏΡ€ΠΈΠΊΠ°Π·Π°Ρ‚ΡŒ Π²Ρ‹Π±Ρ€Π°Π½Π½Ρ‹ΠΌ Π΅Π΄ΠΈΠ½ΠΈΡ†Π°ΠΌ Π΄Π²ΠΈΠ³Π°Ρ‚ΡŒΡΡ ΠΈΠ»ΠΈ Π°Ρ‚Π°ΠΊΠΎΠ²Π°Ρ‚ΡŒ. onset.commandmode.mobile = НаТмитС [accent]ΠšΠΎΠΌΠ°Π½Π΄ΠΎΠ²Π°Ρ‚ΡŒ[], Ρ‡Ρ‚ΠΎΠ±Ρ‹ Π²ΠΎΠΉΡ‚ΠΈ Π² [accent]Ρ€Π΅ΠΆΠΈΠΌ командования[].\nΠ—Π°ΠΆΠΌΠΈΡ‚Π΅ ΠΏΠ°Π»Π΅Ρ†, Π·Π°Ρ‚Π΅ΠΌ [accent]Π²Ρ‹Π΄Π΅Π»ΠΈΡ‚Π΅ ΠΎΠ±Π»Π°ΡΡ‚ΡŒ[] для Π²Ρ‹Π±ΠΎΡ€Π° Π±ΠΎΠ΅Π²Ρ‹Ρ… Π΅Π΄ΠΈΠ½ΠΈΡ†.\n[accent]НаТмитС[], Ρ‡Ρ‚ΠΎΠ±Ρ‹ ΠΏΡ€ΠΈΠΊΠ°Π·Π°Ρ‚ΡŒ Π²Ρ‹Π±Ρ€Π°Π½Π½Ρ‹ΠΌ Π΅Π΄ΠΈΠ½ΠΈΡ†Π°ΠΌ Π΄Π²ΠΈΠ³Π°Ρ‚ΡŒΡΡ ΠΈΠ»ΠΈ Π°Ρ‚Π°ΠΊΠΎΠ²Π°Ρ‚ΡŒ. -aegis.tungsten = Tungsten can be mined using an [accent]impact drill[].\nThis structure requires [accent]water[] and [accent]power[]. +aegis.tungsten = Π’ΠΎΠ»ΡŒΡ„Ρ€Π°ΠΌ ΠΌΠΎΠΆΠ΅Ρ‚ Π±Ρ‹Ρ‚ΡŒ Π΄ΠΎΠ±Ρ‹Ρ‚ [accent]ΡƒΠ΄Π°Ρ€Π½ΠΎΠΉ Π΄Ρ€Π΅Π»ΡŒΡŽ[].\nΠ­Ρ‚Π° постройка Ρ‚Ρ€Π΅Π±ΡƒΠ΅Ρ‚ [accent]Π²ΠΎΠ΄Ρƒ[] ΠΈ [accent]ΡΠ½Π΅Ρ€Π³ΠΈΡŽ[]. split.pickup = НСкоторыС Π±Π»ΠΎΠΊΠΈ ΠΌΠΎΠΆΠ½ΠΎ ΠΏΠΎΠ΄ΠΎΠ±Ρ€Π°Ρ‚ΡŒ Π±ΠΎΠ΅Π²ΠΎΠΉ Π΅Π΄ΠΈΠ½ΠΈΡ†Π΅ΠΉ ядра.\nΠ’ΠΎΠ·ΡŒΠΌΠΈΡ‚Π΅ этот [accent]ΠΊΠΎΠ½Ρ‚Π΅ΠΉΠ½Π΅Ρ€[] ΠΈ ΠΏΠΎΡΡ‚Π°Π²ΡŒΡ‚Π΅ Π΅Π³ΠΎ Π½Π° [accent]Π³Ρ€ΡƒΠ·ΠΎΠ²ΠΎΠΉ Π·Π°Π³Ρ€ΡƒΠ·Ρ‡ΠΈΠΊ[].\n(Клавиши ΠΏΠΎ ΡƒΠΌΠΎΠ»Ρ‡Π°Π½ΠΈΡŽ - [ ΠΈ ] для поднятия ΠΈ Ρ€Π°Π·Π³Ρ€ΡƒΠ·ΠΊΠΈ) split.pickup.mobile = НСкоторыС Π±Π»ΠΎΠΊΠΈ ΠΌΠΎΠΆΠ½ΠΎ ΠΏΠΎΠ΄ΠΎΠ±Ρ€Π°Ρ‚ΡŒ Π±ΠΎΠ΅Π²ΠΎΠΉ Π΅Π΄ΠΈΠ½ΠΈΡ†Π΅ΠΉ ядра.\nΠ’ΠΎΠ·ΡŒΠΌΠΈΡ‚Π΅ этот [accent]ΠΊΠΎΠ½Ρ‚Π΅ΠΉΠ½Π΅Ρ€[] ΠΈ ΠΏΠΎΡΡ‚Π°Π²ΡŒΡ‚Π΅ Π΅Π³ΠΎ Π½Π° [accent]Π³Ρ€ΡƒΠ·ΠΎΠ²ΠΎΠΉ Π·Π°Π³Ρ€ΡƒΠ·Ρ‡ΠΈΠΊ[].\n(Π§Ρ‚ΠΎΠ±Ρ‹ ΠΏΠΎΠ΄Π½ΡΡ‚ΡŒ ΠΈΠ»ΠΈ Ρ€Π°Π·Π³Ρ€ΡƒΠ·ΠΈΡ‚ΡŒ Ρ‡Ρ‚ΠΎ-Π»ΠΈΠ±ΠΎ, ΡƒΠ΄Π΅Ρ€ΠΆΠΈΠ²Π°ΠΉΡ‚Π΅ ΠΏΠ°Π»Π΅Ρ†.) diff --git a/core/assets/contributors b/core/assets/contributors index b16023715e..3b3153b7ee 100644 --- a/core/assets/contributors +++ b/core/assets/contributors @@ -164,3 +164,4 @@ summoner OpalSoPL BalaM314 Redstonneur1256 +ApsZoldat diff --git a/core/src/mindustry/editor/MapLocalesDialog.java b/core/src/mindustry/editor/MapLocalesDialog.java index 0ac5a53d6d..17cc9f2764 100644 --- a/core/src/mindustry/editor/MapLocalesDialog.java +++ b/core/src/mindustry/editor/MapLocalesDialog.java @@ -91,6 +91,8 @@ public class MapLocalesDialog extends BaseDialog{ t.button("@edit", Icon.edit, this::editDialog).size(210f, 64f); }).growX(); + resized(this::buildMain); + buttons.button("?", () -> ui.showInfo("@locales.info")).size(60f, 64f).uniform(); shown(this::setup); @@ -158,7 +160,7 @@ public class MapLocalesDialog extends BaseDialog{ saved = false; buildMain(); - }).padTop(10f).size(400f, 50f).fillX().row(); + }).padTop(10f).size(cardWidth, 50f).fillX().row(); }).right(); } @@ -184,7 +186,7 @@ public class MapLocalesDialog extends BaseDialog{ selectedLocale = name; buildTables(); - }).update(b -> b.setChecked(selectedLocale.equals(name))).size(300f, 50f); + }).update(b -> b.setChecked(selectedLocale.equals(name))).width(200f).minHeight(50f); p.button(Icon.edit, Styles.flati, () -> localeEditDialog(name)).size(50f); p.button(Icon.trash, Styles.flati, () -> ui.showConfirm("@confirm", "@locales.deletelocale", () -> { locales.remove(name); @@ -196,7 +198,7 @@ public class MapLocalesDialog extends BaseDialog{ } } }).row(); - langs.button("@add", Icon.add, this::addLocaleDialog).padTop(10f).width(400f); + langs.button("@add", Icon.add, this::addLocaleDialog).padTop(10f).width(250f); } private void buildMain(){ @@ -206,7 +208,7 @@ public class MapLocalesDialog extends BaseDialog{ main.image().color(Pal.gray).height(3f).growX().expandY().top().row(); main.pane(p -> { - int cols = Math.max(1, (Core.graphics.getWidth() - 630) / ((int)cardWidth + 10)); + int cols = Math.max(1, (int)((Core.graphics.getWidth() / Scl.scl() - 410f) / cardWidth) - 1); if(props.size == 0){ main.add("@empty").center().row(); return; @@ -512,7 +514,7 @@ public class MapLocalesDialog extends BaseDialog{ propView.image().color(Pal.gray).height(3f).fillX().top().row(); propView.pane(p -> { - int cols = (Core.graphics.getWidth() - 100) / ((int)cardWidth + 10); + int cols = Math.max(1, (int)((Core.graphics.getWidth() / Scl.scl() - 100f) / cardWidth)); if(cols == 0){ propView.add("@empty").center().row(); return; @@ -720,7 +722,9 @@ public class MapLocalesDialog extends BaseDialog{ if(!locales.containsKey(key)) return ""; for(var prop : locales.get(key).entries()){ - data.append(prop.key).append(" = ").append(prop.value).append("\n"); + // Convert \n in plain text to \\n, then convert newlines to \n + data.append(prop.key).append(" = ").append(prop.value + .replace("\\n", "\\\\n").replace("\n", "\\n")).append("\n"); } return data.toString(); @@ -738,7 +742,9 @@ public class MapLocalesDialog extends BaseDialog{ }else{ int sepIndex = line.indexOf(" = "); if(sepIndex != -1 && !currentLocale.isEmpty()){ - bundles.get(currentLocale).put(line.substring(0, sepIndex), line.substring(sepIndex + 3)); + // Convert \n in file to newlines in text, then revert newlines with escape characters + bundles.get(currentLocale).put(line.substring(0, sepIndex), line.substring(sepIndex + 3) + .replace("\\n", "\n").replace("\\\n", "\\n")); } } } @@ -752,7 +758,9 @@ public class MapLocalesDialog extends BaseDialog{ for(var line : data.split("\\r?\\n|\\r")){ int sepIndex = line.indexOf(" = "); if(sepIndex != -1){ - map.put(line.substring(0, sepIndex), line.substring(sepIndex + 3)); + // Convert \n in file to newlines in text, then revert newlines with escape characters + map.put(line.substring(0, sepIndex), line.substring(sepIndex + 3) + .replace("\\n", "\n").replace("\\\n", "\\n")); } } diff --git a/core/src/mindustry/entities/comp/StatusComp.java b/core/src/mindustry/entities/comp/StatusComp.java index 2df716253a..56b7559455 100644 --- a/core/src/mindustry/entities/comp/StatusComp.java +++ b/core/src/mindustry/entities/comp/StatusComp.java @@ -127,10 +127,10 @@ abstract class StatusComp implements Posc, Flyingc{ return entry; } - /** Uses a dynamic status effect to override speed. */ + /** Uses a dynamic status effect to override speed (in tiles/second). */ public void statusSpeed(float speed){ //type.speed should never be 0 - applyDynamicStatus().speedMultiplier = speed / type.speed; + applyDynamicStatus().speedMultiplier = speed / (type.speed * 60f / tilesize); } /** Uses a dynamic status effect to change damage. */