From b8ab3fcc90324fb0770cf5db1c00b6fe71d67c27 Mon Sep 17 00:00:00 2001 From: Thomas Widyantoko <40286070+DaGamerFiles@users.noreply.github.com> Date: Sun, 21 Jan 2024 00:13:41 +0700 Subject: [PATCH 001/116] Indonesian localization for Steam game page (#9461) * Indonesian localization for Steam * id_ID Steam description fix left untouched as is from the main repo --- .../steam/indonesian/achievements.vdf | 183 ++++++++++++++++++ .../metadata/steam/indonesian/description.txt | 62 ++++++ .../steam/indonesian/short-description.txt | 1 + 3 files changed, 246 insertions(+) create mode 100644 fastlane/metadata/steam/indonesian/achievements.vdf create mode 100644 fastlane/metadata/steam/indonesian/description.txt create mode 100644 fastlane/metadata/steam/indonesian/short-description.txt diff --git a/fastlane/metadata/steam/indonesian/achievements.vdf b/fastlane/metadata/steam/indonesian/achievements.vdf new file mode 100644 index 0000000000..417527f198 --- /dev/null +++ b/fastlane/metadata/steam/indonesian/achievements.vdf @@ -0,0 +1,183 @@ +"lang" +{ + "Language" "indonesian" + "Tokens" + { + "NEW_ACHIEVEMENT_20_1_NAME" "Scrapper" + "NEW_ACHIEVEMENT_20_1_DESC" "Hancurkan 1000 unit musuh." + "NEW_ACHIEVEMENT_20_2_NAME" "Purge" + "NEW_ACHIEVEMENT_20_2_DESC" "Hancurkan 100.000 unit musuh." + "NEW_ACHIEVEMENT_20_5_NAME" "Endless Shipments" + "NEW_ACHIEVEMENT_20_5_DESC" "Luncurkan 100.000 item secara keseluruhan." + "NEW_ACHIEVEMENT_20_6_NAME" "Penakluk" + "NEW_ACHIEVEMENT_20_6_DESC" "Menangkan 10 pertandingan dalam mode penyerangan." + "NEW_ACHIEVEMENT_20_7_NAME" "Jawara" + "NEW_ACHIEVEMENT_20_7_DESC" "Menangkan 10 pertandingan PvP multipemain." + "NEW_ACHIEVEMENT_20_8_NAME" "Secepat Kilat" + "NEW_ACHIEVEMENT_20_8_DESC" "Hancurkan inti musuh pada zona penyerangan dalam 5 gelombang atau kurang." + "NEW_ACHIEVEMENT_20_9_NAME" "Hujan Inti" + "NEW_ACHIEVEMENT_20_9_DESC" "Luncurkan inti sebanyak 30 kali." + "NEW_ACHIEVEMENT_20_10_NAME" "Kegigihan" + "NEW_ACHIEVEMENT_20_10_DESC" "Bertahan hingga 100 gelombang." + "NEW_ACHIEVEMENT_20_12_NAME" "Periset" + "NEW_ACHIEVEMENT_20_12_DESC" "Buka semua riset yang ada." + "NEW_ACHIEVEMENT_20_14_NAME" "Overload" + "NEW_ACHIEVEMENT_20_14_DESC" "Tembak musuh yang basah dengan listrik." + "NEW_ACHIEVEMENT_20_15_NAME" "Deflection" + "NEW_ACHIEVEMENT_20_15_DESC" "Hancurkan unit dengan tembakan pantulannya sendiri." + "NEW_ACHIEVEMENT_20_17_NAME" "Kesalahan Besar" + "NEW_ACHIEVEMENT_20_17_DESC" "Buka riset Pengarah." + "NEW_ACHIEVEMENT_20_18_NAME" "Pencipta" + "NEW_ACHIEVEMENT_20_18_DESC" "Letakkan 10,000 blok." + "NEW_ACHIEVEMENT_20_19_NAME" "Raze" + "NEW_ACHIEVEMENT_20_19_DESC" "Hancurkan 1,000 blok musuh." + "NEW_ACHIEVEMENT_20_20_NAME" "A Spectacular Disaster" + "NEW_ACHIEVEMENT_20_20_DESC" "Biarkan Reaktor Thorium memanas lalu meledak." + "NEW_ACHIEVEMENT_20_21_NAME" "Mapper" + "NEW_ACHIEVEMENT_20_21_DESC" "Buat peta baru sebanyak 10 kali." + "NEW_ACHIEVEMENT_20_22_NAME" "Peramban" + "NEW_ACHIEVEMENT_20_22_DESC" "Unduh peta dari Workshop." + "NEW_ACHIEVEMENT_20_23_NAME" "Kreator" + "NEW_ACHIEVEMENT_20_23_DESC" "Publikasikan peta ke Workshop." + "NEW_ACHIEVEMENT_20_24_NAME" "Slayer" + "NEW_ACHIEVEMENT_20_24_DESC" "Kalahkan boss." + "NEW_ACHIEVEMENT_20_29_NAME" "Material II" + "NEW_ACHIEVEMENT_20_29_DESC" "Temukan Thorium." + "NEW_ACHIEVEMENT_20_31_NAME" "Material I" + "NEW_ACHIEVEMENT_20_31_DESC" "Temukan Titanium." + "NEW_ACHIEVEMENT_21_0_NAME" "Kamikaze" + "NEW_ACHIEVEMENT_21_0_DESC" "Isi penuh unit biasa dengan bahan yang mudah meledak lalu hancurkan unitnya." + "NEW_ACHIEVEMENT_21_1_NAME" "Sudah Waktunya" + "NEW_ACHIEVEMENT_21_1_DESC" "Bangun pabrik unit darat." + "NEW_ACHIEVEMENT_21_2_NAME" "Serangan Langsung" + "NEW_ACHIEVEMENT_21_2_DESC" "Issue the Attack command using the Command Center." + "NEW_ACHIEVEMENT_21_3_NAME" "Swarm" + "NEW_ACHIEVEMENT_21_3_DESC" "Miliki 100 unit aktif secara bersamaan." + "NEW_ACHIEVEMENT_21_4_NAME" "Flock" + "NEW_ACHIEVEMENT_21_4_DESC" "Miliki 10 Poly aktif secara bersamaan." + "NEW_ACHIEVEMENT_21_5_NAME" "Roboticist" + "NEW_ACHIEVEMENT_21_5_DESC" "Buat setiap tipe unit." + "NEW_ACHIEVEMENT_21_6_NAME" "Legions" + "NEW_ACHIEVEMENT_21_6_DESC" "Buat 1000 unit." + "NEW_ACHIEVEMENT_21_9_NAME" "Dengarkan Nasihat Dulu" + "NEW_ACHIEVEMENT_21_9_DESC" "Hancur di dalam zona pendaratan musuh." + "NEW_ACHIEVEMENT_21_10_NAME" "Percuma Ada Unit Laut Kalau Begitu" + "NEW_ACHIEVEMENT_21_10_DESC" "Tenggelam." + "NEW_ACHIEVEMENT_21_11_NAME" "Kolektor" + "NEW_ACHIEVEMENT_21_11_DESC" "Isi inti hingga kapasitas penuh dengan semua jenis material." + "NEW_ACHIEVEMENT_21_12_NAME" "Crowd" + "NEW_ACHIEVEMENT_21_12_DESC" "Host server dengan 10 pemain bergabung." + "NEW_ACHIEVEMENT_21_13_NAME" "Invulnerable" + "NEW_ACHIEVEMENT_21_13_DESC" "Bangun menara Meltdown, Spectre dan Foreshadow." + "NEW_ACHIEVEMENT_21_14_NAME" "Lepas Landas" + "NEW_ACHIEVEMENT_21_14_DESC" "Gunakan Launch Pad." + "NEW_ACHIEVEMENT_21_16_NAME" "Heresy" + "NEW_ACHIEVEMENT_21_16_DESC" "Bangun dua pengarah berdekatan satu sama lain." + "NEW_ACHIEVEMENT_21_17_NAME" "Lone Guardian" + "NEW_ACHIEVEMENT_21_17_DESC" "Bertahan sebanyak 10 gelombang pada zona apapun tanpa menaruh blok apapun." + "NEW_ACHIEVEMENT_21_18_NAME" "Incinerate" + "NEW_ACHIEVEMENT_21_18_DESC" "Gunakan Pyratit dalam menara apapun." + "NEW_ACHIEVEMENT_21_19_NAME" "Efisien" + "NEW_ACHIEVEMENT_21_19_DESC" "Dinginkan menara dengan air atau cairan dingin." + "NEW_ACHIEVEMENT_21_20_NAME" "Mode Klasik" + "NEW_ACHIEVEMENT_21_20_DESC" "Hidupkan pikselasi." + "NEW_ACHIEVEMENT_21_21_NAME" "Scholar" + "NEW_ACHIEVEMENT_21_21_DESC" "Buka Wiki dari dalam game." + "NEW_ACHIEVEMENT_21_22_NAME" "Head Start" + "NEW_ACHIEVEMENT_21_22_DESC" "Meluncur ke zona dengan membawa 10.000 atau lebih item." + "NEW_ACHIEVEMENT_21_23_NAME" "Penyalaan" + "NEW_ACHIEVEMENT_21_23_DESC" "Nyalakan sebuah Reaktor Benturan." + "NEW_ACHIEVEMENT_21_25_NAME" "The Spiral" + "NEW_ACHIEVEMENT_21_25_DESC" "Aku pusing tujuh keliling..." + "NEW_ACHIEVEMENT_21_26_NAME" "Escalation" + "NEW_ACHIEVEMENT_21_26_DESC" "Buat unit Tingkat 5." + "NEW_ACHIEVEMENT_21_27_NAME" "Arsitek" + "NEW_ACHIEVEMENT_21_27_DESC" "Buat 20 skematik." + "NEW_ACHIEVEMENT_21_28_NAME" "Dominasi Dunia" + "NEW_ACHIEVEMENT_21_28_DESC" "Taklukkan semua sektor di Serpulo." + "NEW_ACHIEVEMENT_21_29_NAME" "Lepas Landas" + "NEW_ACHIEVEMENT_21_29_DESC" "Angkut sebuah unit T5 dengan unit Oct." + "NEW_ACHIEVEMENT_21_30_NAME" "Wujud Tertinggi" + "NEW_ACHIEVEMENT_21_30_DESC" "Bergabunglah." + "NEW_ACHIEVEMENT_21_31_NAME" "Produksi I" + "NEW_ACHIEVEMENT_21_31_DESC" "Raih total produksi 5,000 item/menit dalam kampanye." + "NEW_ACHIEVEMENT_26_0_NAME" "Produksi II" + "NEW_ACHIEVEMENT_26_0_DESC" "Raih total produksi 50,000 item/menit dalam kampanye." + "NEW_ACHIEVEMENT_26_1_NAME" "Kemenangan Mutlak" + "NEW_ACHIEVEMENT_26_1_DESC" "Taklukkan suatu sektor saat bermain di sektor yang berbeda." + "NEW_ACHIEVEMENT_26_2_NAME" "Kerajaan Kecil" + "NEW_ACHIEVEMENT_26_2_DESC" "Kendalikan 10 sektor secara bersamaan." + "NEW_ACHIEVEMENT_26_3_NAME" "Desainer" + "NEW_ACHIEVEMENT_26_3_DESC" "Buat 500 skematik." + "NEW_ACHIEVEMENT_26_4_NAME" "Master of Distribution" + "NEW_ACHIEVEMENT_26_4_DESC" "Gunakan semua blok transportasi (dari satu planet) dalam peta yang sama." + "NEW_ACHIEVEMENT_26_5_NAME" "Percepatan" + "NEW_ACHIEVEMENT_26_5_DESC" "Bangun sebuah Proyektor Pemercepat." + "NEW_ACHIEVEMENT_26_6_NAME" "Penyembuhan" + "NEW_ACHIEVEMENT_26_6_DESC" "Bangun sebuah Proyektor Penyembuh." + "NEW_ACHIEVEMENT_26_7_NAME" "Tidak Efisien" + "NEW_ACHIEVEMENT_26_7_DESC" "Bangun sebuah Pengekstrak Air di air, yang seharusnya menggunakan pompa." + "NEW_ACHIEVEMENT_26_8_NAME" "Stockpile" + "NEW_ACHIEVEMENT_26_8_DESC" "Kumpulkan 10 juta item dalam kampanye." + "NEW_ACHIEVEMENT_26_9_NAME" "Against All Odds" + "NEW_ACHIEVEMENT_26_9_DESC" "Hancurkan unit Eclipse yang diakhiri tembakan oleh menara Duo." + "NEW_ACHIEVEMENT_26_10_NAME" "Erekir Completion" + "NEW_ACHIEVEMENT_26_10_DESC" "Taklukkan sektor terakhir di Erekir." + "NEW_ACHIEVEMENT_26_11_NAME" "Serpulo Completion" + "NEW_ACHIEVEMENT_26_11_DESC" "Taklukkan sektor terakhir di Serpulo." + "NEW_ACHIEVEMENT_26_12_NAME" "Loadout" + "NEW_ACHIEVEMENT_26_12_DESC" "Luncurkan dengan skema inti kustom di planet Serpulo." + "NEW_ACHIEVEMENT_26_13_NAME" "Overprepared" + "NEW_ACHIEVEMENT_26_13_DESC" "Tingkatkan inti pada Ground Zero menjadi Nukleus." + "NEW_ACHIEVEMENT_26_14_NAME" "Outbreak" + "NEW_ACHIEVEMENT_26_14_DESC" "Biarkan neoplasma menyebar ke blok yang mengisi cairan." + "NEW_ACHIEVEMENT_26_15_NAME" "Brittle" + "NEW_ACHIEVEMENT_26_15_DESC" "Berikan kerusakan ledakan tambahan pada unit yang terkena status efek Membeku." + "NEW_ACHIEVEMENT_26_16_NAME" "Serpulo Structure Mastery" + "NEW_ACHIEVEMENT_26_16_DESC" "Bangun semua blok yang tersedia di Serpulo." + "NEW_ACHIEVEMENT_26_17_NAME" "Erekir Structure Mastery" + "NEW_ACHIEVEMENT_26_17_DESC" "Bangun semua blok yang tersedia di Erekir." + "NEW_ACHIEVEMENT_26_18_NAME" "Shields Down" + "NEW_ACHIEVEMENT_26_18_DESC" "Hancurkan an enemy Force Projector's shield." + "NEW_ACHIEVEMENT_26_19_NAME" "Di Mana Buku Petunjuknya?" + "NEW_ACHIEVEMENT_26_19_DESC" "Buka riset mikro-prosesor." + "NEW_ACHIEVEMENT_26_20_NAME" "Pemadaman" + "NEW_ACHIEVEMENT_26_20_DESC" "Capai -10rb/dtk pasokan tenaga dalam jaringan." + "NEW_ACHIEVEMENT_26_21_NAME" "Power Surge" + "NEW_ACHIEVEMENT_26_21_DESC" "Capai hingga 100rb/dtk tenaga." + "NEW_ACHIEVEMENT_26_22_NAME" "Tegangan Tinggi" + "NEW_ACHIEVEMENT_26_22_DESC" "Miliki 1 juta tenaga stored in batteries in a network." + "NEW_ACHIEVEMENT_26_23_NAME" "Ide Buruk" + "NEW_ACHIEVEMENT_26_23_DESC" "Masukan senyawa peledak dalam generator pembakar." + "NEW_ACHIEVEMENT_26_24_NAME" "Kontaminasi" + "NEW_ACHIEVEMENT_26_24_DESC" "Jadilah saksi meledaknya Reaktor Neoplasia yang disebabkan oleh penumpukan neoplasma." + "NEW_ACHIEVEMENT_26_25_NAME" "Termodifikasi" + "NEW_ACHIEVEMENT_26_25_DESC" "Pasang sebuah mod." + "NEW_ACHIEVEMENT_26_26_NAME" "pengarah" + "NEW_ACHIEVEMENT_26_26_DESC" "pengarah" + "NEW_ACHIEVEMENT_26_27_NAME" "Pengalaman Penuh" + "NEW_ACHIEVEMENT_26_27_DESC" "Masuk dalam peladen komunitas." + "NEW_ACHIEVEMENT_26_28_NAME" "Peretas" + "NEW_ACHIEVEMENT_26_28_DESC" "Buka terminal untuk skripting." + "NEW_ACHIEVEMENT_26_29_NAME" "Kendali Langsung" + "NEW_ACHIEVEMENT_26_29_DESC" "Perintahkan menara secara manual." + "NEW_ACHIEVEMENT_26_30_NAME" "Behind Enemy Lines" + "NEW_ACHIEVEMENT_26_30_DESC" "Jatuhkan unit dalam zona inti anti-membangun musuh." + "NEW_ACHIEVEMENT_26_31_NAME" "Vengeance" + "NEW_ACHIEVEMENT_26_31_DESC" "Hancurkan menara scatter dengan unit flare." + "NEW_ACHIEVEMENT_29_0_NAME" "Mengudara" + "NEW_ACHIEVEMENT_29_0_DESC" "Gunakan fungsi boost pada unit darat." + "NEW_ACHIEVEMENT_29_1_NAME" "Amphibi" + "NEW_ACHIEVEMENT_29_1_DESC" "Gunakan unit Elude untuk menyebrangi cairan." + "NEW_ACHIEVEMENT_29_2_NAME" "Ubin Pemercepat" + "NEW_ACHIEVEMENT_29_2_DESC" "Naikkan efisiensi bangunan dengan menempatkannya di ubin tertentu." + "NEW_ACHIEVEMENT_29_3_NAME" "Bersih-bersih" + "NEW_ACHIEVEMENT_29_3_DESC" "Hancurkan 100 bebatuan kecil." + "NEW_ACHIEVEMENT_29_4_NAME" "The Global Sweep" + "NEW_ACHIEVEMENT_29_4_DESC" "Hancurkan 10,000 bebatuan kecil." + "NEW_ACHIEVEMENT_29_5_NAME" "Ternetralisasi" + "NEW_ACHIEVEMENT_29_5_DESC" "Gunakan menara Shockwave Tower to absorb incoming bullets." + "NEW_ACHIEVEMENT_29_6_NAME" "Sayangnya," + "NEW_ACHIEVEMENT_29_6_DESC" "Gunakan emoji :alphachan: dalam obrolan multipemain. Mau apa nggak, terserahlah." + } +} \ No newline at end of file diff --git a/fastlane/metadata/steam/indonesian/description.txt b/fastlane/metadata/steam/indonesian/description.txt new file mode 100644 index 0000000000..c0e9b8c134 --- /dev/null +++ b/fastlane/metadata/steam/indonesian/description.txt @@ -0,0 +1,62 @@ +Mindustry is a factory-building game with tower defense and RTS elements. Create elaborate supply chains to feed ammo into your turrets, produce materials to use for building, and construct units. Command units to capture enemy bases, and expand your production. Defend your core from waves of enemies. + +Play through the campaign alone or with with your friends in cross-platform multiplayer co-op and challenge them in team-based PvP matches. + +[img]{STEAM_APP_IMAGE}/extras/factory.gif[/img] + +[h2]Factory Building[/h2] + +[list] +[*] Create elaborate supply chains of conveyor belts to feed ammo into your turrets and produce materials to use for building +[*] Use production blocks to create a wide variety of advanced materials +[*] Distribute liquids and fight constant challenges, like outbreaks of fire or enemy flier raids +[*] Get the most out of your production by supplying optional coolant and lubricant +[*] Produce a wide variety of units for automatic management of your base or assault on enemy bases +[/list] + +[h2]Tower Defense[/h2] + +[list] +[*] Defend your structures from waves of enemies +[*] Strategically place your turrets to destroy them before they reach your core +[*] Supply your turrets with ammo, coolant, and power +[*] Bolster your defenses with powered shields, regeneration projectors and other support buildings +[/list] + +[img]{STEAM_APP_IMAGE}/extras/rts3.png[/img] + +[h2]Real Time Strategy[/h2] + +[list] +[*] Set up assembly lines to construct armies of mechanized units +[*] Use your units to square up against fully functional enemy bases +[*] Capture more territory to place down more cores and get access to additional resources for expansion +[/list] + +[h2]Campaign[/h2] + +[list] +[*] Play through two separate planetary campaigns +[*] Conquer the planet Serpulo and Erekir as you advance through 35 hand-made maps and 250+ procedurally generated sectors +[*] Capture territory and set up factories to produce resources while you play other sectors +[*] Defend your sectors from periodic invasions +[*] Coordinate resource distribution between sectors via launch pads +[*] Research new blocks to fuel progress +[*] Invite your friends to complete missions together +[*] 250+ technology blocks to master +[*] 50+ different types of drones, mechs and ships +[*] 80+ achievements to complete +[/list] + +[h2]Community and Modding[/h2] + +[list] +[*] Use the steam workshop to browse community-made maps and schematics +[*] Join public community servers to play with others across platforms +[*] Play co-op, PvP or sandbox +[*] Community servers support plugins for custom maps and gamemodes +[*] Create your public dedicated server, or invite friends to your own private session +[*] Customizable game rules: Change block costs, enemy stats, starting items, wave timing and more +[*] Built-in map editor lets you make your own maps to play and share with the community +[*] Browse community-made mods to add or remix even more content +[/list] diff --git a/fastlane/metadata/steam/indonesian/short-description.txt b/fastlane/metadata/steam/indonesian/short-description.txt new file mode 100644 index 0000000000..85f1f7ca20 --- /dev/null +++ b/fastlane/metadata/steam/indonesian/short-description.txt @@ -0,0 +1 @@ +Sebuah game manajemen industri terbuka dengan elemen RTS dan pertahanan menara. \ No newline at end of file From 7d8aea77d83a6463bb750962471983a1996e8ff7 Mon Sep 17 00:00:00 2001 From: Anuken Date: Sat, 20 Jan 2024 20:45:15 -0500 Subject: [PATCH 002/116] Added hidden rule for environment deconstruction / Increased impact reactor liquid capacity --- core/src/mindustry/content/Blocks.java | 1 + core/src/mindustry/game/Rules.java | 2 ++ core/src/mindustry/world/Build.java | 4 ++-- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/core/src/mindustry/content/Blocks.java b/core/src/mindustry/content/Blocks.java index 1275b3b169..c86f3ffe56 100644 --- a/core/src/mindustry/content/Blocks.java +++ b/core/src/mindustry/content/Blocks.java @@ -2433,6 +2433,7 @@ public class Blocks{ itemDuration = 140f; ambientSound = Sounds.pulse; ambientSoundVolume = 0.07f; + liquidCapacity = 60f; consumePower(25f); consumeItem(Items.blastCompound); diff --git a/core/src/mindustry/game/Rules.java b/core/src/mindustry/game/Rules.java index aea4dde5c5..16a09e8990 100644 --- a/core/src/mindustry/game/Rules.java +++ b/core/src/mindustry/game/Rules.java @@ -105,6 +105,8 @@ public class Rules{ public boolean coreDestroyClear = false; /** If true, banned blocks are hidden from the build menu. */ public boolean hideBannedBlocks = false; + /** If true, most blocks (including environmental walls) can be deconstructed. This is only meant to be used internally in sandbox/test maps. */ + public boolean allowEnvironmentDeconstruct = false; /** If true, bannedBlocks becomes a whitelist. */ public boolean blockWhitelist = false; /** If true, bannedUnits becomes a whitelist. */ diff --git a/core/src/mindustry/world/Build.java b/core/src/mindustry/world/Build.java index 4377eb521a..42c37c3bcf 100644 --- a/core/src/mindustry/world/Build.java +++ b/core/src/mindustry/world/Build.java @@ -281,9 +281,9 @@ public class Build{ return false; } - /** Returns whether the tile at this position is breakable by this team */ + /** @return whether the tile at this position is breakable by this team */ public static boolean validBreak(Team team, int x, int y){ Tile tile = world.tile(x, y); - return tile != null && tile.block().canBreak(tile) && tile.breakable() && tile.interactable(team); + return tile != null && tile.block() != Blocks.air && (tile.block().canBreak(tile) && (tile.breakable() || state.rules.allowEnvironmentDeconstruct)) && tile.interactable(team); } } From 75a06eaea133ec56767f1fc68fd7b36846d9d79a Mon Sep 17 00:00:00 2001 From: abcxyzDustry <138785336+abcxyzDustry@users.noreply.github.com> Date: Sun, 21 Jan 2024 22:35:14 +0700 Subject: [PATCH 003/116] Update servers_v7.json (#9481) --- servers_v7.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/servers_v7.json b/servers_v7.json index d9687a6c19..d695b1aae7 100644 --- a/servers_v7.json +++ b/servers_v7.json @@ -230,7 +230,7 @@ }, { "name": "ABCXYZ Community", - "address": ["23.88.73.88:23591", "23.88.73.88:23539", "144.76.57.59:14996", "144.76.57.59:16881", "144.76.57.59:13885", "23.88.73.88:32113", "144.76.57.59:9269", "144.76.57.59:24235", "144.76.57.59:24133", "140.238.246.78:7000", "5.9.8.124:28848"] + "address": ["23.88.73.88:23591", "23.88.73.88:23539", "144.76.57.59:14996", "144.76.57.59:16881", "144.76.57.59:13885", "23.88.73.88:32113", "144.76.57.59:9269", "144.76.57.59:24235", "144.76.57.59:24133", "140.238.246.78:7000", "5.9.8.124:28848", "free2.titaniumhost.tech:25669"] }, { "name": "CroCraft Network", From 282946c5d83bfc56bba4eafde4fe353a22718b55 Mon Sep 17 00:00:00 2001 From: meiqiu <119494143+MEIQIUawa@users.noreply.github.com> Date: Sun, 21 Jan 2024 23:35:25 +0800 Subject: [PATCH 004/116] Update servers_v7.json (#9480) --- servers_v7.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/servers_v7.json b/servers_v7.json index d695b1aae7..e15ddcd420 100644 --- a/servers_v7.json +++ b/servers_v7.json @@ -9,7 +9,7 @@ }, { "name": "meiqiuMDT", - "address": ["cn1.meiqiumdy.top:7000","cn1.meiqiumdt.top:7002","cn1.meiqiumdt.top:7006","bj-1.lcf.icu:10240"] + "address": ["cn1.meiqiumdy.top:7000","cn1.meiqiumdt.top:7002","cn1.meiqiumdt.top:7006","cn1.meiqiumdt.top:7013"] }, { "name": "Crux's Revelations", From 4bf140c5166b76f91252f53d6903ff4a6a6ace11 Mon Sep 17 00:00:00 2001 From: Poli23 <126602903+Poli23@users.noreply.github.com> Date: Sun, 21 Jan 2024 20:20:14 +0200 Subject: [PATCH 005/116] Update servers_v7.json (#9482) I am the owner of the MineCore server, I ask you to update the list of servers and add new MineCore servers. --- servers_v7.json | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/servers_v7.json b/servers_v7.json index e15ddcd420..9700334f24 100644 --- a/servers_v7.json +++ b/servers_v7.json @@ -252,10 +252,6 @@ "name": "XuwenHost", "address": ["mdt.xuwenblock.cn:6568","mdt.xuwenblock.cn:6567","106.14.14.210"] }, - { - "name": "MineCore", - "address": ["194.247.42.11:27792"] - }, { "name": "Atomic", "address": ["atomic-de.ddns.net:35199", "atomic-de.ddns.net:35176", "atomic-de.ddns.net:35845", "atomic-de.ddns.net:35313"] @@ -279,5 +275,9 @@ { "name": "Erepulo", "address": ["95.84.198.97:5401", "95.84.198.97:5402", "95.84.198.97:5403"] + }, + { + "name": "MineCore", + "address": ["194.247.42.11:27792", "194.247.42.11:27977", "194.247.42.61:27989", "194.247.42.181:28514"] } ] From 41f448af2cacc00697cb4fae4a14c2855dbce79a Mon Sep 17 00:00:00 2001 From: Anuken Date: Sun, 21 Jan 2024 19:12:39 -0500 Subject: [PATCH 006/116] Don't create outlines in units if they already exist --- core/src/mindustry/type/UnitType.java | 2 +- gradle.properties | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/core/src/mindustry/type/UnitType.java b/core/src/mindustry/type/UnitType.java index d49e2e7a21..b5855f69b5 100644 --- a/core/src/mindustry/type/UnitType.java +++ b/core/src/mindustry/type/UnitType.java @@ -960,7 +960,7 @@ public class UnitType extends UnlockableContent implements Senseable{ getRegionsToOutline(toOutline); for(var region : toOutline){ - if(region instanceof AtlasRegion atlas){ + if(region instanceof AtlasRegion atlas && !Core.atlas.has(atlas.name + "-outline")){ String regionName = atlas.name; Pixmap outlined = Pixmaps.outline(Core.atlas.getPixmap(region), outlineColor, outlineRadius); diff --git a/gradle.properties b/gradle.properties index b18f49c047..e69588eb44 100644 --- a/gradle.properties +++ b/gradle.properties @@ -25,4 +25,4 @@ org.gradle.caching=true #used for slow jitpack builds; TODO see if this actually works org.gradle.internal.http.socketTimeout=100000 org.gradle.internal.http.connectionTimeout=100000 -archash=8fdcdbfccc +archash=137d14855f From e9d95c2c2e55d239aeae6722d0b5c55c92bca058 Mon Sep 17 00:00:00 2001 From: Anuken Date: Sun, 21 Jan 2024 19:18:41 -0500 Subject: [PATCH 007/116] Switched sourceCompatibility to Java 17 --- build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.gradle b/build.gradle index 342a85c96c..d051101a24 100644 --- a/build.gradle +++ b/build.gradle @@ -185,7 +185,7 @@ allprojects{ tasks.withType(JavaCompile){ targetCompatibility = 8 - sourceCompatibility = JavaVersion.VERSION_16 + sourceCompatibility = JavaVersion.VERSION_17 options.encoding = "UTF-8" options.compilerArgs += ["-Xlint:deprecation"] dependsOn clearCache From 477645a211d6d1a9b47f5f20813139562cfd590d Mon Sep 17 00:00:00 2001 From: CommandLine <71168720+Def-Try@users.noreply.github.com> Date: Mon, 22 Jan 2024 20:38:33 +0700 Subject: [PATCH 008/116] Mindurka IP change (#9483) --- servers_v7.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/servers_v7.json b/servers_v7.json index 9700334f24..54ce1c7466 100644 --- a/servers_v7.json +++ b/servers_v7.json @@ -85,7 +85,7 @@ }, { "name": "MinDurka", - "address": ["95.181.151.210", "95.181.151.210:3001", "95.181.151.210:3002", "95.181.151.210:3003", "95.181.151.210:3004", "95.181.151.210:3005", "95.181.151.210:3006", "95.181.151.210:3007", "95.181.151.210:3008", "95.181.151.210:3009", "95.181.151.210:3010"] + "address": ["45.87.104.124", "45.87.104.124:3001", "45.87.104.124:3002", "45.87.104.124:3003", "45.87.104.124:3004", "45.87.104.124:3005", "45.87.104.124:3006", "45.87.104.124:3007", "45.87.104.124:3008", "45.87.104.124:3009", "45.87.104.124:3010"] }, { "name": "Chaotic Neutral", From 59ea35c44314952b57c89fe1db6a76325ad0f26c Mon Sep 17 00:00:00 2001 From: Anuken Date: Mon, 22 Jan 2024 16:14:14 -0500 Subject: [PATCH 009/116] Allow all floors to replace each other --- core/src/mindustry/world/Build.java | 4 ++-- core/src/mindustry/world/blocks/environment/Floor.java | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/core/src/mindustry/world/Build.java b/core/src/mindustry/world/Build.java index 42c37c3bcf..5ae2afb151 100644 --- a/core/src/mindustry/world/Build.java +++ b/core/src/mindustry/world/Build.java @@ -195,7 +195,7 @@ public class Build{ return false; } - if(!type.requiresWater && !contactsShallows(tile.x, tile.y, type) && !type.placeableLiquid){ + if(!type.requiresWater && !type.isFloor() && !contactsShallows(tile.x, tile.y, type) && !type.placeableLiquid){ return false; } @@ -223,7 +223,7 @@ public class Build{ (check.floor().isDeep() && !type.floating && !type.requiresWater && !type.placeableLiquid) || //deep water (type == check.block() && check.build != null && rotation == check.build.rotation && type.rotate && !((type == check.block && check.team() == Team.derelict))) || //same block, same rotation !check.interactable(team) || //cannot interact - !check.floor().placeableOn || //solid wall + (!check.floor().placeableOn && !type.isFloor()) || //solid floor (!checkVisible && !check.block().alwaysReplace) || //replacing a block that should be replaced (e.g. payload placement) !(((type.canReplace(check.block()) || (type == check.block && state.rules.derelictRepair && check.team() == Team.derelict)) || //can replace type OR can replace derelict block of same type (check.build instanceof ConstructBuild build && build.current == type && check.centerX() == tile.x && check.centerY() == tile.y)) && //same type in construction diff --git a/core/src/mindustry/world/blocks/environment/Floor.java b/core/src/mindustry/world/blocks/environment/Floor.java index dc056da237..26631119e8 100644 --- a/core/src/mindustry/world/blocks/environment/Floor.java +++ b/core/src/mindustry/world/blocks/environment/Floor.java @@ -83,13 +83,13 @@ public class Floor extends Block{ protected TextureRegion edgeRegion; public Floor(String name){ - super(name); - variants = 3; + this(name, 3); } public Floor(String name, int variants){ super(name); this.variants = variants; + placeableLiquid = true; } @Override From bd4ae0639d7d28ffea3dec3824494b7d9f841a56 Mon Sep 17 00:00:00 2001 From: Anuken Date: Mon, 22 Jan 2024 16:41:43 -0500 Subject: [PATCH 010/116] Added allowRectanglePlacement for 1x1 blocks --- core/src/mindustry/input/InputHandler.java | 4 +++- core/src/mindustry/input/Placement.java | 16 ++++++++++++++++ core/src/mindustry/world/Block.java | 4 ++++ core/src/mindustry/world/Build.java | 8 ++++++++ .../mindustry/world/blocks/ConstructBlock.java | 10 +++++----- .../world/blocks/environment/Floor.java | 2 ++ .../world/blocks/environment/StaticWall.java | 2 ++ 7 files changed, 40 insertions(+), 6 deletions(-) diff --git a/core/src/mindustry/input/InputHandler.java b/core/src/mindustry/input/InputHandler.java index 9472028766..3e17870597 100644 --- a/core/src/mindustry/input/InputHandler.java +++ b/core/src/mindustry/input/InputHandler.java @@ -1973,11 +1973,13 @@ public abstract class InputHandler implements InputProcessor, GestureListener{ var end = world.build(endX, endY); if(diagonal && (block == null || block.allowDiagonal)){ if(block != null && start instanceof ChainedBuilding && end instanceof ChainedBuilding - && block.canReplace(end.block) && block.canReplace(start.block)){ + && block.canReplace(end.block) && block.canReplace(start.block)){ points = Placement.upgradeLine(startX, startY, endX, endY); }else{ points = Placement.pathfindLine(block != null && block.conveyorPlacement, startX, startY, endX, endY); } + }else if(block != null && block.size == 1 && block.allowRectanglePlacement){ + points = Placement.normalizeRectangle(startX, startY, endX, endY, block.size); }else{ points = Placement.normalizeLine(startX, startY, endX, endY); } diff --git a/core/src/mindustry/input/Placement.java b/core/src/mindustry/input/Placement.java index 09935e4e5c..d6c8b4a7c4 100644 --- a/core/src/mindustry/input/Placement.java +++ b/core/src/mindustry/input/Placement.java @@ -58,6 +58,22 @@ public class Placement{ return points; } + /** Normalize two points into a rectangle. */ + public static Seq normalizeRectangle(int startX, int startY, int endX, int endY, int blockSize){ + Pools.freeAll(points); + points.clear(); + + int minX = Math.min(startX, endX), minY = Math.min(startY, endY), maxX = Math.max(startX, endX), maxY = Math.max(startY, endY); + + for(int y = minY; y <= maxY; y += blockSize){ + for(int x = minX; x <= maxX; x += blockSize){ + points.add(Pools.obtain(Point2.class, Point2::new).set(x, y)); + } + } + + return points; + } + public static Seq upgradeLine(int startX, int startY, int endX, int endY){ closed.clear(); Pools.freeAll(points); diff --git a/core/src/mindustry/world/Block.java b/core/src/mindustry/world/Block.java index 60d6b63d19..cbbf969d1c 100644 --- a/core/src/mindustry/world/Block.java +++ b/core/src/mindustry/world/Block.java @@ -245,6 +245,8 @@ public class Block extends UnlockableContent implements Senseable{ public boolean allowDiagonal = true; /** Whether to swap the diagonal placement modes. */ public boolean swapDiagonalPlacement; + /** Whether to allow rectangular placement, as opposed to a line. Only supported for 1x1 blocks currently! */ + public boolean allowRectanglePlacement = false; /** Build queue priority in schematics. */ public int schematicPriority = 0; /** @@ -322,6 +324,8 @@ public class Block extends UnlockableContent implements Senseable{ public float deconstructThreshold = 0f; /** If true, this block deconstructs immediately. Instant deconstruction implies no resource refund. */ public boolean instantDeconstruct = false; + /** If true, this block constructs immediately. This implies no resource requirement, and ignores configs - do not use, this is for performance only! */ + public boolean instantBuild = false; /** Effect for placing the block. Passes size as rotation. */ public Effect placeEffect = Fx.placeBlock; /** Effect for breaking the block. Passes size as rotation. */ diff --git a/core/src/mindustry/world/Build.java b/core/src/mindustry/world/Build.java index 5ae2afb151..03a3db970b 100644 --- a/core/src/mindustry/world/Build.java +++ b/core/src/mindustry/world/Build.java @@ -122,6 +122,14 @@ public class Build{ } }); + //complete it immediately + if(result.instantBuild){ + Events.fire(new BlockBuildBeginEvent(tile, team, unit, false)); + result.placeBegan(tile, tile.block, unit); + ConstructBlock.constructFinish(tile, result, unit, (byte)rotation, team, null); + return; + } + Block previous = tile.block(); Block sub = ConstructBlock.get(result.size); var prevBuild = new Seq(9); diff --git a/core/src/mindustry/world/blocks/ConstructBlock.java b/core/src/mindustry/world/blocks/ConstructBlock.java index df459ae6d8..9e4ac3e719 100644 --- a/core/src/mindustry/world/blocks/ConstructBlock.java +++ b/core/src/mindustry/world/blocks/ConstructBlock.java @@ -83,7 +83,7 @@ public class ConstructBlock extends Block{ tile.setBlock(block, team, rotation); } - if(tile.build != null){ + if(tile.build != null && tile.build.block == block){ tile.build.health = block.health * healthf; if(config != null){ @@ -100,11 +100,11 @@ public class ConstructBlock extends Block{ //make sure block indexer knows it's damaged indexer.notifyHealthChanged(tile.build); - } - //last builder was this local client player, call placed() - if(tile.build != null && !headless && builder == player.unit()){ - tile.build.playerPlaced(config); + //last builder was this local client player, call placed() + if(!headless && builder == player.unit()){ + tile.build.playerPlaced(config); + } } if(fogControl.isVisibleTile(team, tile.x, tile.y)){ diff --git a/core/src/mindustry/world/blocks/environment/Floor.java b/core/src/mindustry/world/blocks/environment/Floor.java index 26631119e8..c1c839887b 100644 --- a/core/src/mindustry/world/blocks/environment/Floor.java +++ b/core/src/mindustry/world/blocks/environment/Floor.java @@ -90,6 +90,8 @@ public class Floor extends Block{ super(name); this.variants = variants; placeableLiquid = true; + allowRectanglePlacement = true; + instantBuild = true; } @Override diff --git a/core/src/mindustry/world/blocks/environment/StaticWall.java b/core/src/mindustry/world/blocks/environment/StaticWall.java index 464df26ec6..56fc569b24 100644 --- a/core/src/mindustry/world/blocks/environment/StaticWall.java +++ b/core/src/mindustry/world/blocks/environment/StaticWall.java @@ -20,6 +20,8 @@ public class StaticWall extends Prop{ solid = true; variants = 2; cacheLayer = CacheLayer.walls; + allowRectanglePlacement = true; + instantBuild = true; } @Override From 76e83c151690961109d36e401d813a635d505886 Mon Sep 17 00:00:00 2001 From: Anuken Date: Mon, 22 Jan 2024 22:12:24 -0500 Subject: [PATCH 011/116] Better allowRectanglePlacement --- core/src/mindustry/input/InputHandler.java | 2 +- core/src/mindustry/input/Placement.java | 6 +++--- core/src/mindustry/world/Block.java | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/core/src/mindustry/input/InputHandler.java b/core/src/mindustry/input/InputHandler.java index 3e17870597..c43c8e8fed 100644 --- a/core/src/mindustry/input/InputHandler.java +++ b/core/src/mindustry/input/InputHandler.java @@ -1978,7 +1978,7 @@ public abstract class InputHandler implements InputProcessor, GestureListener{ }else{ points = Placement.pathfindLine(block != null && block.conveyorPlacement, startX, startY, endX, endY); } - }else if(block != null && block.size == 1 && block.allowRectanglePlacement){ + }else if(block != null && block.allowRectanglePlacement){ points = Placement.normalizeRectangle(startX, startY, endX, endY, block.size); }else{ points = Placement.normalizeLine(startX, startY, endX, endY); diff --git a/core/src/mindustry/input/Placement.java b/core/src/mindustry/input/Placement.java index d6c8b4a7c4..abec7d9f65 100644 --- a/core/src/mindustry/input/Placement.java +++ b/core/src/mindustry/input/Placement.java @@ -65,9 +65,9 @@ public class Placement{ int minX = Math.min(startX, endX), minY = Math.min(startY, endY), maxX = Math.max(startX, endX), maxY = Math.max(startY, endY); - for(int y = minY; y <= maxY; y += blockSize){ - for(int x = minX; x <= maxX; x += blockSize){ - points.add(Pools.obtain(Point2.class, Point2::new).set(x, y)); + for(int y = 0; y <= maxY - minY; y += blockSize){ + for(int x = 0; x <= maxX - minX; x += blockSize){ + points.add(Pools.obtain(Point2.class, Point2::new).set(startX + x * Mathf.sign(endX - startX), startY + y * Mathf.sign(endY - startY))); } } diff --git a/core/src/mindustry/world/Block.java b/core/src/mindustry/world/Block.java index cbbf969d1c..31d98e1efc 100644 --- a/core/src/mindustry/world/Block.java +++ b/core/src/mindustry/world/Block.java @@ -245,7 +245,7 @@ public class Block extends UnlockableContent implements Senseable{ public boolean allowDiagonal = true; /** Whether to swap the diagonal placement modes. */ public boolean swapDiagonalPlacement; - /** Whether to allow rectangular placement, as opposed to a line. Only supported for 1x1 blocks currently! */ + /** Whether to allow rectangular placement, as opposed to a line. */ public boolean allowRectanglePlacement = false; /** Build queue priority in schematics. */ public int schematicPriority = 0; From 6f3e75569ca6c80568b079a2fa1e966c7944c291 Mon Sep 17 00:00:00 2001 From: Anuken Date: Tue, 23 Jan 2024 21:22:02 -0500 Subject: [PATCH 012/116] Added instantBuild rule for editor --- core/src/mindustry/entities/comp/BuilderComp.java | 4 ++-- core/src/mindustry/game/Gamemode.java | 1 + core/src/mindustry/game/Rules.java | 2 ++ core/src/mindustry/world/blocks/environment/Floor.java | 1 + 4 files changed, 6 insertions(+), 2 deletions(-) diff --git a/core/src/mindustry/entities/comp/BuilderComp.java b/core/src/mindustry/entities/comp/BuilderComp.java index 64a575bb16..332c7de701 100644 --- a/core/src/mindustry/entities/comp/BuilderComp.java +++ b/core/src/mindustry/entities/comp/BuilderComp.java @@ -100,9 +100,9 @@ abstract class BuilderComp implements Posc, Statusc, Teamc, Rotc{ buildCounter = Math.min(buildCounter, 10f); //random attempt to fix a freeze that only occurs on Android - int maxPerFrame = 10, count = 0; + int maxPerFrame = state.rules.instantBuild ? plans.size : 10, count = 0; - while(buildCounter >= 1 && count++ < maxPerFrame){ + while((buildCounter >= 1 || state.rules.instantBuild) && count++ < maxPerFrame){ buildCounter -= 1f; validatePlans(); diff --git a/core/src/mindustry/game/Gamemode.java b/core/src/mindustry/game/Gamemode.java index d48bc956fd..86e94966fa 100644 --- a/core/src/mindustry/game/Gamemode.java +++ b/core/src/mindustry/game/Gamemode.java @@ -35,6 +35,7 @@ public enum Gamemode{ }, map -> map.teams.size > 1), editor(true, rules -> { rules.infiniteResources = true; + rules.instantBuild = true; rules.editor = true; rules.waves = false; rules.waveTimer = false; diff --git a/core/src/mindustry/game/Rules.java b/core/src/mindustry/game/Rules.java index 16a09e8990..951426907d 100644 --- a/core/src/mindustry/game/Rules.java +++ b/core/src/mindustry/game/Rules.java @@ -107,6 +107,8 @@ public class Rules{ public boolean hideBannedBlocks = false; /** If true, most blocks (including environmental walls) can be deconstructed. This is only meant to be used internally in sandbox/test maps. */ public boolean allowEnvironmentDeconstruct = false; + /** If true, buildings will be constructed instantly, with no limit on blocks placed per second. This is highly experimental and may cause lag! */ + public boolean instantBuild = false; /** If true, bannedBlocks becomes a whitelist. */ public boolean blockWhitelist = false; /** If true, bannedUnits becomes a whitelist. */ diff --git a/core/src/mindustry/world/blocks/environment/Floor.java b/core/src/mindustry/world/blocks/environment/Floor.java index c1c839887b..db9ae24a3f 100644 --- a/core/src/mindustry/world/blocks/environment/Floor.java +++ b/core/src/mindustry/world/blocks/environment/Floor.java @@ -92,6 +92,7 @@ public class Floor extends Block{ placeableLiquid = true; allowRectanglePlacement = true; instantBuild = true; + placeEffect = Fx.rotateBlock; } @Override From b9bf4ee79405363cfee650b154889ace5bee0b5a Mon Sep 17 00:00:00 2001 From: Redstonneur1256 <29004178+Redstonneur1256@users.noreply.github.com> Date: Wed, 24 Jan 2024 04:05:14 +0100 Subject: [PATCH 013/116] Allow markers to be deleted (#9485) --- core/src/mindustry/logic/LExecutor.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/core/src/mindustry/logic/LExecutor.java b/core/src/mindustry/logic/LExecutor.java index 44e03ef12c..3b67f5a958 100644 --- a/core/src/mindustry/logic/LExecutor.java +++ b/core/src/mindustry/logic/LExecutor.java @@ -2049,6 +2049,11 @@ public class LExecutor{ state.markers.add(id, marker); } + @Remote(called = Loc.server, variants = Variant.both, unreliable = true) + public static void removeMarker(int id){ + state.markers.remove(id); + } + @Remote(called = Loc.server, variants = Variant.both, unreliable = true) public static void updateMarker(int id, LMarkerControl control, double p1, double p2, double p3){ var marker = state.markers.get(id); From 35a833eb67c4cce3051d5f36aab26f19d2eed5f5 Mon Sep 17 00:00:00 2001 From: HubsvVN <157294903+HubsvVN@users.noreply.github.com> Date: Thu, 25 Jan 2024 10:43:40 +0700 Subject: [PATCH 014/116] Update servers_v7.json (#9484) * Update servers_v7.json * Update servers_v7.json --- servers_v7.json | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/servers_v7.json b/servers_v7.json index 54ce1c7466..75b0446fdf 100644 --- a/servers_v7.json +++ b/servers_v7.json @@ -279,5 +279,9 @@ { "name": "MineCore", "address": ["194.247.42.11:27792", "194.247.42.11:27977", "194.247.42.61:27989", "194.247.42.181:28514"] + }, + { + "name": "hubVn" + "address": ["de-free-01.hosts.optikservers.com:32362"] } ] From 083168f7e03d6422f8efc0014c0ed84f171b31e2 Mon Sep 17 00:00:00 2001 From: Anuken Date: Fri, 26 Jan 2024 19:04:43 -0500 Subject: [PATCH 015/116] Update servers_v7.json --- servers_v7.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/servers_v7.json b/servers_v7.json index 75b0446fdf..fd09b2b6db 100644 --- a/servers_v7.json +++ b/servers_v7.json @@ -281,7 +281,7 @@ "address": ["194.247.42.11:27792", "194.247.42.11:27977", "194.247.42.61:27989", "194.247.42.181:28514"] }, { - "name": "hubVn" + "name": "hubVn", "address": ["de-free-01.hosts.optikservers.com:32362"] } ] From 1c40e3bbf2be042102a6d962a491aa5610132512 Mon Sep 17 00:00:00 2001 From: Anuken Date: Fri, 26 Jan 2024 19:07:32 -0500 Subject: [PATCH 016/116] Update pr.yml --- .github/workflows/pr.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml index 4cc2f6d88f..5bb8637f56 100644 --- a/.github/workflows/pr.yml +++ b/.github/workflows/pr.yml @@ -17,8 +17,10 @@ jobs: java-version: 17 - name: Setup Gradle uses: gradle/gradle-build-action@v2 + - name: Run unit tests + run: ./gradlew clean cleanTest test --stacktrace - name: Run unit tests and build JAR - run: ./gradlew test desktop:dist + run: ./gradlew desktop:dist - name: Upload desktop JAR for testing uses: actions/upload-artifact@v2 with: From 440643129149392a589c09fd0e70a9f1e6a17955 Mon Sep 17 00:00:00 2001 From: Elixias <61173114+LixieWulf@users.noreply.github.com> Date: Fri, 26 Jan 2024 17:08:15 -0700 Subject: [PATCH 017/116] Better Malis palette (#9491) --- core/src/mindustry/game/Team.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/src/mindustry/game/Team.java b/core/src/mindustry/game/Team.java index afd32eb95e..affcbe525c 100644 --- a/core/src/mindustry/game/Team.java +++ b/core/src/mindustry/game/Team.java @@ -31,7 +31,7 @@ public class Team implements Comparable{ derelict = new Team(0, "derelict", Color.valueOf("4d4e58")), sharded = new Team(1, "sharded", Pal.accent.cpy(), Color.valueOf("ffd37f"), Color.valueOf("eab678"), Color.valueOf("d4816b")), crux = new Team(2, "crux", Color.valueOf("f25555"), Color.valueOf("fc8e6c"), Color.valueOf("f25555"), Color.valueOf("a04553")), - malis = new Team(3, "malis", Color.valueOf("a27ce5"), Color.valueOf("c195fb"), Color.valueOf("665c9f"), Color.valueOf("484988")), + malis = new Team(3, "malis", Color.valueOf("a27ce5"), Color.valueOf("c7a4f5"), Color.valueOf("896fd6"), Color.valueOf("504cba")), //TODO temporarily no palettes for these teams. green = new Team(4, "green", Color.valueOf("54d67d")),//Color.valueOf("96f58c"), Color.valueOf("54d67d"), Color.valueOf("28785c")), From d4d85ec8731a75022b4e2e097e86064f6ad49b7f Mon Sep 17 00:00:00 2001 From: StalkerBaran <120944331+StalkerBaran@users.noreply.github.com> Date: Sat, 27 Jan 2024 21:22:12 +0700 Subject: [PATCH 018/116] Update servers_v7.json (#9494) New server (MeowIsland) --- servers_v7.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/servers_v7.json b/servers_v7.json index fd09b2b6db..509fee6b66 100644 --- a/servers_v7.json +++ b/servers_v7.json @@ -222,7 +222,7 @@ }, { "name": "MeowIsland", - "address": ["nexus.minecraft.rent:25598", "nexus.minecraft.rent:25596", "jupiter.minecraft.rent:25651"] + "address": ["nexus.minecraft.rent:25598", "nexus.minecraft.rent:25596", "jupiter.minecraft.rent:25651", "orion.minecraft.rent:25573"] }, { "name": "3MIDustry", From 342ec4adcebedc1e43ce6aa2d51a1f66e2f6a653 Mon Sep 17 00:00:00 2001 From: Elixias <61173114+LixieWulf@users.noreply.github.com> Date: Sat, 27 Jan 2024 07:22:28 -0700 Subject: [PATCH 019/116] Unprotect dumpTime (#9493) --- core/src/mindustry/world/Block.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/src/mindustry/world/Block.java b/core/src/mindustry/world/Block.java index 31d98e1efc..05f064cbaf 100644 --- a/core/src/mindustry/world/Block.java +++ b/core/src/mindustry/world/Block.java @@ -382,7 +382,7 @@ public class Block extends UnlockableContent implements Senseable{ /** Dump timer ID.*/ protected final int timerDump = timers++; /** How often to try dumping items in ticks, e.g. 5 = 12 times/sec*/ - protected final int dumpTime = 5; + public int dumpTime = 5; public Block(String name){ super(name); From 8d89fac0af651b8a0ffa5e4eed2ca97200dbb7c5 Mon Sep 17 00:00:00 2001 From: ulwepo <85295540+ulwepo@users.noreply.github.com> Date: Sun, 28 Jan 2024 00:05:03 +0900 Subject: [PATCH 020/116] Update servers_v7.json (#9496) --- servers_v7.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/servers_v7.json b/servers_v7.json index 509fee6b66..4e5c27d47b 100644 --- a/servers_v7.json +++ b/servers_v7.json @@ -157,7 +157,7 @@ }, { "name": "Sakura", - "address": ["160.16.207.141:20527", "160.16.207.141:21527", "160.16.207.141:22527", "160.16.207.141:23527", "160.16.207.141:24527", "160.16.207.141:25527", "160.16.207.141:26527", "160.16.207.141:27527", "160.16.207.141:28527", "160.16.207.141:29527"] + "address": ["160.16.207.141:20527", "160.16.207.141:21527", "160.16.207.141:22527", "160.16.207.141:23527", "160.16.207.141:24527", "160.16.207.141:25527", "160.16.207.141:26527", "160.16.207.141:27527", "160.16.207.141:28527", "160.16.207.141:29527", "162.43.36.78:20527", "162.43.36.78:21527", "162.43.36.78:22527", "162.43.36.78:23527", "162.43.36.78:24527", "162.43.36.78:25527", "162.43.36.78:26527", "162.43.36.78:27527", "162.43.36.78:28527", "162.43.36.78:29527", "sakura-mindustry.jp:20527"] }, { "name": "|RussianServers|[]", From 021e766214068cf10a5251a21a2cb5049b3d7ca6 Mon Sep 17 00:00:00 2001 From: Anuken Date: Sat, 27 Jan 2024 10:07:59 -0500 Subject: [PATCH 021/116] Cleanup --- core/src/mindustry/world/Build.java | 13 +++++++------ core/src/mindustry/world/blocks/ConstructBlock.java | 2 -- 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/core/src/mindustry/world/Build.java b/core/src/mindustry/world/Build.java index 03a3db970b..bbc38dbdd4 100644 --- a/core/src/mindustry/world/Build.java +++ b/core/src/mindustry/world/Build.java @@ -198,16 +198,17 @@ public class Build{ if(tile == null) return false; + //floors have different checks + if(type.isFloor()){ + return type.isOverlay() ? tile.overlay() != type : tile.floor() != type; + } + //campaign darkness check if(world.getDarkness(x, y) >= 3){ return false; } - if(!type.requiresWater && !type.isFloor() && !contactsShallows(tile.x, tile.y, type) && !type.placeableLiquid){ - return false; - } - - if((type.isFloor() && tile.floor() == type) || (type.isOverlay() && tile.overlay() == type)){ + if(!type.requiresWater && !contactsShallows(tile.x, tile.y, type) && !type.placeableLiquid){ return false; } @@ -231,7 +232,7 @@ public class Build{ (check.floor().isDeep() && !type.floating && !type.requiresWater && !type.placeableLiquid) || //deep water (type == check.block() && check.build != null && rotation == check.build.rotation && type.rotate && !((type == check.block && check.team() == Team.derelict))) || //same block, same rotation !check.interactable(team) || //cannot interact - (!check.floor().placeableOn && !type.isFloor()) || //solid floor + !check.floor().placeableOn || //solid floor (!checkVisible && !check.block().alwaysReplace) || //replacing a block that should be replaced (e.g. payload placement) !(((type.canReplace(check.block()) || (type == check.block && state.rules.derelictRepair && check.team() == Team.derelict)) || //can replace type OR can replace derelict block of same type (check.build instanceof ConstructBuild build && build.current == type && check.centerX() == tile.x && check.centerY() == tile.y)) && //same type in construction diff --git a/core/src/mindustry/world/blocks/ConstructBlock.java b/core/src/mindustry/world/blocks/ConstructBlock.java index 9e4ac3e719..df7434a222 100644 --- a/core/src/mindustry/world/blocks/ConstructBlock.java +++ b/core/src/mindustry/world/blocks/ConstructBlock.java @@ -75,10 +75,8 @@ public class ConstructBlock extends Block{ if(block instanceof OverlayFloor overlay){ tile.setOverlay(overlay); - tile.setBlock(Blocks.air); }else if(block instanceof Floor floor){ tile.setFloorUnder(floor); - tile.setBlock(Blocks.air); }else{ tile.setBlock(block, team, rotation); } From 1b14a09f1c9c3d39a22f87dd153d9df5b6598eb0 Mon Sep 17 00:00:00 2001 From: MEEPofFaith <54301439+MEEPofFaith@users.noreply.github.com> Date: Sat, 27 Jan 2024 18:24:48 -0800 Subject: [PATCH 022/116] Shield health should also be factored in pierce factor when maxDamageFraction is 0 (#9486) --- core/src/mindustry/entities/bullet/BulletType.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/core/src/mindustry/entities/bullet/BulletType.java b/core/src/mindustry/entities/bullet/BulletType.java index 4ab4c929a4..2870715f06 100644 --- a/core/src/mindustry/entities/bullet/BulletType.java +++ b/core/src/mindustry/entities/bullet/BulletType.java @@ -387,14 +387,14 @@ public class BulletType extends Content implements Cloneable{ if(entity instanceof Healthc h){ float damage = b.damage; + float shield = entity instanceof Shieldc s ? Math.max(s.shield(), 0f) : 0f; if(maxDamageFraction > 0){ - float cap = h.maxHealth() * maxDamageFraction; - if(entity instanceof Shieldc s){ - cap += Math.max(s.shield(), 0f); - } + float cap = h.maxHealth() * maxDamageFraction + shield; damage = Math.min(damage, cap); //cap health to effective health for handlePierce to handle it properly health = Math.min(health, cap); + }else{ + health += shield; } if(pierceArmor){ h.damagePierce(damage); From 6db4ef7f1c428021c1df8f5efffb0796add7589f Mon Sep 17 00:00:00 2001 From: Sh1p*nfire <73347888+Sh1penfire@users.noreply.github.com> Date: Mon, 29 Jan 2024 05:04:21 +1100 Subject: [PATCH 023/116] PartProgress.time & PartProgress.mod added (#9499) * PartProgress.time & PartProgress.mod added * Add loop() to combine mul and mod --- core/src/mindustry/entities/part/DrawPart.java | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/core/src/mindustry/entities/part/DrawPart.java b/core/src/mindustry/entities/part/DrawPart.java index f3ebfc6ceb..a8642fe6d4 100644 --- a/core/src/mindustry/entities/part/DrawPart.java +++ b/core/src/mindustry/entities/part/DrawPart.java @@ -85,8 +85,10 @@ public abstract class DrawPart{ /** Weapon heat, 1 when just fired, 0, when it has cooled down (duration depends on weapon) */ heat = p -> p.heat, /** Lifetime fraction, 0 to 1. Only for missiles. */ - life = p -> p.life; - + life = p -> p.life, + /** Current unscaled value of Time.time. */ + time = p -> Time.time; + float get(PartParams p); static PartProgress constant(float value){ @@ -167,6 +169,14 @@ public abstract class DrawPart{ default PartProgress absin(float scl, float mag){ return p -> get(p) + Mathf.absin(scl, mag); } + + default PartProgress mod(float amount){ + return p -> Mathf.mod(get(p), amount); + } + + default PartProgress loop(float time){ + return p -> Mathf.mod(get(p)/time, 1); + } default PartProgress apply(PartProgress other, PartFunc func){ return p -> func.get(get(p), other.get(p)); From eddcd8fc6d09fdb9bf850cd9e14591a98139771e Mon Sep 17 00:00:00 2001 From: Anuken Date: Sun, 28 Jan 2024 15:50:05 -0500 Subject: [PATCH 024/116] Minor building optimization --- .../mindustry/entities/comp/BuilderComp.java | 21 +++++++++---------- gradle.properties | 2 +- 2 files changed, 11 insertions(+), 12 deletions(-) diff --git a/core/src/mindustry/entities/comp/BuilderComp.java b/core/src/mindustry/entities/comp/BuilderComp.java index 332c7de701..0c5070febb 100644 --- a/core/src/mindustry/entities/comp/BuilderComp.java +++ b/core/src/mindustry/entities/comp/BuilderComp.java @@ -86,9 +86,9 @@ abstract class BuilderComp implements Posc, Statusc, Teamc, Rotc{ buildAlpha = Mathf.lerpDelta(buildAlpha, activelyBuilding() ? 1f : 0f, 0.15f); } - //validate regardless of whether building is enabled. + validatePlans(); + if(!updateBuilding || !canBuild()){ - validatePlans(); return; } @@ -99,19 +99,18 @@ abstract class BuilderComp implements Posc, Statusc, Teamc, Rotc{ if(Float.isNaN(buildCounter) || Float.isInfinite(buildCounter)) buildCounter = 0f; buildCounter = Math.min(buildCounter, 10f); + boolean instant = state.rules.instantBuild && state.rules.infiniteResources; + //random attempt to fix a freeze that only occurs on Android - int maxPerFrame = state.rules.instantBuild ? plans.size : 10, count = 0; + int maxPerFrame = instant ? plans.size : 10, count = 0; - while((buildCounter >= 1 || state.rules.instantBuild) && count++ < maxPerFrame){ + var core = core(); + + if((core == null && !infinite)) return; + + while((buildCounter >= 1 || instant) && count++ < maxPerFrame && plans.size > 0){ buildCounter -= 1f; - validatePlans(); - - var core = core(); - - //nothing to build, or core doesn't exist - if(buildPlan() == null || (core == null && !infinite)) return; - //find the next build plan if(plans.size > 1){ int total = 0; diff --git a/gradle.properties b/gradle.properties index e69588eb44..3d72e86dff 100644 --- a/gradle.properties +++ b/gradle.properties @@ -25,4 +25,4 @@ org.gradle.caching=true #used for slow jitpack builds; TODO see if this actually works org.gradle.internal.http.socketTimeout=100000 org.gradle.internal.http.connectionTimeout=100000 -archash=137d14855f +archash=008e73aa33 From a6f2aa6c4325931395f255c4813f3d1acbeaf740 Mon Sep 17 00:00:00 2001 From: Anuken Date: Mon, 29 Jan 2024 15:17:49 -0500 Subject: [PATCH 025/116] Marker control cleanup --- core/src/mindustry/game/MapObjectives.java | 33 +++++++++------------- gradle.properties | 2 +- 2 files changed, 15 insertions(+), 20 deletions(-) diff --git a/core/src/mindustry/game/MapObjectives.java b/core/src/mindustry/game/MapObjectives.java index dd64aa9106..f88607419a 100644 --- a/core/src/mindustry/game/MapObjectives.java +++ b/core/src/mindustry/game/MapObjectives.java @@ -703,19 +703,17 @@ public class MapObjectives implements Iterable, Eachable, Eachable fontSize = (float)p1; @@ -801,7 +801,6 @@ public class MapObjectives implements Iterable, Eachable rotation = (float)p1; case color -> color.set(Tmp.c1.fromDouble(p1)); case shape -> sides = (int)p1; - default -> super.control(type, p1, p2, p3); } } @@ -814,7 +813,6 @@ public class MapObjectives implements Iterable, Eachable super.control(type, p1, p2, p3); } } } @@ -881,6 +879,8 @@ public class MapObjectives implements Iterable, Eachable pos.x = (int)p1; @@ -888,15 +888,12 @@ public class MapObjectives implements Iterable, Eachable stroke = (float)p1; case color -> color.set(Tmp.c1.fromDouble(p1)); case minimap -> minimap = true; - default -> super.control(type, p1, p2, p3); } } if(!Double.isNaN(p2)){ if(type == LMarkerControl.pos){ pos.y = (int)p2; - }else{ - super.control(type, p1, p2, p3); } } } @@ -945,6 +942,8 @@ public class MapObjectives implements Iterable, Eachable radius = (float)p1; @@ -952,22 +951,18 @@ public class MapObjectives implements Iterable, Eachable rotation = (float)p1; case color -> color.set(Tmp.c1.fromDouble(p1)); case shape -> sides = (int)p1; - default -> super.control(type, p1, p2, p3); } } if(!Double.isNaN(p2)){ switch(type){ case shape -> fill = !Mathf.equal((float)p2, 0f); - default -> super.control(type, p1, p2, p3); } } if(!Double.isNaN(p3)){ if(type == LMarkerControl.shape){ outline = !Mathf.equal((float)p3, 0f); - }else{ - super.control(type, p1, p2, p3); } } } @@ -1009,6 +1004,8 @@ public class MapObjectives implements Iterable, Eachable fontSize = (float)p1; @@ -1019,7 +1016,6 @@ public class MapObjectives implements Iterable, Eachable super.control(type, p1, p2, p3); } } @@ -1032,7 +1028,6 @@ public class MapObjectives implements Iterable, Eachable super.control(type, p1, p2, p3); } } } @@ -1093,19 +1088,19 @@ public class MapObjectives implements Iterable, Eachable endPos.x = (float)p1 * tilesize; case stroke -> stroke = (float)p1; case color -> color.set(Tmp.c1.fromDouble(p1)); - default -> super.control(type, p1, p2, p3); } } if(!Double.isNaN(p2)){ switch(type){ case endPos -> endPos.y = (float)p2 * tilesize; - default -> super.control(type, p1, p2, p3); } } } @@ -1135,19 +1130,19 @@ public class MapObjectives implements Iterable, Eachable rotation = (float)p1; case textureSize -> width = (float)p1 * tilesize; case color -> color.set(Tmp.c1.fromDouble(p1)); - default -> super.control(type, p1, p2, p3); } } if(!Double.isNaN(p2)){ switch(type){ case textureSize -> height = (float)p2 * tilesize; - default -> super.control(type, p1, p2, p3); } } } diff --git a/gradle.properties b/gradle.properties index 3d72e86dff..00ed2b3ae2 100644 --- a/gradle.properties +++ b/gradle.properties @@ -25,4 +25,4 @@ org.gradle.caching=true #used for slow jitpack builds; TODO see if this actually works org.gradle.internal.http.socketTimeout=100000 org.gradle.internal.http.connectionTimeout=100000 -archash=008e73aa33 +archash=7a2f8eada1 From b7485b5bc4e444438001b17f658a7ba8b698bb76 Mon Sep 17 00:00:00 2001 From: Anuken Date: Mon, 29 Jan 2024 22:45:22 -0500 Subject: [PATCH 026/116] Join dialog performance improvement --- core/src/mindustry/ui/dialogs/JoinDialog.java | 11 +++++++++++ gradle.properties | 2 +- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/core/src/mindustry/ui/dialogs/JoinDialog.java b/core/src/mindustry/ui/dialogs/JoinDialog.java index 3b826c3c79..115cdd32c8 100644 --- a/core/src/mindustry/ui/dialogs/JoinDialog.java +++ b/core/src/mindustry/ui/dialogs/JoinDialog.java @@ -1,6 +1,7 @@ package mindustry.ui.dialogs; import arc.*; +import arc.freetype.FreeTypeFontGenerator.*; import arc.graphics.*; import arc.input.*; import arc.math.*; @@ -35,6 +36,7 @@ public class JoinDialog extends BaseDialog{ int refreshes; boolean showHidden; TextButtonStyle style; + Task fontIgnoreDirtyTask; String lastIp; int lastPort, lastColumns = -1; @@ -413,6 +415,15 @@ public class JoinDialog extends BaseDialog{ net.pingHost(resaddress, resport, res -> { if(refreshes != cur) return; + //don't recache the texture for a while + if(fontIgnoreDirtyTask == null){ + FreeTypeFontData.ignoreDirty = true; + fontIgnoreDirtyTask = Time.runTask(60f, () -> { + FreeTypeFontData.ignoreDirty = false; + fontIgnoreDirtyTask = null; + }); + } + if(!serverSearch.isEmpty() && !(group.name.toLowerCase().contains(serverSearch) || res.name.toLowerCase().contains(serverSearch) || res.description.toLowerCase().contains(serverSearch) diff --git a/gradle.properties b/gradle.properties index 00ed2b3ae2..bacb7e3213 100644 --- a/gradle.properties +++ b/gradle.properties @@ -25,4 +25,4 @@ org.gradle.caching=true #used for slow jitpack builds; TODO see if this actually works org.gradle.internal.http.socketTimeout=100000 org.gradle.internal.http.connectionTimeout=100000 -archash=7a2f8eada1 +archash=5bbfaf2ad9 From 4e35ae2dec4388183984e4e919e5592409d5cc57 Mon Sep 17 00:00:00 2001 From: Anuken Date: Mon, 29 Jan 2024 23:04:12 -0500 Subject: [PATCH 027/116] Minor font cache delay tweak --- core/src/mindustry/ui/dialogs/JoinDialog.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/src/mindustry/ui/dialogs/JoinDialog.java b/core/src/mindustry/ui/dialogs/JoinDialog.java index 115cdd32c8..3c3fd58ba4 100644 --- a/core/src/mindustry/ui/dialogs/JoinDialog.java +++ b/core/src/mindustry/ui/dialogs/JoinDialog.java @@ -418,7 +418,7 @@ public class JoinDialog extends BaseDialog{ //don't recache the texture for a while if(fontIgnoreDirtyTask == null){ FreeTypeFontData.ignoreDirty = true; - fontIgnoreDirtyTask = Time.runTask(60f, () -> { + fontIgnoreDirtyTask = Time.runTask(0.6f * 60f, () -> { FreeTypeFontData.ignoreDirty = false; fontIgnoreDirtyTask = null; }); From cc0ac1523beba2b525392aff64144c38d18b0fa1 Mon Sep 17 00:00:00 2001 From: MEEPofFaith <54301439+MEEPofFaith@users.noreply.github.com> Date: Tue, 30 Jan 2024 07:45:38 -0800 Subject: [PATCH 028/116] SoundEffect's sound should be delayed by its startDelay (#9502) * SoundEffect's sound should be delayed by its startDelay * h --- .../mindustry/entities/effect/SoundEffect.java | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/core/src/mindustry/entities/effect/SoundEffect.java b/core/src/mindustry/entities/effect/SoundEffect.java index 8ed0f74a20..c3d320d527 100644 --- a/core/src/mindustry/entities/effect/SoundEffect.java +++ b/core/src/mindustry/entities/effect/SoundEffect.java @@ -21,18 +21,32 @@ public class SoundEffect extends Effect{ public Effect effect; public SoundEffect(){ + startDelay = -1; } public SoundEffect(Sound sound, Effect effect){ + this(); this.sound = sound; this.effect = effect; } + @Override + public void init(){ + if(startDelay < 0){ + startDelay = effect.startDelay; + } + } + @Override public void create(float x, float y, float rotation, Color color, Object data){ if(!shouldCreate()) return; - sound.at(x, y, Mathf.random(minPitch, maxPitch), Mathf.random(minVolume, maxVolume)); + if(startDelay > 0){ + Time.run(startDelay, () -> sound.at(x, y, Mathf.random(minPitch, maxPitch), Mathf.random(minVolume, maxVolume))); + }else{ + sound.at(x, y, Mathf.random(minPitch, maxPitch), Mathf.random(minVolume, maxVolume)); + } + effect.create(x, y, rotation, color, data); } } From 994ed5a87200b663bf3f4dd6c0226eb1854abaae Mon Sep 17 00:00:00 2001 From: abcxyzDustry <138785336+abcxyzDustry@users.noreply.github.com> Date: Wed, 31 Jan 2024 01:05:50 +0700 Subject: [PATCH 029/116] I want to delete some unused IPs and IPs that overlap with the eradication server (#9504) --- servers_v7.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/servers_v7.json b/servers_v7.json index 4e5c27d47b..f7da7e20f1 100644 --- a/servers_v7.json +++ b/servers_v7.json @@ -230,7 +230,7 @@ }, { "name": "ABCXYZ Community", - "address": ["23.88.73.88:23591", "23.88.73.88:23539", "144.76.57.59:14996", "144.76.57.59:16881", "144.76.57.59:13885", "23.88.73.88:32113", "144.76.57.59:9269", "144.76.57.59:24235", "144.76.57.59:24133", "140.238.246.78:7000", "5.9.8.124:28848", "free2.titaniumhost.tech:25669"] + "address": ["23.88.73.88:23591", "23.88.73.88:23539", "144.76.57.59:14996", "144.76.57.59:16881", "144.76.57.59:13885", "23.88.73.88:32113", "144.76.57.59:9269", "144.76.57.59:24235", "144.76.57.59:24133", "5.9.8.124:28848"] }, { "name": "CroCraft Network", From 6a429184aafa2097d8aaa8b5f2e777752f365acd Mon Sep 17 00:00:00 2001 From: Redstonneur1256 <29004178+Redstonneur1256@users.noreply.github.com> Date: Wed, 31 Jan 2024 01:35:39 +0100 Subject: [PATCH 030/116] update markers (#9506) * update markers * update markers & minimap rendering --- core/assets/bundles/bundle.properties | 6 +- core/src/mindustry/core/Renderer.java | 10 +- .../mindustry/editor/MapObjectivesDialog.java | 46 ++- core/src/mindustry/game/MapObjectives.java | 290 +++++++++++------- .../mindustry/graphics/MinimapRenderer.java | 92 +++--- core/src/mindustry/logic/LMarkerControl.java | 7 +- core/src/mindustry/logic/LStatements.java | 19 +- 7 files changed, 290 insertions(+), 180 deletions(-) diff --git a/core/assets/bundles/bundle.properties b/core/assets/bundles/bundle.properties index a0aea04348..b8a1089fe3 100644 --- a/core/assets/bundles/bundle.properties +++ b/core/assets/bundles/bundle.properties @@ -682,10 +682,11 @@ objective.commandmode.name = Command Mode objective.flag.name = Flag marker.shapetext.name = Shape Text -marker.minimap.name = Minimap +marker.point.name = Point marker.shape.name = Shape marker.text.name = Text marker.line.name = Line +marker.quad.name = Quad marker.background = Background marker.outline = Outline @@ -2485,3 +2486,6 @@ lenum.flushtext = Flush print buffer's content to marker, if applicable.\nIf fet lenum.texture = Texture name straight from game's texture atlas (using kebab-case naming style).\nIf printFlush is set to true, consumes text buffer content as text argument. lenum.texturesize = Size of texture in tiles. Zero value scales marker width to original texture's size. lenum.autoscale = Whether to scale marker corresponding to player's zoom level. +lenum.posi = Indexed position, used for line and quad markers with index zero being the first position. +lenum.uvi = Texture's position ranging from zero to one, used for quad markers. +lenum.colori = Indexed position, used for line and quad markers with index zero being the first color. diff --git a/core/src/mindustry/core/Renderer.java b/core/src/mindustry/core/Renderer.java index 13b1ead08f..7b7d1dc155 100644 --- a/core/src/mindustry/core/Renderer.java +++ b/core/src/mindustry/core/Renderer.java @@ -372,18 +372,20 @@ public class Renderer implements ApplicationListener{ }); } + float scaleFactor = 4f / renderer.getDisplayScale(); + //draw objective markers state.rules.objectives.eachRunning(obj -> { for(var marker : obj.markers){ - if(!marker.minimap){ - marker.drawWorld(); + if(marker.world){ + marker.draw(marker.autoscale ? scaleFactor : 1); } } }); for(var marker : state.markers){ - if(!marker.isHidden() && !marker.minimap){ - marker.drawWorld(); + if(marker.world){ + marker.draw(marker.autoscale ? scaleFactor : 1); } } diff --git a/core/src/mindustry/editor/MapObjectivesDialog.java b/core/src/mindustry/editor/MapObjectivesDialog.java index 5e354a84ae..ecdc53e01e 100644 --- a/core/src/mindustry/editor/MapObjectivesDialog.java +++ b/core/src/mindustry/editor/MapObjectivesDialog.java @@ -246,6 +246,38 @@ public class MapObjectivesDialog extends BaseDialog{ show(); }}); + setInterpreter(Vertices.class, float[].class, (cont, name, type, field, remover, indexer, get, set) -> cont.table(main -> { + float[] data = get.get(); + + name(cont, name, remover, indexer); + cont.table(t -> { + t.left().defaults().left(); + + String[] names = {"x", "y", "color", "u", "v"}; + int stride = 6; + int vertices = data.length / stride; + + for(int i = 0; i < vertices; i++){ + int offset = i * stride; + + t.table(row -> { + for(int j = 0; j < names.length; j++){ + int index = offset + j; + + if("color".equals(names[j])) { + getInterpreter(Color.class).build(row, names[j], new TypeInfo(Color.class), null, null, null, () -> new Color().abgr8888(data[index]), value -> data[index] = value.toFloatBits()); + }else{ + float scale = j <= 1 ? tilesize : 1; + getInterpreter(float.class).build(row, names[j], new TypeInfo(float.class), null, null, null, () -> data[index] / scale, value -> data[index] = value * scale); + } + + row.add().pad(4); + } + }).row(); + } + }); + })); + // Types that use the default interpreter. It would be nice if all types could use it, but I don't know how to reliably prevent classes like [? extends Content] from using it. for(var obj : MapObjectives.allObjectiveTypes) setInterpreter(obj.get().getClass(), defaultInterpreter()); for(var mark : MapObjectives.allMarkerTypes) setInterpreter(mark.get().getClass(), defaultInterpreter()); @@ -290,10 +322,12 @@ public class MapObjectivesDialog extends BaseDialog{ t.button(Icon.downOpen, Styles.emptyi, () -> indexer.get(false)).fill().padRight(4f); } - t.button(Icon.add, Styles.emptyi, () -> getProvider(type.element.raw).get(type.element, res -> { - arr.add(res); - rebuild[0].run(); - })).fill(); + if(!field.isAnnotationPresent(Immutable.class)) { + t.button(Icon.add, Styles.emptyi, () -> getProvider(type.element.raw).get(type.element, res -> { + arr.add(res); + rebuild[0].run(); + })).fill(); + } }).growX().height(46f).pad(0f, -10f, 0f, -10f).get(); main.row().table(Tex.button, t -> rebuild[0] = () -> { @@ -312,10 +346,10 @@ public class MapObjectivesDialog extends BaseDialog{ getInterpreter((Class)arr.get(index).getClass()).build( t, "", new TypeInfo(arr.get(index).getClass()), - field, () -> { + field, field == null || !field.isAnnotationPresent(Immutable.class) ? () -> { arr.remove(index); rebuild[0].run(); - }, field == null || !field.isAnnotationPresent(Unordered.class) ? in -> { + } : null, field == null || !field.isAnnotationPresent(Unordered.class) ? in -> { if(in && index > 0){ arr.swap(index, index - 1); rebuild[0].run(); diff --git a/core/src/mindustry/game/MapObjectives.java b/core/src/mindustry/game/MapObjectives.java index f88607419a..466068c4eb 100644 --- a/core/src/mindustry/game/MapObjectives.java +++ b/core/src/mindustry/game/MapObjectives.java @@ -61,12 +61,15 @@ public class MapObjectives implements Iterable, Eachable, Eachable prov) { + Class type = prov.get().getClass(); + + markerNameToType.put(name, prov); + markerNameToType.put(Strings.camelize(name), prov); + JsonIO.classTag(Strings.camelize(name), type); + JsonIO.classTag(name, type); + } + /** Adds all given objectives to the executor as root objectives. */ public void add(MapObjective... objectives){ for(var objective : objectives) flatten(objective); @@ -617,38 +629,26 @@ public class MapObjectives implements Iterable, Eachable