diff --git a/core/assets/bundles/bundle.properties b/core/assets/bundles/bundle.properties index dd05f308e9..096c35d7b1 100644 --- a/core/assets/bundles/bundle.properties +++ b/core/assets/bundles/bundle.properties @@ -620,6 +620,7 @@ setting.milliseconds = {0} milliseconds setting.fullscreen.name = Fullscreen setting.borderlesswindow.name = Borderless Window[lightgray] (may require restart) setting.fps.name = Show FPS & Ping +setting.blockselectkeys.name = Show Block Select Keys setting.vsync.name = VSync setting.pixelate.name = Pixelate[lightgray] (disables animations) setting.minimap.name = Show Minimap @@ -648,6 +649,7 @@ category.multiplayer.name = Multiplayer command.attack = Attack command.rally = Rally command.retreat = Retreat +placement.blockselectkeys = \n[lightgray]Key: [{0}, keybind.clear_building.name = Clear Building keybind.press = Press a key... keybind.press.axis = Press an axis or key... @@ -661,10 +663,10 @@ keybind.schematic_flip_x.name = Flip Schematic X keybind.schematic_flip_y.name = Flip Schematic Y keybind.category_prev.name = Previous Category keybind.category_next.name = Next Category -keybind.block_select_left = Block Select Left -keybind.block_select_right = Block Select Right -keybind.block_select_up = Block Select Up -keybind.block_select_down = Block Select Down +keybind.block_select_left.name = Block Select Left +keybind.block_select_right.name = Block Select Right +keybind.block_select_up.name = Block Select Up +keybind.block_select_down.name = Block Select Down keybind.block_select_01.name = Category/Block Select 1 keybind.block_select_02.name = Category/Block Select 2 keybind.block_select_03.name = Category/Block Select 3 @@ -1016,7 +1018,7 @@ unit.reaper.name = Reaper tutorial.next = [lightgray] tutorial.intro = You have entered the[scarlet] Mindustry Tutorial.[]\nUse [[WASD] to move.\n[accent] Hold [[Ctrl] while scrolling[] to zoom in and out.\nBegin by[accent] mining copper[]. Move close to it, then tap a copper ore vein near your core to do this.\n\n[accent]{0}/{1} copper tutorial.intro.mobile = You have entered the[scarlet] Mindustry Tutorial.[]\nSwipe the screen to move.\n[accent] Pinch with 2 fingers [] to zoom in and out.\nBegin by[accent] mining copper[]. Move close to it, then tap a copper ore vein near your core to do this.\n\n[accent]{0}/{1} copper -tutorial.drill = Mining manually is inefficient.\n[accent]Drills[] can mine automatically.\nClick the drill tab in the bottom right.\nSelect the [accent]mechanical drill[]. Place it on a copper vein by clicking.\nYou can also select the drill by tapping [accent][[2][] then [accent][[1][] quickly, regardless of what tab is open.\n[accent]Right-click[] to stop building. +tutorial.drill = Mining manually is inefficient.\n[accent]Drills[] can mine automatically.\nClick the drill tab in the bottom right.\nSelect the[accent] mechanical drill[]. Place it on a copper vein by clicking.\nYou can also select the drill by tapping [accent][[2][] then [accent][[1][] quickly, regardless of what tab is open.\n[accent]Right-click[] to stop building. tutorial.drill.mobile = Mining manually is inefficient.\n[accent]Drills []can mine automatically.\nTap the drill tab in the bottom right.\nSelect the[accent] mechanical drill[].\nPlace it on a copper vein by tapping, then press the[accent] checkmark[] below to confirm your selection.\nPress the[accent] X button[] to cancel placement. tutorial.blockinfo = Each block has different stats. Each drill can only mine certain ores.\nTo check a block's info and stats,[accent] tap the "?" button while selecting it in the build menu.[]\n\n[accent]Access the Mechanical Drill's stats now.[] tutorial.conveyor = [accent]Conveyors[] are used to transport items to the core.\nMake a line of conveyors from the drill to the core.\n[accent]Hold down the mouse to place in a line.[]\nHold[accent] CTRL[] while selecting a line to place diagonally.\nUse the scrollwheel to rotate blocks before placing them.\n[accent]Place 2 conveyors with the line tool, then deliver an item into the core. diff --git a/core/src/io/anuke/mindustry/content/Blocks.java b/core/src/io/anuke/mindustry/content/Blocks.java index cb1af2d0a0..cdf7e11e95 100644 --- a/core/src/io/anuke/mindustry/content/Blocks.java +++ b/core/src/io/anuke/mindustry/content/Blocks.java @@ -79,7 +79,7 @@ public class Blocks implements ContentList{ dartPad, deltaPad, tauPad, omegaPad, javelinPad, tridentPad, glaivePad, //sandbox - powerVoid, powerSource, itemSource, liquidSource, itemVoid, message; + powerSource, powerVoid, itemSource, itemVoid, liquidSource, message; @Override public void load(){ @@ -1781,11 +1781,11 @@ public class Blocks implements ContentList{ //endregion //region sandbox - powerVoid = new PowerVoid("power-void"){{ + powerSource = new PowerSource("power-source"){{ requirements(Category.power, BuildVisibility.sandboxOnly, ItemStack.with()); alwaysUnlocked = true; }}; - powerSource = new PowerSource("power-source"){{ + powerVoid = new PowerVoid("power-void"){{ requirements(Category.power, BuildVisibility.sandboxOnly, ItemStack.with()); alwaysUnlocked = true; }}; diff --git a/core/src/io/anuke/mindustry/ui/dialogs/SettingsMenuDialog.java b/core/src/io/anuke/mindustry/ui/dialogs/SettingsMenuDialog.java index 9da6eabfe3..5f21305233 100644 --- a/core/src/io/anuke/mindustry/ui/dialogs/SettingsMenuDialog.java +++ b/core/src/io/anuke/mindustry/ui/dialogs/SettingsMenuDialog.java @@ -298,6 +298,9 @@ public class SettingsMenuDialog extends SettingsDialog{ graphics.checkPref("minimap", !mobile); graphics.checkPref("position", false); graphics.checkPref("fps", false); + if(!mobile){ + graphics.checkPref("blockselectkeys", true); + } graphics.checkPref("indicators", true); graphics.checkPref("animatedwater", !mobile); if(Shaders.shield != null){ diff --git a/core/src/io/anuke/mindustry/ui/fragments/PlacementFragment.java b/core/src/io/anuke/mindustry/ui/fragments/PlacementFragment.java index d92cec1454..2e0ef60a4c 100644 --- a/core/src/io/anuke/mindustry/ui/fragments/PlacementFragment.java +++ b/core/src/io/anuke/mindustry/ui/fragments/PlacementFragment.java @@ -26,7 +26,7 @@ import static io.anuke.mindustry.Vars.*; public class PlacementFragment extends Fragment{ final int rowWidth = 4; - public Category currentCategory = Category.turret; + public Category currentCategory = Category.distribution; Array returnArray = new Array<>(); Array returnCatArray = new Array<>(); boolean[] categoryEmpty = new boolean[Category.all.length]; @@ -253,13 +253,14 @@ public class PlacementFragment extends Fragment{ lastGround = false; topTable.table(header -> { - String keyCombo = new String(); - if(!mobile){ - keyCombo = " [accent][" + Core.keybinds.get(blockSelect[currentCategory.ordinal()]).key.toString(); + String keyCombo = ""; + if(!mobile && Core.settings.getBool("blockselectkeys")){ Array blocks = getByCategory(currentCategory); for(int i = 0; i < blocks.size; i++){ if(blocks.get(i) == lastDisplay){ - keyCombo += (i < 10 ? "" : "," + Core.keybinds.get(blockSelect[(i + 1) / 10 - 1]).key.toString()) + "," + Core.keybinds.get(blockSelect[i % 10]).key.toString() + "]"; + keyCombo = Core.bundle.format("placement.blockselectkeys", Core.keybinds.get(blockSelect[currentCategory.ordinal()]).key.toString()) + + (i < 10 ? "" : Core.keybinds.get(blockSelect[(i + 1) / 10 - 1]).key.toString() + ",") + + Core.keybinds.get(blockSelect[i % 10]).key.toString() + "]"; break; } } @@ -267,7 +268,7 @@ public class PlacementFragment extends Fragment{ final String keyComboFinal = keyCombo; header.left(); header.add(new Image(lastDisplay.icon(Cicon.medium))).size(8 * 4); - header.labelWrap(() -> !unlocked(lastDisplay) ? Core.bundle.get("block.unknown") : lastDisplay.localizedName + (mobile ? "" : keyComboFinal)) + header.labelWrap(() -> !unlocked(lastDisplay) ? Core.bundle.get("block.unknown") : lastDisplay.localizedName + keyComboFinal) .left().width(190f).padLeft(5); header.add().growX(); if(unlocked(lastDisplay)){