From bb40be7775054f5c877c05f34037a715fc435eac Mon Sep 17 00:00:00 2001 From: MachineMuse Date: Fri, 28 Aug 2015 23:16:03 -0600 Subject: [PATCH] Removed unused Omnitools & Basic Components code. Closes #587 --- .../powersuits/common/ModCompatibility.java | 22 ----- .../powermodule/tool/MultimeterModule.java | 89 ------------------- 2 files changed, 111 deletions(-) delete mode 100644 src/main/scala/net/machinemuse/powersuits/powermodule/tool/MultimeterModule.java diff --git a/src/main/scala/net/machinemuse/powersuits/common/ModCompatibility.java b/src/main/scala/net/machinemuse/powersuits/common/ModCompatibility.java index 0cadf46..461f6f9 100644 --- a/src/main/scala/net/machinemuse/powersuits/common/ModCompatibility.java +++ b/src/main/scala/net/machinemuse/powersuits/common/ModCompatibility.java @@ -19,10 +19,6 @@ public class ModCompatibility { return Loader.isModLoaded("gregtech_addon"); } - public static boolean isBasicComponentsLoaded() { - return Loader.isModLoaded("BasicComponents"); - } - public static boolean isIndustrialCraftLoaded() { return Loader.isModLoaded("IC2"); } @@ -47,10 +43,6 @@ public class ModCompatibility { return Loader.isModLoaded("Forestry"); } - public static boolean isOmniToolsLoaded() { - return Loader.isModLoaded("OmniTools"); - } - public static boolean enableThaumGogglesModule() { boolean defaultval = isThaumCraftLoaded(); return Config.getConfig().get("Special Modules", "Thaumcraft Goggles Module", defaultval).getBoolean(defaultval); @@ -96,19 +88,5 @@ public class ModCompatibility { ModuleManager.addModule(new ApiaristArmorModule(Arrays.asList(MPSItems.powerArmorHead(), MPSItems.powerArmorTorso(), MPSItems.powerArmorLegs(), MPSItems.powerArmorFeet()))); } } -// -// -// public static ItemStack getForestryItem(String name, int quantity) { -// try { -// ItemStack item = forestry.api.core.ItemInterface.getItem(name); -// if (item != null) { -// item.stackSize = quantity; -// return item; -// } -// } catch (Exception e) { -// } -// MuseLogger.logError("Failed to get Forestry item " + name); -// return null; -// } } diff --git a/src/main/scala/net/machinemuse/powersuits/powermodule/tool/MultimeterModule.java b/src/main/scala/net/machinemuse/powersuits/powermodule/tool/MultimeterModule.java deleted file mode 100644 index 9c1c678..0000000 --- a/src/main/scala/net/machinemuse/powersuits/powermodule/tool/MultimeterModule.java +++ /dev/null @@ -1,89 +0,0 @@ -package net.machinemuse.powersuits.powermodule.tool; - -import net.machinemuse.api.IModularItem; -import net.machinemuse.api.moduletrigger.IRightClickModule; -import net.machinemuse.powersuits.item.ItemComponent; -import net.machinemuse.powersuits.powermodule.PowerModuleBase; -import net.machinemuse.utils.MuseCommonStrings; -import net.machinemuse.utils.MuseItemUtils; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.ItemStack; -import net.minecraft.world.World; - -import java.util.List; - -public class MultimeterModule extends PowerModuleBase implements IRightClickModule { - public static final String MODULE_MULTIMETER = "Multimeter"; - - public MultimeterModule(String name, List validItems) { - super(name, validItems); // Add UE multimeter module - addInstallCost(MuseItemUtils.copyAndResize(ItemComponent.wiring, 2)).addInstallCost(MuseItemUtils.copyAndResize(ItemComponent.solenoid, 1)); - - } - - public MultimeterModule(List validItems) { - super(validItems); - } - - @Override - public String getCategory() { - return MuseCommonStrings.CATEGORY_TOOL; - } - - @Override - public String getDataName() { - return MODULE_MULTIMETER; - } - - @Override - public String getLocalizedName() { - return MODULE_MULTIMETER; - } - - @Override - public String getDescription() { - return "A tool addon that reads the Universal Electricity power generation in a wire."; - } - - @Override - public String getTextureFile() { - return "redplate"; - } - - @Override - public boolean onItemUseFirst(ItemStack itemStack, EntityPlayer player, World worldObj, int x, int y, int z, int side, float hitX, float hitY, - float hitZ) { -/* if (ModCompatibility.isBasicComponentsLoaded()) { - if (!worldObj.isRemote) { - TileEntity tileEntity = worldObj.getBlockTileEntity(x, y, z); - if (tileEntity instanceof IConductor) { - IConductor wireTile = (IConductor) tileEntity; - ElectricityPack getProduced = wireTile.getNetwork().getProduced(); - player.addChatMessage("Reading: " + ElectricityDisplay.getDisplay(getProduced.amperes, ElectricUnit.AMPERE) + ", " - + ElectricityDisplay.getDisplay(getProduced.voltage, ElectricUnit.VOLTAGE) + ", " - + ElectricityDisplay.getDisplay(getProduced.getWatts() * 20, ElectricUnit.WATT)); - return true; - } - } - }*/ - return false; - } - - @Override - public void onRightClick(EntityPlayer playerClicking, World world, ItemStack item) { - } - - @Override - public void onItemUse(ItemStack itemStack, EntityPlayer player, World world, int x, int y, int z, int side, float hitX, float hitY, float hitZ) { - } - - @Override - public void onPlayerStoppedUsing(ItemStack itemStack, World world, EntityPlayer player, int par4) { - } - - @Override - public boolean isAllowed() { - //This module can't work with the current state of UE - return false; - } -}