mirror of
https://github.com/GTNewHorizons/Applied-Energistics-2-Unofficial.git
synced 2026-10-25 20:22:23 +00:00
add keybinds for wireless keys (#1318)
This commit is contained in:
1 parent
d9537bed0f
commit
19f6b896f5
5 files changed
+15
-10
No files matched your search
@@ -25,6 +25,7 @@ import appeng.api.networking.security.PlayerSource;
|
||||
import appeng.api.util.DimensionalCoord;
|
||||
import appeng.api.util.IConfigManager;
|
||||
import appeng.core.localization.WirelessMessages;
|
||||
import appeng.server.ServerHelper;
|
||||
import appeng.tile.networking.TileWirelessBase;
|
||||
import appeng.util.Platform;
|
||||
|
||||
@@ -345,7 +346,7 @@ public class WireLessToolHelper {
|
||||
}
|
||||
}
|
||||
|
||||
if (Platform.keyBindLCtrl.isKeyDown(p) && isHub) {
|
||||
if (ServerHelper.WIRELESS_EXTRA_ACTION.isKeyDown(p) && isHub) {
|
||||
int i = 0;
|
||||
while (i < target.getFreeSlots()) {
|
||||
locList.add(new DimensionalCoord(target));
|
||||
@@ -438,7 +439,7 @@ public class WireLessToolHelper {
|
||||
}
|
||||
|
||||
final PlayerSource playerSource = new PlayerSource(p, null);
|
||||
final boolean bindMultiple = Platform.keyBindLCtrl.isKeyDown(p) && target.isHub();
|
||||
final boolean bindMultiple = ServerHelper.WIRELESS_EXTRA_ACTION.isKeyDown(p) && target.isHub();
|
||||
boolean success = false;
|
||||
int boundCount = 0;
|
||||
|
||||
|
||||
@@ -33,6 +33,7 @@ import appeng.core.sync.GuiBridge;
|
||||
import appeng.helpers.WireLessToolHelper;
|
||||
import appeng.items.AEBaseItem;
|
||||
import appeng.items.contents.WirelessKitObject;
|
||||
import appeng.server.ServerHelper;
|
||||
import appeng.tile.networking.TileWirelessBase;
|
||||
import appeng.util.ConfigManager;
|
||||
import appeng.util.Platform;
|
||||
@@ -56,13 +57,13 @@ public class ToolWirelessKit extends AEBaseItem implements IGuiItem {
|
||||
}
|
||||
|
||||
final IConfigManager cm = getConfigManager(is);
|
||||
if (Platform.keyBindTab.isKeyDown(p)) {
|
||||
if (ServerHelper.WIRELESS_MODE_SWITCH.isKeyDown(p)) {
|
||||
WireLessToolHelper.nextToolMode(p, cm);
|
||||
return is;
|
||||
}
|
||||
|
||||
final WirelessToolMode mode = WireLessToolHelper.getMode(is);
|
||||
if (p.isSneaking() && Platform.keyBindLCtrl.isKeyDown(p)) {
|
||||
if (p.isSneaking() && ServerHelper.WIRELESS_EXTRA_ACTION.isKeyDown(p)) {
|
||||
WireLessToolHelper.clearNBT(is, mode, p);
|
||||
return is;
|
||||
}
|
||||
|
||||
@@ -45,6 +45,12 @@ public class ServerHelper extends CommonHelper {
|
||||
public static final SyncedKeybind CONTAINER_INTERACTION_KEY = SyncedKeybind
|
||||
.createConfigurable("key.container_interaction.desc", KEY_CATEGORY, Keyboard.KEY_LCONTROL);
|
||||
|
||||
public static final SyncedKeybind WIRELESS_EXTRA_ACTION = SyncedKeybind
|
||||
.createConfigurable("key.wireless_extra_action.desc", ServerHelper.KEY_CATEGORY, Keyboard.KEY_LCONTROL);
|
||||
|
||||
public static final SyncedKeybind WIRELESS_MODE_SWITCH = SyncedKeybind
|
||||
.createConfigurable("key.wireless_mode_switch.desc", ServerHelper.KEY_CATEGORY, Keyboard.KEY_TAB);
|
||||
|
||||
private EntityPlayer renderModeBased;
|
||||
|
||||
@Override
|
||||
|
||||
@@ -69,11 +69,8 @@ import net.minecraftforge.common.util.FakePlayerFactory;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
import net.minecraftforge.oredict.OreDictionary;
|
||||
|
||||
import org.lwjgl.input.Keyboard;
|
||||
|
||||
import com.glodblock.github.common.item.ItemFluidDrop;
|
||||
import com.glodblock.github.common.item.ItemFluidPacket;
|
||||
import com.gtnewhorizon.gtnhlib.keybind.SyncedKeybind;
|
||||
import com.mojang.authlib.GameProfile;
|
||||
|
||||
import appeng.api.AEApi;
|
||||
@@ -182,8 +179,6 @@ public class Platform {
|
||||
public static final boolean isBackhandLoaded = Loader.isModLoaded("backhand");
|
||||
public static final boolean isPosteaLoaded = Loader.isModLoaded("postea");
|
||||
public static final boolean isGTLoaded = IntegrationRegistry.INSTANCE.isEnabled(IntegrationType.GT);
|
||||
public static final SyncedKeybind keyBindLCtrl = SyncedKeybind.create(Keyboard.KEY_LCONTROL);
|
||||
public static final SyncedKeybind keyBindTab = SyncedKeybind.create(Keyboard.KEY_TAB);
|
||||
public static final boolean isThaumicEnergisticsLoaded = Loader.isModLoaded("thaumicenergistics");
|
||||
public static final boolean isEndlessIdsLoaded = Loader.isModLoaded("endlessids");
|
||||
|
||||
|
||||
@@ -1099,7 +1099,7 @@ item.appliedenergistics2.WirelessMessages.Connected=§aConnected to %s
|
||||
item.appliedenergistics2.WirelessMessages.TargetHubFull=§cTarget hub is full
|
||||
item.appliedenergistics2.WirelessMessages.SourceHubFull=§cHub at %s §cis full
|
||||
item.appliedenergistics2.WirelessMessages.HubToHub=§cHub-to-hub connections are not allowed
|
||||
item.appliedenergistics2.WirelessMessages.ModeToggle=Tab + R-click to toggle mode
|
||||
item.appliedenergistics2.WirelessMessages.ModeToggle="Wireless Mode Switch" + R-click to toggle mode
|
||||
item.appliedenergistics2.WirelessMessages.Security=Security violation - you are not allowed to modify this network
|
||||
item.appliedenergistics2.WirelessMessages.DimensionMismatch=Both connectors must be in the same dimension
|
||||
item.appliedenergistics2.WirelessMessages.InvalidTarget=§cInvalid target - must be Wireless Connector or Wireless Hub
|
||||
@@ -1237,6 +1237,8 @@ key.pick_block.desc=AE2 Pick Block
|
||||
key.toggle_focus.desc=Toggle search box focus
|
||||
key.search_connected_inventories.desc=Search network inventories for an item
|
||||
key.container_interaction.desc=Container Item Interaction
|
||||
key.wireless_extra_action.desc=Wireless Extra Action
|
||||
key.wireless_mode_switch.desc=Wireless Mode Switch
|
||||
|
||||
# NEI
|
||||
nei.options.keys.gui.pattern_view=View Pattern
|
||||
Reference in new issue
Block a user