Powersuit helm can now act as an oxygen mask (Galacticraft) - tanks sold separately
This commit is contained in:
parent
66812646df
commit
a06b9e9ff1
5 changed files with 79 additions and 15 deletions
21
build.xml
21
build.xml
|
@ -14,6 +14,7 @@
|
|||
<property name="asapi.version" value="0.5.0.166" />
|
||||
<property name="icbmapi.version" value="1.1.0.178" />
|
||||
<property name="thermexapi.version" value="2.2.2" />
|
||||
<property name="galacticraftapi.version" value="1" />
|
||||
|
||||
|
||||
<!-- Directories -->
|
||||
|
@ -64,6 +65,7 @@
|
|||
<available file="${download.dir}/ICBM_v${icbmapi.version}_api.zip" />
|
||||
<available file="${download.dir}/ThermalExpansion-API-${thermexapi.version}.zip" />
|
||||
<available file="${download.dir}/AtomicScience_v${asapi.version}.zip" />
|
||||
<available file="${download.dir}/Galacticraft API.zip" />
|
||||
</and>
|
||||
</condition>
|
||||
|
||||
|
@ -82,13 +84,15 @@
|
|||
|
||||
<echo message="Downloading ThermEx API..." />
|
||||
<get src="http://machinemuse.net/ThermalExpansion-API-${thermexapi.version}.zip" dest="${download.dir}/ThermalExpansion-API-${thermexapi.version}.zip" />
|
||||
|
||||
<echo message="Downloading Galacticraft API..." />
|
||||
<get src="http://machinemuse.net/Galacticraft API.zip" dest="${download.dir}/Galacticraft API.zip" />
|
||||
</target>
|
||||
|
||||
<!-- Dependencies -->
|
||||
<target name="extract-apis" depends="setup-forge,download-apis">
|
||||
<echo message="Extracting IC2 API... " />
|
||||
<unzip src="${download.dir}/industrialcraft-2-api_${ic2api.version}.zip" dest="${download.dir}" />
|
||||
<mkdir dir="${mcpsrc.dir}/ic2" />
|
||||
<mkdir dir="${mcpsrc.dir}/ic2/api" />
|
||||
<move file="${download.dir}/ic2/api/Ic2Recipes.java" todir="${mcpsrc.dir}/ic2/api/" />
|
||||
<move file="${download.dir}/ic2/api/ICustomElectricItem.java" todir="${mcpsrc.dir}/ic2/api/" />
|
||||
|
@ -100,7 +104,6 @@
|
|||
<echo message="Extracting UE API... " />
|
||||
<mkdir dir="${download.dir}/ue" />
|
||||
<unzip src="${download.dir}/UniversalElectricity_v${ueapi.version}.zip" dest="${download.dir}/ue/" />
|
||||
<mkdir dir="${mcpsrc.dir}/universalelectricity/" />
|
||||
<mkdir dir="${mcpsrc.dir}/universalelectricity/core/" />
|
||||
<move todir="${mcpsrc.dir}/universalelectricity/core/">
|
||||
<fileset dir="${ue.download.dir}/core/" />
|
||||
|
@ -108,28 +111,28 @@
|
|||
|
||||
<echo message="Extracting ICBM API... " />
|
||||
<unzip src="${download.dir}/ICBM_v${icbmapi.version}_api.zip" dest="${download.dir}/ue" />
|
||||
<mkdir dir="${mcpsrc.dir}/icbm" />
|
||||
<mkdir dir="${mcpsrc.dir}/icbm/api" />
|
||||
<mkdir dir="${mcpsrc.dir}/icbm/api/explosion" />
|
||||
<move file="${download.dir}/ue/minecraft/icbm/api/explosion/IExplosive.java" todir="${mcpsrc.dir}/icbm/api/explosion/" />
|
||||
<move file="${download.dir}/ue/minecraft/icbm/api/explosion/IEMPItem.java" todir="${mcpsrc.dir}/icbm/api/explosion/" />
|
||||
|
||||
<echo message="Extracting Atomic Science API... " />
|
||||
<unzip src="${download.dir}/AtomicScience_v${asapi.version}_api.zip" dest="${download.dir}/ue" />
|
||||
<mkdir dir="${mcpsrc.dir}/atomicscience" />
|
||||
<mkdir dir="${mcpsrc.dir}/atomicscience/api" />
|
||||
<mkdir dir="${mcpsrc.dir}/atomicscience/api/poison" />
|
||||
<move file="${download.dir}/ue/minecraft/atomicscience/api/poison/Poison.java" todir="${mcpsrc.dir}/atomicscience/api/poison/" />
|
||||
<move file="${download.dir}/ue/minecraft/atomicscience/api/IAntiPoisonArmor.java" todir="${mcpsrc.dir}/atomicscience/api/" />
|
||||
|
||||
<echo message="Extracting ThermalExpansion API... " />
|
||||
<unzip src="${download.dir}/ThermalExpansion-API-${thermexapi.version}.zip" dest="${download.dir}" />
|
||||
<mkdir dir="${mcpsrc.dir}/thermalexpansion" />
|
||||
<mkdir dir="${mcpsrc.dir}/thermalexpansion/api" />
|
||||
<mkdir dir="${mcpsrc.dir}/thermalexpansion/api/core" />
|
||||
<move file="${download.dir}/thermalexpansion/api/core/ItemRegistry.java" todir="${mcpsrc.dir}/thermalexpansion/api/core/" />
|
||||
<move file="${download.dir}/thermalexpansion/api/core/IChargeableItem.java" todir="${mcpsrc.dir}/thermalexpansion/api/core/" />
|
||||
<delete dir="${download.dir}/thermalexpansion" />
|
||||
|
||||
<echo message="Extracting Galacticraft API... " />
|
||||
<unzip src="${download.dir}/Galacticraft API.zip" dest="${download.dir}" />
|
||||
<mkdir dir="${mcpsrc.dir}/micdoodle8/mods/galacticraft/API" />
|
||||
<move file="${download.dir}/micdoodle8/mods/galacticraft/API/EnumGearType.java" todir="${mcpsrc.dir}/micdoodle8/mods/galacticraft/API" />
|
||||
<move file="${download.dir}/micdoodle8/mods/galacticraft/API/IBreathableArmor.java" todir="${mcpsrc.dir}/micdoodle8/mods/galacticraft/API" />
|
||||
|
||||
</target>
|
||||
|
||||
<target name="update-names" depends="copy-source">
|
||||
|
|
BIN
mods/mmmPowersuits/textures/items/glasspane.png
Normal file
BIN
mods/mmmPowersuits/textures/items/glasspane.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 262 B |
|
@ -11,6 +11,7 @@ import net.machinemuse.api.MuseCommonStrings;
|
|||
import net.machinemuse.powersuits.item.ItemComponent;
|
||||
import net.machinemuse.powersuits.powermodule.PowerModule;
|
||||
import net.machinemuse.powersuits.powermodule.ToggleablePowerModule;
|
||||
import net.machinemuse.powersuits.powermodule.misc.AirtightSealModule;
|
||||
import net.machinemuse.powersuits.powermodule.tool.MultimeterModule;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
@ -43,6 +44,10 @@ public class ModCompatability {
|
|||
return Loader.isModLoaded("PowersuitAddons");
|
||||
}
|
||||
|
||||
public static boolean isGalacticraftLoaded() {
|
||||
return Loader.isModLoaded("GalacticraftCore");
|
||||
}
|
||||
|
||||
public static boolean enableThaumGogglesModule() {
|
||||
boolean defaultval = isThaumCraftLoaded();
|
||||
return Config.getConfig().get("Special Modules", "Thaumcraft Goggles Module", defaultval).getBoolean(defaultval);
|
||||
|
@ -143,7 +148,8 @@ public class ModCompatability {
|
|||
Field itemGoggles = tcItems.getField("itemGoggles");
|
||||
Item goggles = (Item) itemGoggles.get(itemGoggles);
|
||||
gogglesStack = new ItemStack(goggles);
|
||||
IPowerModule module = new PowerModule("Aurameter", Collections.singletonList((IModularItem) ModularPowersuits.powerArmorHead), "bluestar",
|
||||
IPowerModule module = new PowerModule("Aurameter", Collections.singletonList((IModularItem) ModularPowersuits.powerArmorHead),
|
||||
"bluestar",
|
||||
MuseCommonStrings.CATEGORY_SPECIAL)
|
||||
.setDescription(
|
||||
"Connect up some Thaumic goggles to show the nearby aura values. (Does not reveal aura nodes, only shows the HUD)")
|
||||
|
@ -159,7 +165,7 @@ public class ModCompatability {
|
|||
|
||||
if (ModCompatability.isAtomicScienceLoaded()) {
|
||||
|
||||
module = new ToggleablePowerModule(MuseCommonStrings.MODULE_HAZMAT, Arrays.<IModularItem>asList(
|
||||
module = new ToggleablePowerModule(MuseCommonStrings.MODULE_HAZMAT, Arrays.<IModularItem> asList(
|
||||
ModularPowersuits.powerArmorHead, ModularPowersuits.powerArmorTorso,
|
||||
ModularPowersuits.powerArmorLegs, ModularPowersuits.powerArmorFeet), "greenstar",
|
||||
MuseCommonStrings.CATEGORY_ARMOR)
|
||||
|
@ -167,19 +173,24 @@ public class ModCompatability {
|
|||
.addInstallCost(Config.copyAndResize(ItemComponent.basicPlating, 3)).addBaseProperty(MuseCommonStrings.WEIGHT, 0.5);
|
||||
ModuleManager.addModule(module);
|
||||
}
|
||||
|
||||
if (ModCompatability.isGalacticraftLoaded()) {
|
||||
module = new AirtightSealModule(Collections.singletonList((IModularItem) ModularPowersuits.powerArmorHead));
|
||||
ModuleManager.addModule(module);
|
||||
}
|
||||
}
|
||||
|
||||
public static ItemStack getThermexItem(String string, int quantity) {
|
||||
// try {
|
||||
// ItemStack item = thermalexpansion.api.core.ItemRegistry.getItem(string, quantity);
|
||||
// ItemStack item =
|
||||
// thermalexpansion.api.core.ItemRegistry.getItem(string, quantity);
|
||||
// if (item != null) {
|
||||
// return item;
|
||||
// }
|
||||
// } catch (Exception e) {
|
||||
// }
|
||||
// thermalexpansion.api.core.ItemRegistry.printItemNames();
|
||||
// MuseLogger.logError("Failed to get Thermal Expansion item " + string);
|
||||
// MuseLogger.logError("Failed to get Thermal Expansion item " +
|
||||
// string);
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,12 +1,18 @@
|
|||
package net.machinemuse.powersuits.item;
|
||||
|
||||
import micdoodle8.mods.galacticraft.API.EnumGearType;
|
||||
import micdoodle8.mods.galacticraft.API.IBreathableArmor;
|
||||
import net.machinemuse.api.MuseItemUtils;
|
||||
import net.machinemuse.general.gui.MuseIcon;
|
||||
import net.machinemuse.powersuits.powermodule.misc.AirtightSealModule;
|
||||
import net.minecraft.client.renderer.texture.IconRegister;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import cpw.mods.fml.common.registry.LanguageRegistry;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
public class ItemPowerArmorHelmet extends ItemPowerArmor {
|
||||
public class ItemPowerArmorHelmet extends ItemPowerArmor implements IBreathableArmor {
|
||||
public static int assignedItemID;
|
||||
|
||||
public ItemPowerArmorHelmet() {
|
||||
|
@ -22,4 +28,9 @@ public class ItemPowerArmorHelmet extends ItemPowerArmor {
|
|||
MuseIcon.ARMOR_HEAD.register(iconRegister);
|
||||
iconIndex = MuseIcon.ARMOR_HEAD.getIconRegistration();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canBreathe(ItemStack helmetInSlot, EntityPlayer playerWearing, EnumGearType type) {
|
||||
return MuseItemUtils.itemHasActiveModule(helmetInSlot, AirtightSealModule.AIRTIGHT_SEAL_MODULE);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -0,0 +1,39 @@
|
|||
package net.machinemuse.powersuits.powermodule.misc;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import net.machinemuse.api.IModularItem;
|
||||
import net.machinemuse.api.MuseCommonStrings;
|
||||
import net.machinemuse.powersuits.powermodule.PowerModuleBase;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
public class AirtightSealModule extends PowerModuleBase {
|
||||
public static final String AIRTIGHT_SEAL_MODULE = "Airtight Seal";
|
||||
|
||||
public AirtightSealModule(List<IModularItem> validItems) {
|
||||
super(validItems);
|
||||
addInstallCost(new ItemStack(Block.glass));
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getCategory() {
|
||||
return MuseCommonStrings.CATEGORY_ENVIRONMENTAL;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getName() {
|
||||
return AIRTIGHT_SEAL_MODULE;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getDescription() {
|
||||
return "Seal the suit against hostile atmospheres for venturing to other planets.";
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getTextureFile() {
|
||||
return "glasspane";
|
||||
}
|
||||
|
||||
}
|
Loading…
Reference in a new issue