Add 'Show Block Select Keys' graphics option, implement requested changes
This commit is contained in:
@@ -620,6 +620,7 @@ setting.milliseconds = {0} milliseconds
|
|||||||
setting.fullscreen.name = Fullscreen
|
setting.fullscreen.name = Fullscreen
|
||||||
setting.borderlesswindow.name = Borderless Window[lightgray] (may require restart)
|
setting.borderlesswindow.name = Borderless Window[lightgray] (may require restart)
|
||||||
setting.fps.name = Show FPS & Ping
|
setting.fps.name = Show FPS & Ping
|
||||||
|
setting.blockselectkeys.name = Show Block Select Keys
|
||||||
setting.vsync.name = VSync
|
setting.vsync.name = VSync
|
||||||
setting.pixelate.name = Pixelate[lightgray] (disables animations)
|
setting.pixelate.name = Pixelate[lightgray] (disables animations)
|
||||||
setting.minimap.name = Show Minimap
|
setting.minimap.name = Show Minimap
|
||||||
@@ -648,6 +649,7 @@ category.multiplayer.name = Multiplayer
|
|||||||
command.attack = Attack
|
command.attack = Attack
|
||||||
command.rally = Rally
|
command.rally = Rally
|
||||||
command.retreat = Retreat
|
command.retreat = Retreat
|
||||||
|
placement.blockselectkeys = \n[lightgray]Key: [{0},
|
||||||
keybind.clear_building.name = Clear Building
|
keybind.clear_building.name = Clear Building
|
||||||
keybind.press = Press a key...
|
keybind.press = Press a key...
|
||||||
keybind.press.axis = Press an axis or 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.schematic_flip_y.name = Flip Schematic Y
|
||||||
keybind.category_prev.name = Previous Category
|
keybind.category_prev.name = Previous Category
|
||||||
keybind.category_next.name = Next Category
|
keybind.category_next.name = Next Category
|
||||||
keybind.block_select_left = Block Select Left
|
keybind.block_select_left.name = Block Select Left
|
||||||
keybind.block_select_right = Block Select Right
|
keybind.block_select_right.name = Block Select Right
|
||||||
keybind.block_select_up = Block Select Up
|
keybind.block_select_up.name = Block Select Up
|
||||||
keybind.block_select_down = Block Select Down
|
keybind.block_select_down.name = Block Select Down
|
||||||
keybind.block_select_01.name = Category/Block Select 1
|
keybind.block_select_01.name = Category/Block Select 1
|
||||||
keybind.block_select_02.name = Category/Block Select 2
|
keybind.block_select_02.name = Category/Block Select 2
|
||||||
keybind.block_select_03.name = Category/Block Select 3
|
keybind.block_select_03.name = Category/Block Select 3
|
||||||
@@ -1016,7 +1018,7 @@ unit.reaper.name = Reaper
|
|||||||
tutorial.next = [lightgray]<Tap to continue>
|
tutorial.next = [lightgray]<Tap to continue>
|
||||||
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 = 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.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.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.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.
|
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.
|
||||||
|
|||||||
@@ -79,7 +79,7 @@ public class Blocks implements ContentList{
|
|||||||
dartPad, deltaPad, tauPad, omegaPad, javelinPad, tridentPad, glaivePad,
|
dartPad, deltaPad, tauPad, omegaPad, javelinPad, tridentPad, glaivePad,
|
||||||
|
|
||||||
//sandbox
|
//sandbox
|
||||||
powerVoid, powerSource, itemSource, liquidSource, itemVoid, message;
|
powerSource, powerVoid, itemSource, itemVoid, liquidSource, message;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void load(){
|
public void load(){
|
||||||
@@ -1781,11 +1781,11 @@ public class Blocks implements ContentList{
|
|||||||
//endregion
|
//endregion
|
||||||
//region sandbox
|
//region sandbox
|
||||||
|
|
||||||
powerVoid = new PowerVoid("power-void"){{
|
powerSource = new PowerSource("power-source"){{
|
||||||
requirements(Category.power, BuildVisibility.sandboxOnly, ItemStack.with());
|
requirements(Category.power, BuildVisibility.sandboxOnly, ItemStack.with());
|
||||||
alwaysUnlocked = true;
|
alwaysUnlocked = true;
|
||||||
}};
|
}};
|
||||||
powerSource = new PowerSource("power-source"){{
|
powerVoid = new PowerVoid("power-void"){{
|
||||||
requirements(Category.power, BuildVisibility.sandboxOnly, ItemStack.with());
|
requirements(Category.power, BuildVisibility.sandboxOnly, ItemStack.with());
|
||||||
alwaysUnlocked = true;
|
alwaysUnlocked = true;
|
||||||
}};
|
}};
|
||||||
|
|||||||
@@ -298,6 +298,9 @@ public class SettingsMenuDialog extends SettingsDialog{
|
|||||||
graphics.checkPref("minimap", !mobile);
|
graphics.checkPref("minimap", !mobile);
|
||||||
graphics.checkPref("position", false);
|
graphics.checkPref("position", false);
|
||||||
graphics.checkPref("fps", false);
|
graphics.checkPref("fps", false);
|
||||||
|
if(!mobile){
|
||||||
|
graphics.checkPref("blockselectkeys", true);
|
||||||
|
}
|
||||||
graphics.checkPref("indicators", true);
|
graphics.checkPref("indicators", true);
|
||||||
graphics.checkPref("animatedwater", !mobile);
|
graphics.checkPref("animatedwater", !mobile);
|
||||||
if(Shaders.shield != null){
|
if(Shaders.shield != null){
|
||||||
|
|||||||
@@ -26,7 +26,7 @@ import static io.anuke.mindustry.Vars.*;
|
|||||||
public class PlacementFragment extends Fragment{
|
public class PlacementFragment extends Fragment{
|
||||||
final int rowWidth = 4;
|
final int rowWidth = 4;
|
||||||
|
|
||||||
public Category currentCategory = Category.turret;
|
public Category currentCategory = Category.distribution;
|
||||||
Array<Block> returnArray = new Array<>();
|
Array<Block> returnArray = new Array<>();
|
||||||
Array<Category> returnCatArray = new Array<>();
|
Array<Category> returnCatArray = new Array<>();
|
||||||
boolean[] categoryEmpty = new boolean[Category.all.length];
|
boolean[] categoryEmpty = new boolean[Category.all.length];
|
||||||
@@ -253,13 +253,14 @@ public class PlacementFragment extends Fragment{
|
|||||||
lastGround = false;
|
lastGround = false;
|
||||||
|
|
||||||
topTable.table(header -> {
|
topTable.table(header -> {
|
||||||
String keyCombo = new String();
|
String keyCombo = "";
|
||||||
if(!mobile){
|
if(!mobile && Core.settings.getBool("blockselectkeys")){
|
||||||
keyCombo = " [accent][" + Core.keybinds.get(blockSelect[currentCategory.ordinal()]).key.toString();
|
|
||||||
Array<Block> blocks = getByCategory(currentCategory);
|
Array<Block> blocks = getByCategory(currentCategory);
|
||||||
for(int i = 0; i < blocks.size; i++){
|
for(int i = 0; i < blocks.size; i++){
|
||||||
if(blocks.get(i) == lastDisplay){
|
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;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -267,7 +268,7 @@ public class PlacementFragment extends Fragment{
|
|||||||
final String keyComboFinal = keyCombo;
|
final String keyComboFinal = keyCombo;
|
||||||
header.left();
|
header.left();
|
||||||
header.add(new Image(lastDisplay.icon(Cicon.medium))).size(8 * 4);
|
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);
|
.left().width(190f).padLeft(5);
|
||||||
header.add().growX();
|
header.add().growX();
|
||||||
if(unlocked(lastDisplay)){
|
if(unlocked(lastDisplay)){
|
||||||
|
|||||||
Reference in New Issue
Block a user