From 223fb8d6f5c4acd06d12e5ae9868b3a82d921047 Mon Sep 17 00:00:00 2001 From: Matthew Peng <54301439+MEEPofFaith@users.noreply.github.com> Date: Sun, 31 Oct 2021 18:30:35 -0700 Subject: [PATCH 1/5] Basic unitsorts for hjson (#6280) * Create some basic unitSorts * Set as defaults * add to ContentParser --- core/src/mindustry/content/Blocks.java | 5 +++-- core/src/mindustry/entities/UnitSorts.java | 14 ++++++++++++++ core/src/mindustry/mod/ContentParser.java | 4 +++- .../world/blocks/defense/turrets/Turret.java | 4 ++-- 4 files changed, 22 insertions(+), 5 deletions(-) create mode 100644 core/src/mindustry/entities/UnitSorts.java diff --git a/core/src/mindustry/content/Blocks.java b/core/src/mindustry/content/Blocks.java index 2d32e621be..3e6c2bfe21 100644 --- a/core/src/mindustry/content/Blocks.java +++ b/core/src/mindustry/content/Blocks.java @@ -5,6 +5,7 @@ import arc.math.*; import arc.struct.*; import mindustry.*; import mindustry.ctype.*; +import mindustry.entities.*; import mindustry.entities.bullet.*; import mindustry.gen.*; import mindustry.graphics.*; @@ -1839,7 +1840,7 @@ public class Blocks implements ContentList{ size = 4; shootCone = 2f; shootSound = Sounds.railgun; - unitSort = (u, x, y) -> -u.maxHealth + Mathf.dst2(u.x, u.y, x, y) / 6400f; + unitSort = UnitSorts.strongest; coolantMultiplier = 0.4f; @@ -2287,4 +2288,4 @@ public class Blocks implements ContentList{ //endregion } -} +} \ No newline at end of file diff --git a/core/src/mindustry/entities/UnitSorts.java b/core/src/mindustry/entities/UnitSorts.java new file mode 100644 index 0000000000..25afb0def6 --- /dev/null +++ b/core/src/mindustry/entities/UnitSorts.java @@ -0,0 +1,14 @@ +package mindustry.entities; + +import arc.math.*; +import mindustry.entities.Units.*; +import mindustry.gen.*; + +public class UnitSorts{ + public static Sortf + + closest = Unit::dst2, + farthest = (u, x, y) -> -u.dst2(x, y), + strongest = (u, x, y) -> -u.maxHealth + Mathf.dst2(u.x, u.y, x, y) / 6400f, + weakest = (u, x, y) -> u.maxHealth + Mathf.dst2(u.x, u.y, x, y) / 6400f; +} \ No newline at end of file diff --git a/core/src/mindustry/mod/ContentParser.java b/core/src/mindustry/mod/ContentParser.java index 1ffae2a6ea..f5840f7df6 100644 --- a/core/src/mindustry/mod/ContentParser.java +++ b/core/src/mindustry/mod/ContentParser.java @@ -20,6 +20,7 @@ import mindustry.content.*; import mindustry.content.TechTree.*; import mindustry.ctype.*; import mindustry.entities.*; +import mindustry.entities.Units.*; import mindustry.entities.abilities.*; import mindustry.entities.bullet.*; import mindustry.entities.effect.*; @@ -61,6 +62,7 @@ public class ContentParser{ readFields(result, data); return result; }); + put(Sortf.class, (type, data) -> field(UnitSorts.class, data)); put(Interp.class, (type, data) -> field(Interp.class, data)); put(CacheLayer.class, (type, data) -> field(CacheLayer.class, data)); put(Attribute.class, (type, data) -> Attribute.get(data.asString())); @@ -826,4 +828,4 @@ public class ContentParser{ void parsed(Class type, JsonValue jsonData, Object result); } -} +} \ No newline at end of file diff --git a/core/src/mindustry/world/blocks/defense/turrets/Turret.java b/core/src/mindustry/world/blocks/defense/turrets/Turret.java index 29236505ab..45c049c6a0 100644 --- a/core/src/mindustry/world/blocks/defense/turrets/Turret.java +++ b/core/src/mindustry/world/blocks/defense/turrets/Turret.java @@ -76,7 +76,7 @@ public class Turret extends ReloadTurret{ public Effect chargeBeginEffect = Fx.none; public Sound chargeSound = Sounds.none; - public Sortf unitSort = Unit::dst2; + public Sortf unitSort = UnitSorts.closest; protected Vec2 tr = new Vec2(); protected Vec2 tr2 = new Vec2(); @@ -508,4 +508,4 @@ public class Turret extends ReloadTurret{ return 1; } } -} +} \ No newline at end of file From 99e7fcd2d2eade9f50305c58bdd6dd828d59c079 Mon Sep 17 00:00:00 2001 From: VizardAlpha <43859764+VizardAlpha@users.noreply.github.com> Date: Mon, 1 Nov 2021 14:31:25 +0100 Subject: [PATCH 2/5] Update bundle_fr.properties (#6241) * Update bundle_fr.properties After checking, there was some text missing to be translated. * Minor modification --- core/assets/bundles/bundle_fr.properties | 2 ++ 1 file changed, 2 insertions(+) diff --git a/core/assets/bundles/bundle_fr.properties b/core/assets/bundles/bundle_fr.properties index 894d9fa228..f0484316b3 100644 --- a/core/assets/bundles/bundle_fr.properties +++ b/core/assets/bundles/bundle_fr.properties @@ -583,6 +583,8 @@ weather.sandstorm.name = Tempête de sable weather.sporestorm.name = Tempête de spores weather.fog.name = Brouillard +sectorlist = Secteurs +sectorlist.attacked = {0} pris d'assaut sectors.unexplored = [lightgray]Inexploré sectors.resources = Ressources : sectors.production = Production : From 4cbc4a0bca7c1bfe0e0ea72674202d65616582bc Mon Sep 17 00:00:00 2001 From: NgLam is SIMP <33188123+NgLamVN@users.noreply.github.com> Date: Mon, 1 Nov 2021 20:31:34 +0700 Subject: [PATCH 3/5] Update Vietnamese translation for V7 (#6246) --- core/assets/bundles/bundle_vi.properties | 101 ++++++++++++++++++----- 1 file changed, 80 insertions(+), 21 deletions(-) diff --git a/core/assets/bundles/bundle_vi.properties b/core/assets/bundles/bundle_vi.properties index 53d47d8f21..24f859c862 100644 --- a/core/assets/bundles/bundle_vi.properties +++ b/core/assets/bundles/bundle_vi.properties @@ -78,13 +78,12 @@ schematic.tagexists = Thẻ đã tồn tại. stats = Thống kê stat.wave = Đợt đã vượt qua:[accent] {0} +stat.unitsCreated = Quân lính đã tạo:[accent] {0} stat.enemiesDestroyed = Kẻ thù bị tiêu diệt:[accent] {0} stat.built = Số công trình đã xây dựng:[accent] {0} stat.destroyed = Số công trình đã bị phá:[accent] {0} stat.deconstructed = Số công trình được xây dựng lại:[accent] {0} -stat.delivered = Lượng tài nguyên được phóng: stat.playtime = Thời gian chơi:[accent] {0} -stat.rank = Xếp hạng: [accent]{0} globalitems = [accent]Toàn bộ vật phẩm map.delete = Bạn có chắc chắn muốn xóa bản đồ "[accent]{0}[]"? @@ -94,6 +93,7 @@ level.mode = Chế độ: coreattack = < Căn cứ đang bị tấn công! > nearpoint = [[ [scarlet]RỜI KHỎI KHU VỰC ĐÁP NGAY LẬP TỨC[] ]\nsự hủy diệt sắp xảy ra database = Cơ sở dữ liệu +database.button = Cơ sở dữ liệu savegame = Lưu trò chơi loadgame = Tải lại màn chơi joingame = Tham gia trò chơi @@ -101,6 +101,7 @@ customgame = Tùy chỉnh newgame = Trò chơi mới none = none.found = [lightgray] +none.inmap = [lightgray] minimap = Bản đồ nhỏ position = Vị trí close = Đóng @@ -168,6 +169,7 @@ launchcore = Phóng căn cứ filename = Tên tệp: unlocked = Đã mở khóa nội dung mới! available = Đã có mục nghiên cứu mới! +unlock.incampaign = < Mở khóa trong chiến dịch để biết chi tiết > completed = [accent]Hoàn tất techtree = Tiến trình research.legacy = Dữ liệu nghiên cứu từ phiên bản[accent]5.0[] được tìm thấy.\nBạn có muốn [accent]tải dữ liệu này[], hoặc [accent]bỏ qua[] và bắt đầu nghiên cứu lại trong chiến dịch mới (khuyến nghị)? @@ -214,6 +216,7 @@ hosts.none = [lightgray]Không có máy chủ cục bộ nào được tìm th host.invalid = [scarlet]Không thể kết nối đến máy chủ. servers.local = Máy chủ cục bộ +servers.local.steam = Màn chơi hiện có & Máy chủ cục bộ servers.remote = Máy chủ tùy chỉnh servers.global = Máy chủ từ cộng đồng @@ -285,6 +288,7 @@ save.corrupted = Tệp bản lưu bị hỏng hoặc không hợp lệ! empty = on = Bật off = Tắt +save.search = Tìm kiếm màn chơi đã lưu... save.autosave = Tự động lưu: {0} save.map = Bản đồ: {0} save.wave = Đợt {0} @@ -315,7 +319,7 @@ data.invalid = Đây không phải dữ liệu trò chơi hợp lệ. data.import.confirm = Nhập dữ liệu bên ngoài sẽ ghi đè[scarlet] tất cả[] dữ liệu trò chơi hiện tại.\n[accent]Điều này không thể hoàn tác![]\n\nSau khi dữ liệu được nhập, trò chơi của bạn sẽ thoát ngay lập tức. quit.confirm = Bạn có chắc muốn thoát? loading = [accent]Đang tải... -reloading = [accent]Đang tải lại Mods... +downloading = [accent]Đang tải xuống... saving = [accent]Đang lưu... respawn = [accent][[{0}][] để hồi sinh tại căn cứ cancelbuilding = [accent][[{0}][] để hủy xây @@ -360,6 +364,7 @@ publish.confirm = Bạn có chắc chắn muốn xuất bản không?\n\n[lightg publish.error = Lỗi khi xuất bản: {0} steam.error = Không thể khởi chạy dịch vụ Steam.\nLỗi: {0} +editor.cliffs = Chuyển tường thành vách đá editor.brush = Kích thước editor.openin = Mở trong trình chỉnh sửa editor.oregen = Cấu trúc quặng @@ -375,6 +380,13 @@ editor.ingame = Chỉnh sửa trong trò chơi editor.publish.workshop = Xuất bản lên Workshop editor.newmap = Bản đồ mới editor.center = Trung tâm +editor.search = Tìm kiếm bản đồ... +editor.filters = Lọc bản đồ +editor.filters.mode = Chế độ: +editor.filters.type = Kiểu bản đồ: +editor.filters.search = Tìm kiếm trongtrong: +editor.filters.author = Tác giả +editor.filters.description = Miêu tả workshop = Workshop waves.title = Đợt waves.remove = Xóa @@ -383,6 +395,7 @@ waves.waves = đợt waves.perspawn = mỗi lần xuất hiện waves.shields = khiên/đợt waves.to = đến +waves.max = Số lượng quân lính tối đa waves.guardian = Boss waves.preview = Xem trước waves.edit = Chỉnh sửa... @@ -391,6 +404,13 @@ waves.load = Lấy từ bộ nhớ tạm waves.invalid = Lượt không hợp lệ trong bộ nhớ tạm. waves.copied = Đã sao chép lượt. waves.none = Không có kẻ thù được xác định.\nLưu ý rằng bố cục mỗi đợt trống sẽ tự động được thay thế bằng bố cục mặc định. +waves.sort = Sắp xếp theo +waves.sort.reverse = Đảo ngược sắp xếp +waves.sort.begin = Bắt đầu +waves.sort.health = Máu +waves.sort.type = Thể loại +waves.units.hide = Ẩn tất cả +waves.units.show = Hiện tất cả #these are intentionally in lower case wavemode.counts = số lượng @@ -400,6 +420,7 @@ wavemode.health = máu editor.default = [lightgray] details = Chi tiết... edit = Chỉnh sửa... +variables = Thông số editor.name = Tên: editor.spawn = Thêm kẻ địch editor.removeunit = Xóa kẻ địch @@ -537,6 +558,7 @@ configure = Tùy chỉnh vật phẩm loadout = Vật phẩm resources = Tài nguyên bannedblocks = Khối bị cấm +bannedunits = Quân lính bị cấm addall = Thêm tất cả launch.from = Đang phóng từ: [accent]{0} launch.destination = Đích đến: {0} @@ -561,10 +583,13 @@ weather.sandstorm.name = Bão cát weather.sporestorm.name = Bão bào tử weather.fog.name = Sương mù +sectorlist = Khu vực +sectorlist.attacked = {0} đang bị tấn công sectors.unexplored = [lightgray]Chưa được khám phá sectors.resources = Tài nguyên: sectors.production = Sản lượng: sectors.export = Xuất: +sectors.import = Nhập: sectors.time = Thời gian: sectors.threat = Mối đe dọa: sectors.wave = Đợt: @@ -632,6 +657,8 @@ sector.windsweptIslands.description = Xa hơn đường bờ biển là chuỗi sector.extractionOutpost.description = Một tiền đồn xa, được kẻ thù xây dựng với mục đích phóng nguồn lực sang các khu vực khác.\n\nCông nghệ vận tải xuyên ngành là điều cần thiết để chinh phục hơn nữa. Phá hủy căn cứ. Nghiên cứu bệ phóng của họ. sector.impact0078.description = Đây là tàn tích của tàu vận chuyển giữa các vì sao lần đầu tiên đi vào hệ thống này.\n\nLấy càng nhiều càng tốt từ đống đổ nát. Nghiên cứu bất kỳ công nghệ nguyên vẹn nào. sector.planetaryTerminal.description = Mục tiêu cuối cùng.\n\nCăn cứ ven biển này chứa một cấu trúc có khả năng phóng căn cứ tới các hành tinh địa phương. Nó được bảo vệ cực kỳ cẩn thận.\n\nSản xuất quân lính hải quân. Loại bỏ kẻ thù càng nhanh càng tốt. Nghiên cứu cấu trúc phóng. +sector.coastline.name = Coastline +sector.navalFortress.name = Naval Fortress status.burning.name = Cháy status.freezing.name = Đóng băng @@ -643,9 +670,11 @@ status.electrified.name = Electrified status.spore-slowed.name = Spore Slowed status.tarred.name = Tarred status.overclock.name = Overclock +status.overdrive.name = Overdrive status.shocked.name = Shock status.blasted.name = Nổ status.unmoving.name = Bất động +status.boss.name = Guardian settings.language = Ngôn ngữ settings.data = Dữ liệu trò chơi @@ -794,7 +823,7 @@ bullet.splashdamage = [stat]{0}[lightgray] sát thương diện rộng ~[stat] { bullet.incendiary = [stat]cháy bullet.homing = [stat]truy đuổi bullet.buildingdamage = [stat]{0}%[lightgray] sát thương khối -bullet.frag = [stat]phá mảnh +bullet.frags = [stat]phá mảnh bullet.lightning = [stat]{0}[lightgray]x tia chớp ~ [stat]{1}[lightgray] sát thương bullet.knockback = [stat]{0}[lightgray] bật lùi bullet.pierce = [stat]{0}[lightgray]x xuyên giáp @@ -806,6 +835,7 @@ bullet.reload = [stat]{0}[lightgray]x tốc độ bắn unit.blocks = Khối unit.blockssquared = Khối² unit.powersecond = đơn vị năng lượng/giây +unit.tilessecond = ô/giây unit.liquidsecond = đơn vị chất lỏng/giây unit.itemssecond = vật phẩm/giây unit.liquidunits = đơn vị chất lỏng @@ -831,20 +861,19 @@ category.items = Vật phẩm category.crafting = Vào/Sản phẩm category.function = Chức năng category.optional = Cải tiến +setting.skipcoreanimation.name = Bỏ qua hiệu ứng phóng/đáp căn cứcứ setting.landscape.name = Khóa ngang setting.shadows.name = Bóng đổ setting.blockreplace.name = Tự động đề xuất khối setting.linear.name = Lọc tuyến tính setting.hints.name = Gợi ý setting.logichints.name = Gợi ý Logic -setting.flow.name = Hiện thị tốc độ chuyền tài nguyên setting.backgroundpause.name = Tạm dừng trong nền setting.buildautopause.name = Tự động dừng xây dựng setting.doubletapmine.name = Nhấn đúp để Đào setting.modcrashdisable.name = Tắt các mod khi gặp sự cố trong khởi động setting.animatedwater.name = Hiệu ứng nước setting.animatedshields.name = Hiệu ứng khiên -setting.antialias.name = Khử răng cưa[lightgray] (yêu cầu khởi động lại)[] setting.playerindicators.name = Hướng người chơi setting.indicators.name = Hướng kẻ địch setting.autotarget.name = Tự động nhắm mục tiêu @@ -853,7 +882,8 @@ setting.touchscreen.name = Điều khiển bằng màn hình cảm ứng setting.fpscap.name = FPS tối đa setting.fpscap.none = Không giới hạn setting.fpscap.text = {0} FPS -setting.uiscale.name = Kích thước UI[lightgray] (yêu cầu khởi động lại)[] +setting.uiscale.name = Kích thước UI +setting.uiscale.description = Trò chơi sẽ khởi động lại để áp dụng các thay đổi. setting.swapdiagonal.name = Đặt luôn theo đường chéo setting.difficulty.training = Luyện tập setting.difficulty.easy = Dễ @@ -871,7 +901,9 @@ setting.saveinterval.name = Khoảng thời gian lưu setting.seconds = {0} giây setting.milliseconds = {0} mili giây setting.fullscreen.name = Toàn màn hình -setting.borderlesswindow.name = Không viền[lightgray] (yêu cầu khởi động lại) +setting.borderlesswindow.name = Không viền +setting.borderlesswindow.name.windows = Toàn màng hình (không viền) +setting.borderlesswindow.description = Trò chơi có thể sẽ khởi động lại để áp dụng các thay đổi setting.fps.name = Hiển thị FPS & Ping setting.smoothcamera.name = Chế độ mượt mà setting.vsync.name = VSync @@ -994,6 +1026,8 @@ rules.wavetimer = Đếm ngược đợt rules.waves = Đợt rules.attack = Chế độ tấn công rules.buildai = AI Xây dựng +rules.aitier = Cấp độ AI +rules.cleanupdeadteams = Xóa công trình của đội bị đánh bại (PvP) rules.corecapture = Chiếm căn cứ khi phá hủy rules.polygoncoreprotection = Bảo vệ lõi kiểu đa giác. rules.enemyCheat = Tài nguyên vô hạn (kẻ địch) @@ -1012,12 +1046,15 @@ rules.deconstructrefundmultiplier = Hệ số số vật phẩm hoàn lại khi rules.waitForWaveToEnd = Đợt chờ hết kẻ địch rules.dropzoneradius = Bán kính vùng thả:[lightgray] (ô) rules.unitammo = Quân lính cần đạn +rules.enemyteam = Đội quân địch +rules.playerteam = Đội người chơi rules.title.waves = Đợt rules.title.resourcesbuilding = Tài nguyên & Xây dựng rules.title.enemy = Kẻ địch rules.title.unit = Quân lính rules.title.experimental = Thực nghiệm rules.title.environment = Môi trường +rules.title.teams = Đội rules.lighting = Ánh sáng rules.enemyLights = Đèn địch rules.fire = Lửa @@ -1096,13 +1133,13 @@ unit.reign.name = Reign unit.vela.name = Vela unit.corvus.name = Corvus -block.resupply-point.name = Điểm tiếp tế block.parallax.name = Parallax block.cliff.name = Vách đá block.sand-boulder.name = Tường cát block.basalt-boulder.name = Tường đá basalt block.grass.name = Cỏ block.molten-slag.name = Xỉ nóng chảy +block.pooled-cryofluid.name = Chất làm lạnh block.space.name = Không gian block.salt.name = Muối block.salt-wall.name = Tường muối @@ -1136,6 +1173,7 @@ block.core-nucleus.name = Căn cứ: Trung tâm block.deep-water.name = Nước sâu block.shallow-water.name = Nước block.tainted-water.name = Nước nhiểm bẩn +block.deep-tainted-water.name = Nước nhiểm bẩn sâu block.darksand-tainted-water.name = Nước nhiễm bẩn cát đen block.tar.name = Dầu block.stone.name = Đá @@ -1263,6 +1301,7 @@ block.plated-conduit.name = Ống dẫn bọc giáp block.phase-conduit.name = Ống dẫn Phase block.liquid-router.name = Bộ phân phát chất lỏng block.liquid-tank.name = Thùng chất lỏng +block.liquid-container.name = Bình chất lỏng block.liquid-junction.name = Giao điểm chất lỏng block.bridge-conduit.name = Cầu dẫn chất lỏng block.rotary-pump.name = Bơm điện @@ -1288,7 +1327,6 @@ block.meltdown.name = Meltdown block.foreshadow.name = Foreshadow block.container.name = Container block.launch-pad.name = Bệ phóng -block.launch-pad-large.name = Bệ phóng lớn block.segment.name = Segment block.command-center.name = Trung tâm chỉ huy block.ground-factory.name = Nhà máy bộ binh @@ -1303,17 +1341,23 @@ block.payload-router.name = Bộ định tuyến khối hàng block.duct.name = Duct block.duct-router.name = Duct Router block.duct-bridge.name = Duct Bridge -block.payload-propulsion-tower.name = Payload Propulsion Tower +block.payload-propulsion-tower.name = Tháp đẩy khối hàng block.payload-void.name = Payload Void block.payload-source.name = Payload Source block.disassembler.name = Máy phân tách lớn block.silicon-crucible.name = Máy nấu Silicon lớn block.overdrive-dome.name = Máy tăng tốc lớn -#experimental, may be removed -block.block-forge.name = Block Forge -block.block-loader.name = Block Loader -block.block-unloader.name = Điểm dỡ hàng block.interplanetary-accelerator.name = Máy gia tốc liên hành tinh +block.constructor.name = Máy chế tạo +block.constructor.description = Chế tạo các khối có kích thước 2x2 ô. +block.large-constructor.name = Máy chế tạo lớn +block.large-constructor.description = Chế tạo các khối có kích thước lên đến 4x4 ô. +block.deconstructor.name = Máy tháo dỡ +block.deconstructor.description = Tháo dỡ khối và quân lính, trả lại 100% nguyên liệu. +block.payload-loader.name = Payload Loader +block.payload-loader.description = Nạp chất lỏng và vật phẩm vào khối. +block.payload-unloader.name = Payload Unloader +block.payload-unloader.description = Lấy chất lỏng và vật phẩm từ khối. block.switch.name = Công tắc block.micro-processor.name = Bộ xử lí nhỏ @@ -1348,6 +1392,7 @@ hint.placeTurret = Đặt \uf861 [accent]Súng[] để bảo vệ căn cứ củ hint.breaking = [accent]Chuột phải[] và kéo để phá vỡ các khối. hint.breaking.mobile = Kích hoạt \ue817 [accent]Cây búa[] ở phía dưới cùng bên phải và nhấn để phá vỡ các khối.\n\nGiữ ngón tay của bạn trong một giây và kéo để phá khối trong vùng được chọn. hint.blockInfo = Xem thông tin của một khối bằng cách chọn nó trong [accent]menu xây dựng[], Sau đó chọn nút [accent][[?][] ở bên phải. +hint.derelict = [accent]Derelict[] structures are broken remnants of old bases that no longer function.\n\nThese structures can be [accent]deconstructed[] for resources. hint.research = Sử dụng nút \ue875 [accent]Nghiên cứu[] để nghiên cứu công nghệ mới. hint.research.mobile = Sử dụng nút \ue875 [accent]Nghiên cứu[] trong \ue88c [accent]Menu[] để nghiên cứu công nghệ mới. hint.unitControl = Giữ [accent][[L-ctrl][] và [accent]click[] để điều khiển quân lính của bạn hoặc súng. @@ -1369,6 +1414,7 @@ hint.generator = \uf879 [accent]Máy phát điện đốt cháy[] đốt than v hint.guardian = [accent]Boss[] được bọc giáp. Sử dụng loại đạn yếu chẳng hạn như [accent]Đồng[] và [accent]Chì[] là [scarlet]không hiệu quả[].\n\nSử dụng súng tiên tiến hơn hoặc sử dụng \uf835 [accent]Than chì làm đạn [] \uf861Duo/\uf859Salvo đạn dược để hạ gục Boss. hint.coreUpgrade = Các căn cứ có thể được nâng cấp bằng cách [accent]đặt căn cứ cấp cao hơn trên chúng[].\n\nĐặt một căn cứ  [accent]Trụ sở[] trên căn cứ  [accent]Cơ sở[]. Đảm bảo không có vật cản gần đó. hint.presetLaunch = Khác khu vực đáp [accent] xám[], như [accent]Frozen Forest[], có thể được phóng đến từ bất cứ đâu. Nó không yêu cầu chiếm các khu vực lân cận.\n\n[accent]Các khu vực được đánh số[], chẳng hạn như cái này, là [accent]không bắt buộc[]. +hint.presetDifficulty = This sector has a [scarlet]high enemy threat level[].\nLaunching to such sectors is [accent]not recommended[] without proper technology and preparation. hint.coreIncinerate = Sau khi căn cứ đầy vật phẩm, bất kì vật phẩm vào thuộc loại đó nhận được sẽ bị [accent]tiêu hủy[]. hint.coopCampaign = Khi chơi chiến dịch[accent]co-op[], các vật phẩm được sản xuất trong bản đồ hiện tại cũng sẽ được gửi [accent]đến các khu vực của bạn[].\n\nBất kỳ nghiên cứu mới nào được thực hiện đều được lưu lại. @@ -1399,7 +1445,7 @@ liquid.slag.description = Dùng để tách các kim loại, hoặc phun vào k liquid.oil.description = Dùng trong sản xuất vật liệu tiên tiến và làm đạn gây cháy. liquid.cryofluid.description = Dùng làm chất làm mát trong lò phản ứng, súng và nhà máy. -block.resupply-point.description = Cung cấp đạn đồng cho các quân lính ở gần. Không tương thích với quân lính sử dụng điện. +block.derelict =  [lightgray]Derelict block.armored-conveyor.description = Vận chuyển vật phẩm về phía trước. Không nhận đầu vào từ phía bên cạnh. block.illuminator.description = Phát sáng. block.message.description = Lưu trữ tin nhắn giao tiếp giữa đồng đội. @@ -1425,6 +1471,8 @@ block.item-source.description = Tạo ra vật phẩm mãi mãi. Chỉ có trong block.item-void.description = Hủy mọi vật phẩm. Chỉ có trong chế độ tự do. block.liquid-source.description = Tạo ra chất lỏng mãi mãi. Chỉ có trong chế độ tự do. block.liquid-void.description = Loại bỏ mọi chất lỏng. Chỉ có trong chế độ tự do. +block.payload-source.description = Tạo ra bất kì khối hàng nào. Chỉ có trong chế độ tự do. +block.payload-void.description = Phá hủy bất kì khối hàng nào. Chỉ có trong chế độ tự do. block.copper-wall.description = Bảo vệ các công trình khỏi đạn của kẻ thù. block.copper-wall-large.description = Bảo vệ nhiều công trình khỏi đạn của kẻ thù. block.titanium-wall.description = Bảo vệ các công trình khỏi đạn của kẻ thù. @@ -1465,7 +1513,8 @@ block.conduit.description = Đẩy chất lỏng đến trước, dùng với b block.pulse-conduit.description = Đẩy chất lỏng đến trước, vận chuyển nhanh và trữ nhiều hơn so với ống tiêu chuẩn. block.plated-conduit.description = Đẩy chất lỏng đến trước, không nhận đầu vào ở bên, không bị rò rỉ. block.liquid-router.description = Nhận chất lỏng từ một phía và đưa đều ra ba phía còn lại. Có thể trữ một lượng chất lỏng nhất định. -block.liquid-tank.description = Trữ được nhiều chất lỏng. Đưa đều ra mọi phía như bộ phân nhánh chất lỏng. +block.liquid-tank.description = Trữ được một lượng lớn chất lỏng. Đưa đều ra mọi phía như bộ phân phát chất lỏng. +block.liquid-container.description = Lưu trữ một lượng vừa phải chất lỏng. Đưa đều ra mọi phía như bộ phân phát chất lỏng. block.liquid-junction.description = Chức năng như cầu cho hai ống nước băng chéo nhau. block.bridge-conduit.description = Vận chuyển chất lỏng qua nhiều loại địa hình hoặc công trình. block.phase-conduit.description = Vận chuyển chất lỏng qua địa hình hoặc công trình. Phạm vi dài hơn cầu nối, nhưng cần năng lượng. @@ -1543,6 +1592,8 @@ block.memory-bank.description = Lưu trữ thông tin cho bộ xử lí. Dung l block.logic-display.description = Hiển thị đồ họa tùy ý từ bộ xử lí. block.large-logic-display.description = Hiển thị đồ họa tùy ý từ bộ xử lí. block.interplanetary-accelerator.description = Tòa súng từ trường cỡ lớn. Tăng tốc vật phóng đến vận tốc thoát để di chuyển giữa các hành tinh. +block.repair-turret.description = Sửa chữa những quân lính bị hư hỏng trong khu vực nhất địnhđịnh. Có thể làm mát để tăng hiệu quả. +block.payload-propulsion-tower.description = Cơ cấu vận chuyển các khối hàng tầm xa. Bắn khối hàng cho các tháp đẩy khối hàng kháckhác. unit.dagger.description = Bắn đạn tiêu chuẩn vào tất cả kẻ địch xung quanh. unit.mace.description = Phun lửa vào tất cả kẻ địch xung quanh. @@ -1577,6 +1628,11 @@ unit.omura.description = Bắn đạn từ trường xuyên giáp tầm xa vào unit.alpha.description = Bảo vệ căn cứ cơ sở khỏi kẻ thù. Có thể xây dựng. unit.beta.description = Bảo vệ căn cứ trụ sở khỏi kẻ thù. Có thể xây dựng. unit.gamma.description = Bảo vệ căn cứ trung tâm khỏi kẻ thù. Có thể xây dựng. +unit.retusa.description = Fires homing torpedoes at nearby enemies. Repairs allied units. +unit.oxynoe.description = Fires structure-repairing streams of flame at nearby enemies. Targets nearby enemy projectiles with a point defense turret. +unit.cyerce.description = Fires seeking cluster-missiles at enemies. Repairs allied units. +unit.aegires.description = Shocks all enemy units and structures that enter its energy field. Repairs all allies. +unit.navanax.description = Fires explosive EMP projectiles, dealing significant damage to enemy power networks and repairing allied structures. Melts nearby enemies with 4 autonomous laser turrets. lst.read = Đọc một số từ bộ nhớ được liên kết. lst.write = Ghi một số vào bộ nhớ được liên kết. @@ -1591,6 +1647,8 @@ lst.sensor = Lấy dữ liệu từ một khối hoặc quân lính. lst.set = Đặt một biến. lst.operation = Thực hiện thao tác trên 1-2 biến. lst.end = Chuyển đến lệnh đầu tiên. +lst.wait = Chờ trong khoảng thời gian nhất định. +lst.lookup = Look up an item/liquid/unit/block type by ID.\nTotal counts of each type can be accessed with:\n[accent]@unitCount[] / [accent]@itemCount[] / [accent]@liquidCount[] / [accent]@blockCount[] lst.jump = Chuyển qua lệnh khác nếu điều kiện đúng. lst.unitbind = Bind to the next unit of a type, and store it in [accent]@unit[]. lst.unitcontrol = Control the currently bound unit. @@ -1689,13 +1747,13 @@ sensor.in = The building/unit to sense. radar.from = Building to sense from.\nSensor range is limited by building range. radar.target = Filter for units to sense. radar.and = Additional filters. -radar.order = Sorting order. 0 to reverse. +radar.order = Sắp xếp theo thứ tự. đặt giá trị 0 để đảo ngược. radar.sort = Metric to sort results by. radar.output = Variable to write output unit to. unitradar.target = Filter for units to sense. unitradar.and = Additional filters. -unitradar.order = Sorting order. 0 to reverse. +unitradar.order = Sắp xếp theo thứ tự. đặt giá trị 0 để đảo ngược. unitradar.sort = Metric to sort results by. unitradar.output = Variable to write output unit to. @@ -1706,8 +1764,8 @@ control.shoot = Whether to shoot. unitlocate.enemy = Whether to locate enemy buildings. unitlocate.found = Whether the object was found. unitlocate.building = Output variable for located building. -unitlocate.outx = Output X coordinate. -unitlocate.outy = Output Y coordinate. +unitlocate.outx = Cho ra tọa độ X. +unitlocate.outy = Cho ra tọa độ Y. unitlocate.group = Building group to look for. lenum.idle = Không di chuyển, nhưng vẫn xây dựng/đào.\nTrạng thái mặc định. @@ -1721,6 +1779,7 @@ lenum.itemdrop = Thả vật phẩm. lenum.itemtake = Lấy vật phẩm từ khối. lenum.paydrop = Thả khối hàng hiện tại. lenum.paytake = Nhất khối hàng tại vị trí hiện tại. +lenum.payenter = Enter/land on the payload block the unit is on. lenum.flag = Numeric unit flag. lenum.mine = Đào tại vị trí. lenum.build = Xây công trình. From 13d16f1883da0140e091aa6cc67bea2f4fb80ab5 Mon Sep 17 00:00:00 2001 From: Darkness#3729 <79508138+Darkness6030@users.noreply.github.com> Date: Mon, 1 Nov 2021 16:32:22 +0300 Subject: [PATCH 4/5] InvalidCommandHandler (#6247) * InvalidCommandHandler * Update NetClient.java * Add player * And here * :thonk: * And this * Update NetClient.java --- core/src/mindustry/core/NetClient.java | 29 +++---------------------- core/src/mindustry/core/NetServer.java | 30 ++++++++++++++++++++++++++ 2 files changed, 33 insertions(+), 26 deletions(-) diff --git a/core/src/mindustry/core/NetClient.java b/core/src/mindustry/core/NetClient.java index ce2498792a..e7f69c8eb4 100644 --- a/core/src/mindustry/core/NetClient.java +++ b/core/src/mindustry/core/NetClient.java @@ -260,33 +260,10 @@ public class NetClient implements ApplicationListener{ //a command was sent, now get the output if(response.type != ResponseType.valid){ - String text; - - //send usage - if(response.type == ResponseType.manyArguments){ - text = "[scarlet]Too many arguments. Usage:[lightgray] " + response.command.text + "[gray] " + response.command.paramText; - }else if(response.type == ResponseType.fewArguments){ - text = "[scarlet]Too few arguments. Usage:[lightgray] " + response.command.text + "[gray] " + response.command.paramText; - }else{ //unknown command - int minDst = 0; - Command closest = null; - - for(Command command : netServer.clientCommands.getCommandList()){ - int dst = Strings.levenshtein(command.text, response.runCommand); - if(dst < 3 && (closest == null || dst < minDst)){ - minDst = dst; - closest = command; - } - } - - if(closest != null){ - text = "[scarlet]Unknown command. Did you mean \"[lightgray]" + closest.text + "[]\"?"; - }else{ - text = "[scarlet]Unknown command. Check [lightgray]/help[scarlet]."; - } + String text = netServer.invalidHandler.handle(player, response); + if(text != null){ + player.sendMessage(text); } - - player.sendMessage(text); } } } diff --git a/core/src/mindustry/core/NetServer.java b/core/src/mindustry/core/NetServer.java index 9a72f7ad51..8c8498c03f 100644 --- a/core/src/mindustry/core/NetServer.java +++ b/core/src/mindustry/core/NetServer.java @@ -67,6 +67,32 @@ public class NetServer implements ApplicationListener{ /** Converts a message + NULLABLE player sender into a single string. Override for custom prefixes/suffixes. */ public ChatFormatter chatFormatter = (player, message) -> player == null ? message : "[coral][[" + player.coloredName() + "[coral]]:[white] " + message; + /** Handles an incorrect command response. Returns text that will be sent to player. Override for customisation. */ + public InvalidCommandHandler invalidHandler = (player, response) -> { + if(response.type == ResponseType.manyArguments){ + return "[scarlet]Too many arguments. Usage:[lightgray] " + response.command.text + "[gray] " + response.command.paramText; + }else if(response.type == ResponseType.fewArguments){ + return "[scarlet]Too few arguments. Usage:[lightgray] " + response.command.text + "[gray] " + response.command.paramText; + }else{ //unknown command + int minDst = 0; + Command closest = null; + + for(Command command : netServer.clientCommands.getCommandList()){ + int dst = Strings.levenshtein(command.text, response.runCommand); + if(dst < 3 && (closest == null || dst < minDst)){ + minDst = dst; + closest = command; + } + } + + if(closest != null){ + return "[scarlet]Unknown command. Did you mean \"[lightgray]" + closest.text + "[]\"?"; + }else{ + return "[scarlet]Unknown command. Check [lightgray]/help[scarlet]."; + } + } + }; + private boolean closing = false; private Interval timer = new Interval(); @@ -994,4 +1020,8 @@ public class NetServer implements ApplicationListener{ /** @return text to be placed before player name */ String format(@Nullable Player player, String message); } + + public interface InvalidCommandHandler{ + String handle(Player player, CommandResponse response); + } } From 450f651c8fb313d0092fe201314582af3ef64ad9 Mon Sep 17 00:00:00 2001 From: Yuri Polyakov <86189625+Kowkodivka@users.noreply.github.com> Date: Mon, 1 Nov 2021 20:32:57 +0700 Subject: [PATCH 5/5] Update bundle_ru.properties (#6267) * Update bundle_ru.properties * Update bundle_ru.properties --- core/assets/bundles/bundle_ru.properties | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/core/assets/bundles/bundle_ru.properties b/core/assets/bundles/bundle_ru.properties index 32bc7153af..3c3797e52b 100644 --- a/core/assets/bundles/bundle_ru.properties +++ b/core/assets/bundles/bundle_ru.properties @@ -391,6 +391,11 @@ waves.every = каждый waves.waves = волна(ы) waves.perspawn = за появление waves.shields = ед. щита/волну +waves.sort = Сортировать по +waves.sort.reverse = Обратная сортировка +waves.sort.begin = Начало +waves.sort.health = Здоровье +waves.sort.type = Тип waves.to = до waves.max = максимум единиц waves.guardian = Страж @@ -895,6 +900,7 @@ setting.seconds = {0} секунд setting.milliseconds = {0} миллисекунд setting.fullscreen.name = Полноэкранный режим setting.borderlesswindow.name = Безрамочное окно +setting.borderlesswindow.description = Для вступления изменений в силу может потребоваться перезагрузка игры. setting.fps.name = Показывать FPS и пинг setting.smoothcamera.name = Плавная камера setting.vsync.name = Вертикальная синхронизация @@ -1513,7 +1519,7 @@ block.liquid-router.description = Принимает жидкости из од block.liquid-tank.description = Хранит большое количество жидкости. Выводит жидкости во все стороны, подобно жидкостному маршрутизатору. block.liquid-junction.description = Действует как мост для двух пересекающихся трубопроводов. block.bridge-conduit.description = Перемещает жидкости над любой местностью или зданиями. -block.liquid-container.description = Хранит большое количество жидкости. Выводит их во все стороны, как жидкостный маршрутизатор. +block.liquid-container.description = Хранит небольшое количество жидкости. Выводит жидкости во все стороны, подобно жидкостному маршрутизатору. block.phase-conduit.description = Перемещает жидкости над любой местностью или зданиями. Большая дистанция, чем у жидкостного моста, но требует энергию. block.power-node.description = Передает питание на подключенные узлы. Узел будет получать питание или поставлять питание на любые соседние блоки. block.power-node-large.description = Усовершенствованный силовой узел с большей дальностью.