Fixed a massive issue that could invalidate all modules on a player's suit.

This commit is contained in:
Andrew2448 2013-06-27 01:33:41 -04:00
parent 2ecf8d3a80
commit a5d3ad9ce6
54 changed files with 310 additions and 108 deletions

View file

@ -1,14 +1,14 @@
package net.machinemuse.api;
import java.util.List;
import java.util.Map;
import net.minecraft.client.renderer.texture.IconRegister;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.util.Icon;
import java.util.List;
import java.util.Map;
public interface IPowerModule {
public abstract List<ItemStack> getInstallCost();
@ -24,6 +24,8 @@ public interface IPowerModule {
public abstract String getName();
public abstract String getDisplayName();
public abstract double applyPropertyModifiers(NBTTagCompound itemTag, String propertyName, double propertyValue);
public abstract NBTTagCompound getNewTag();

View file

@ -22,7 +22,7 @@ class ClickableModule(val module: IPowerModule, position: MusePoint2D) extends C
override def getToolTip: List[String] = {
val toolTipText: List[String] = new ArrayList[String]
toolTipText.add(getModule.getName)
toolTipText.add(getModule.getDisplayName)
toolTipText.addAll(MuseStringUtils.wrapStringToLength(getModule.getDescription, 30))
toolTipText
}

View file

@ -64,7 +64,7 @@ module.invisibility.name = Active Camouflage
module.blinkDrive.name = Blink Drive
module.diamondPickUpgrade.name = Diamond Drill Upgrade
module.aquaAffinity.name = Aqua Affinity
module.coolingSystem.name = Cooling Bonus
module.coolingSystem.name = Cooling System
module.tint.name = Custom Colour Module
module.transparentArmor.name = Transparent Armor
module.cosmeticGlow.name = Glow Module
@ -76,3 +76,4 @@ module.redstoneLaser.name = Redstone Laser
module.aurameter.name = Aurameter
module.airtightSeal.name = Airtight Seal
module.citizenJoe.name = Citizen Joe Armor
module.sonicWeapon.name = Sonic Weapon

View file

@ -1,9 +1,9 @@
package net.machinemuse.powersuits.powermodule;
import java.util.List;
import net.machinemuse.api.IModularItem;
import java.util.List;
public class PowerModule extends PowerModuleBase {
protected String name;
protected String description;
@ -22,6 +22,12 @@ public class PowerModule extends PowerModuleBase {
return name;
}
@Override
public String getDisplayName() {
return "This module did not correctly label it's name.";
}
@Override
public String getDescription() {
return description;

View file

@ -15,7 +15,7 @@ import java.util.List;
* Time: 2:03 PM
*/
public class ApiaristArmorModule extends PowerModuleBase {
public static String MODULE_APIARIST_ARMOR;
public static final String MODULE_APIARIST_ARMOR = "Apiarist Armor";
public static final String APIARIST_ARMOR_ENERGY_CONSUMPTION = "Apiarist Armor Energy Consumption";
public ApiaristArmorModule(List<IModularItem> validItems) {
@ -33,10 +33,14 @@ public class ApiaristArmorModule extends PowerModuleBase {
@Override
public String getName() {
MODULE_APIARIST_ARMOR = StatCollector.translateToLocal("module.apiaristArmor.name");
return MODULE_APIARIST_ARMOR;
}
@Override
public String getDisplayName() {
return StatCollector.translateToLocal("module.apiaristArmor.name");
}
@Override
public String getDescription() {
return "A set of Forestry apiarist armor integrated into your armor.";

View file

@ -10,7 +10,7 @@ import net.minecraft.util.StatCollector;
import java.util.List;
public class BasicPlatingModule extends PowerModuleBase {
public static String MODULE_BASIC_PLATING;
public static final String MODULE_BASIC_PLATING = "Iron Plating";
public BasicPlatingModule(List<IModularItem> validItems) {
super(validItems);
@ -31,10 +31,14 @@ public class BasicPlatingModule extends PowerModuleBase {
@Override
public String getName() {
MODULE_BASIC_PLATING = StatCollector.translateToLocal("module.basicPlating.name");
return MODULE_BASIC_PLATING;
}
@Override
public String getDisplayName() {
return StatCollector.translateToLocal("module.basicPlating.name");
}
@Override
public String getDescription() {
return "Basic plating is heavy but protective.";

View file

@ -10,7 +10,7 @@ import net.minecraft.util.StatCollector;
import java.util.List;
public class DiamondPlatingModule extends PowerModuleBase {
public static String MODULE_DIAMOND_PLATING;
public static final String MODULE_DIAMOND_PLATING = "Diamond Plating";
public DiamondPlatingModule(List<IModularItem> validItems) {
super(validItems);
@ -31,10 +31,14 @@ public class DiamondPlatingModule extends PowerModuleBase {
@Override
public String getName() {
MODULE_DIAMOND_PLATING = StatCollector.translateToLocal("module.diamondPlating.name");
return MODULE_DIAMOND_PLATING;
}
@Override
public String getDisplayName() {
return StatCollector.translateToLocal("module.diamondPlating.name");
}
@Override
public String getDescription() {
return "Advanced plating is lighter, harder, and more protective than Basic but much harder to make.";

View file

@ -10,7 +10,7 @@ import net.minecraft.util.StatCollector;
import java.util.List;
public class EnergyShieldModule extends PowerModuleBase {
public static String MODULE_ENERGY_SHIELD;
public static final String MODULE_ENERGY_SHIELD = "Energy Shield";
public EnergyShieldModule(List<IModularItem> validItems) {
super(validItems);
@ -31,10 +31,14 @@ public class EnergyShieldModule extends PowerModuleBase {
@Override
public String getName() {
MODULE_ENERGY_SHIELD = StatCollector.translateToLocal("module.energyShield.name");
return MODULE_ENERGY_SHIELD;
}
@Override
public String getDisplayName() {
return StatCollector.translateToLocal("module.energyShield.name");
}
@Override
public String getDescription() {
return "Energy shields are much lighter than plating, but consume energy.";

View file

@ -10,7 +10,7 @@ import net.minecraft.util.StatCollector;
import java.util.List;
public class HazmatModule extends PowerModuleBase {
public static String MODULE_HAZMAT;
public static final String MODULE_HAZMAT = "Radiation Shielding";
public HazmatModule(List<IModularItem> validItems) {
super(validItems);
@ -24,10 +24,14 @@ public class HazmatModule extends PowerModuleBase {
@Override
public String getName() {
MODULE_HAZMAT = StatCollector.translateToLocal("module.hazmat.name");
return MODULE_HAZMAT;
}
@Override
public String getDisplayName() {
return StatCollector.translateToLocal("module.hazmat.name");
}
@Override
public String getDescription() {
return "Protect yourself from that pesky radiation poisoning. *Must be on every piece*";

View file

@ -11,7 +11,7 @@ import net.minecraft.util.StatCollector;
import java.util.List;
public class HeatSinkModule extends PowerModuleBase {
public static String MODULE_HEAT_SINK;
public static final String MODULE_HEAT_SINK = "Heat Sink";
public static final String THICKNESS = "Thickness";
public HeatSinkModule(List<IModularItem> validItems) {
@ -28,10 +28,14 @@ public class HeatSinkModule extends PowerModuleBase {
@Override
public String getName() {
MODULE_HEAT_SINK = StatCollector.translateToLocal("module.heatSink.name");
return MODULE_HEAT_SINK;
}
@Override
public String getDisplayName() {
return StatCollector.translateToLocal("module.heatSink.name");
}
@Override
public String getDescription() {
return "A thick layer of plating to soak up heat.";

View file

@ -12,7 +12,7 @@ import net.minecraft.util.StatCollector;
import java.util.List;
public class AdvancedBatteryModule extends PowerModuleBase {
public static String MODULE_BATTERY_ADVANCED;
public static final String MODULE_BATTERY_ADVANCED = "Advanced Battery";
public AdvancedBatteryModule(List<IModularItem> validItems) {
super(validItems);
@ -37,10 +37,14 @@ public class AdvancedBatteryModule extends PowerModuleBase {
@Override
public String getName() {
MODULE_BATTERY_ADVANCED = StatCollector.translateToLocal("module.advancedBattery.name");
return MODULE_BATTERY_ADVANCED;
}
@Override
public String getDisplayName() {
return StatCollector.translateToLocal("module.advancedBattery.name");
}
@Override
public String getDescription() {
return "Integrate a more advanced battery to store more energy.";

View file

@ -12,7 +12,7 @@ import net.minecraft.util.StatCollector;
import java.util.List;
public class BasicBatteryModule extends PowerModuleBase {
public static String MODULE_BATTERY_BASIC;
public static final String MODULE_BATTERY_BASIC = "Basic Battery";
public BasicBatteryModule(List<IModularItem> validItems) {
super(validItems);
@ -37,10 +37,14 @@ public class BasicBatteryModule extends PowerModuleBase {
@Override
public String getName() {
MODULE_BATTERY_BASIC = StatCollector.translateToLocal("module.basicBattery.name");
return MODULE_BATTERY_BASIC;
}
@Override
public String getDisplayName() {
return StatCollector.translateToLocal("module.basicBattery.name");
}
@Override
public String getDescription() {
return "Integrate a battery to allow the item to store energy.";

View file

@ -12,7 +12,7 @@ import net.minecraft.util.StatCollector;
import java.util.List;
public class EliteBatteryModule extends PowerModuleBase {
public static String MODULE_BATTERY_ELITE;
public static final String MODULE_BATTERY_ELITE = "Elite Battery";
public EliteBatteryModule(List<IModularItem> validItems) {
super(validItems);
@ -37,10 +37,14 @@ public class EliteBatteryModule extends PowerModuleBase {
@Override
public String getName() {
MODULE_BATTERY_ELITE = StatCollector.translateToLocal("module.eliteBattery.name");
return MODULE_BATTERY_ELITE;
}
@Override
public String getDisplayName() {
return StatCollector.translateToLocal("module.eliteBattery.name");
}
@Override
public String getDescription() {
return "Integrate a the most advanced battery to store an extensive amount of energy.";

View file

@ -10,7 +10,7 @@ import net.minecraft.util.StatCollector;
import java.util.List;
public class AirtightSealModule extends PowerModuleBase {
public static String AIRTIGHT_SEAL_MODULE;
public static final String AIRTIGHT_SEAL_MODULE = "Airtight Seal";
public AirtightSealModule(List<IModularItem> validItems) {
super(validItems);
@ -24,10 +24,14 @@ public class AirtightSealModule extends PowerModuleBase {
@Override
public String getName() {
AIRTIGHT_SEAL_MODULE = StatCollector.translateToLocal("module.airtightSeal.name");
return AIRTIGHT_SEAL_MODULE;
}
@Override
public String getDisplayName() {
return StatCollector.translateToLocal("module.airtightSeal.name");
}
@Override
public String getDescription() {
return "Seal the suit against hostile atmospheres for venturing to other planets.";

View file

@ -23,7 +23,9 @@ class BinocularsModule(list: java.util.List[IModularItem]) extends PowerModuleBa
override def getCategory: String = MuseCommonStrings.CATEGORY_VISION
override def getName: String = StatCollector.translateToLocal("module.binoculars.name")
override def getName: String = "Binoculars"
override def getDisplayName: String = StatCollector.translateToLocal("module.binoculars.name")
override def getDescription: String = "With the problems that have been plaguing Optifine lately, you've decided to take that Zoom ability into your own hands."

View file

@ -8,7 +8,7 @@ import net.minecraft.util.StatCollector;
import java.util.List;
public class CitizenJoeStyle extends PowerModuleBase {
public static String CITIZEN_JOE_STYLE;
public static final String CITIZEN_JOE_STYLE = "Citizen Joe Style";
public CitizenJoeStyle(List<IModularItem> validItems) {
super(validItems);
@ -26,10 +26,14 @@ public class CitizenJoeStyle extends PowerModuleBase {
@Override
public String getName() {
CITIZEN_JOE_STYLE = StatCollector.translateToLocal("module.citizenJoe.name");
return CITIZEN_JOE_STYLE;
}
@Override
public String getDisplayName() {
return StatCollector.translateToLocal("module.citizenJoe.name");
}
@Override
public String getDescription() {
return "An alternative armor texture, c/o CitizenJoe of IC2 forums.";

View file

@ -18,7 +18,7 @@ import net.minecraft.util.StatCollector;
import java.util.List;
public class CoolingSystemModule extends PowerModuleBase implements IPlayerTickModule, IToggleableModule {
public static String MODULE_COOLING_SYSTEM;
public static final String MODULE_COOLING_SYSTEM = "Cooling System";
public static final String COOLING_BONUS = "Cooling Bonus";
public static final String ENERGY = "Cooling System Energy Consumption";
@ -37,10 +37,14 @@ public class CoolingSystemModule extends PowerModuleBase implements IPlayerTickM
@Override
public String getName() {
MODULE_COOLING_SYSTEM = StatCollector.translateToLocal("module.coolingSystem.name");
return MODULE_COOLING_SYSTEM;
}
@Override
public String getDisplayName() {
return StatCollector.translateToLocal("module.coolingSystem.name");
}
@Override
public String getDescription() {
return "Cools down heat-producing modules quicker.";

View file

@ -8,7 +8,7 @@ import net.minecraft.util.StatCollector;
import java.util.List;
public class CosmeticGlowModule extends PowerModuleBase {
public static String MODULE_GLOW;
public static final String MODULE_GLOW = "Glow Module";
public static final String RED_GLOW = "Red Glow";
public static final String GREEN_GLOW = "Green Glow";
public static final String BLUE_GLOW = "Blue Glow";
@ -32,10 +32,14 @@ public class CosmeticGlowModule extends PowerModuleBase {
@Override
public String getName() {
MODULE_GLOW = StatCollector.translateToLocal("module.cosmeticGlow.name");
return MODULE_GLOW;
}
@Override
public String getDisplayName() {
return StatCollector.translateToLocal("module.cosmeticGlow.name");
}
@Override
public String getDescription() {
return "Change the appearance of the glowy bits on your armor.";

View file

@ -18,7 +18,7 @@ import java.util.Collection;
import java.util.List;
public class InvisibilityModule extends PowerModuleBase implements IPlayerTickModule, IToggleableModule {
public static String MODULE_ACTIVE_CAMOUFLAGE;
public static final String MODULE_ACTIVE_CAMOUFLAGE = "Active Camouflage";
public InvisibilityModule(List<IModularItem> validItems) {
super(validItems);
@ -34,10 +34,14 @@ public class InvisibilityModule extends PowerModuleBase implements IPlayerTickMo
@Override
public String getName() {
MODULE_ACTIVE_CAMOUFLAGE = StatCollector.translateToLocal("module.invisibility.name");
return MODULE_ACTIVE_CAMOUFLAGE;
}
@Override
public String getDisplayName() {
return StatCollector.translateToLocal("module.invisibility.name");
}
@Override
public String getDescription() {
return "Emit a hologram of your surroundings to make yourself almost imperceptible.";

View file

@ -18,7 +18,7 @@ import java.util.Collection;
import java.util.List;
public class NightVisionModule extends PowerModuleBase implements IPlayerTickModule, IToggleableModule {
public static String MODULE_NIGHT_VISION;
public static final String MODULE_NIGHT_VISION = "Night Vision";
public NightVisionModule(List<IModularItem> validItems) {
super(validItems);
@ -33,10 +33,14 @@ public class NightVisionModule extends PowerModuleBase implements IPlayerTickMod
@Override
public String getName() {
MODULE_NIGHT_VISION = StatCollector.translateToLocal("module.nightVision.name");
return MODULE_NIGHT_VISION;
}
@Override
public String getDisplayName() {
return StatCollector.translateToLocal("module.nightVision.name");
}
@Override
public String getDescription() {
return "A pair of augmented vision goggles to help you see at night and underwater.";

View file

@ -12,7 +12,7 @@ import java.lang.reflect.Field;
import java.util.List;
public class ThaumGogglesModule extends PowerModuleBase {
public static String MODULE_THAUM_GOGGLES;
public static final String MODULE_THAUM_GOGGLES = "Aurameter";
Class tcItems;
ItemStack gogglesStack = null;
@ -36,10 +36,14 @@ public class ThaumGogglesModule extends PowerModuleBase {
@Override
public String getName() {
MODULE_THAUM_GOGGLES = StatCollector.translateToLocal("module.aurameter.name");
return MODULE_THAUM_GOGGLES;
}
@Override
public String getDisplayName() {
return StatCollector.translateToLocal("module.aurameter.name");
}
@Override
public String getDescription() {
return "Connect up some Thaumic goggles to show the nearby aura values. (Does not reveal aura nodes, only shows the HUD)";

View file

@ -8,7 +8,7 @@ import net.minecraft.util.StatCollector;
import java.util.List;
public class TintModule extends PowerModuleBase {
public static String MODULE_TINT;
public static String MODULE_TINT = "Custom Colour Module";
public static final String RED_TINT = "Red Tint";
public static final String GREEN_TINT = "Green Tint";
public static final String BLUE_TINT = "Blue Tint";
@ -37,10 +37,14 @@ public class TintModule extends PowerModuleBase {
@Override
public String getName() {
MODULE_TINT = StatCollector.translateToLocal("module.tint.name");
return MODULE_TINT;
}
@Override
public String getDisplayName() {
return StatCollector.translateToLocal("module.tint.name");
}
@Override
public String getDescription() {
return "Give your armor some coloured tinting to customize your armor's appearance.";

View file

@ -10,7 +10,7 @@ import net.minecraft.util.StatCollector;
import java.util.List;
public class TransparentArmorModule extends PowerModuleBase {
public static String MODULE_TRANSPARENT_ARMOR;
public static final String MODULE_TRANSPARENT_ARMOR = "Transparent Armor";
public TransparentArmorModule(List<IModularItem> validItems) {
super(validItems);
@ -33,10 +33,14 @@ public class TransparentArmorModule extends PowerModuleBase {
@Override
public String getName() {
MODULE_TRANSPARENT_ARMOR = StatCollector.translateToLocal("module.transparentArmor.name");
return MODULE_TRANSPARENT_ARMOR;
}
@Override
public String getDisplayName() {
return StatCollector.translateToLocal("module.transparentArmor.name");
}
@Override
public String getDescription() {
return "Make the item transparent, so you can show off your skin without losing armor.";

View file

@ -19,7 +19,7 @@ import java.util.List;
public class WaterElectrolyzerModule extends PowerModuleBase implements IPlayerTickModule, IToggleableModule {
public static final String WATERBREATHING_ENERGY_CONSUMPTION = "Jolt Energy";
public static String MODULE_WATER_ELECTROLYZER;
public static final String MODULE_WATER_ELECTROLYZER = "Water Electrolyzer";
public WaterElectrolyzerModule(List<IModularItem> validItems) {
super(validItems);
@ -34,10 +34,14 @@ public class WaterElectrolyzerModule extends PowerModuleBase implements IPlayerT
@Override
public String getName() {
MODULE_WATER_ELECTROLYZER = StatCollector.translateToLocal("module.waterElectrolyzer.name");
return MODULE_WATER_ELECTROLYZER;
}
@Override
public String getDisplayName() {
return StatCollector.translateToLocal("module.waterElectrolyzer.name");
}
@Override
public String getDescription() {
return "When you run out of air, this module will jolt the water around you, electrolyzing a small bubble to breathe from.";

View file

@ -18,7 +18,7 @@ import net.minecraft.world.World;
import java.util.List;
public class BlinkDriveModule extends PowerModuleBase implements IRightClickModule {
public static String MODULE_BLINK_DRIVE;
public static final String MODULE_BLINK_DRIVE = "Blink Drive";
public static final String BLINK_DRIVE_ENERGY_CONSUMPTION = "Blink Drive Energy Consuption";
public static final String BLINK_DRIVE_RANGE = "Blink Drive Range";
@ -44,10 +44,14 @@ public class BlinkDriveModule extends PowerModuleBase implements IRightClickModu
@Override
public String getName() {
MODULE_BLINK_DRIVE = StatCollector.translateToLocal("module.blinkDrive.name");
return MODULE_BLINK_DRIVE;
}
@Override
public String getDisplayName() {
return StatCollector.translateToLocal("module.blinkDrive.name");
}
@Override
public String getDescription() {
return "Get from point A to point C via point B, where point B is a fold in space & time.";

View file

@ -14,7 +14,7 @@ import net.minecraft.util.StatCollector;
import java.util.List;
public class ClimbAssistModule extends PowerModuleBase implements IToggleableModule, IPlayerTickModule {
public static String MODULE_CLIMB_ASSIST;
public static final String MODULE_CLIMB_ASSIST = "Uphill Step Assist";
public ClimbAssistModule(List<IModularItem> validItems) {
super(validItems);
@ -28,10 +28,14 @@ public class ClimbAssistModule extends PowerModuleBase implements IToggleableMod
@Override
public String getName() {
MODULE_CLIMB_ASSIST = StatCollector.translateToLocal("module.climbAssist.name");
return MODULE_CLIMB_ASSIST;
}
@Override
public String getDisplayName() {
return StatCollector.translateToLocal("module.climbAssist.name");
}
@Override
public String getDescription() {
return "A pair of dedicated servos allow you to effortlessly step up 1m-high ledges.";

View file

@ -11,8 +11,7 @@ import net.minecraft.util.StatCollector;
import java.util.List;
public class FlightControlModule extends PowerModuleBase implements IToggleableModule {
public static String MODULE_FLIGHT_CONTROL;
public static final String MODULE_FLIGHT_CONTROL = "Flight Control";
public static final String FLIGHT_VERTICALITY = "Y-look ratio";
public FlightControlModule(List<IModularItem> validItems) {
@ -33,10 +32,14 @@ public class FlightControlModule extends PowerModuleBase implements IToggleableM
@Override
public String getName() {
MODULE_FLIGHT_CONTROL = StatCollector.translateToLocal("module.flightControl.name");
return MODULE_FLIGHT_CONTROL;
}
@Override
public String getDisplayName() {
return StatCollector.translateToLocal("module.flightControl.name");
}
@Override
public String getDescription() {
return "An integrated control circuit to help you fly better. Press Z to go down.";

View file

@ -17,7 +17,7 @@ import net.minecraft.util.Vec3;
import java.util.List;
public class GliderModule extends PowerModuleBase implements IToggleableModule, IPlayerTickModule {
public static String MODULE_GLIDER;
public static final String MODULE_GLIDER = "Glider";
@Override
public String getTextureFile() {
@ -36,10 +36,14 @@ public class GliderModule extends PowerModuleBase implements IToggleableModule,
@Override
public String getName() {
MODULE_GLIDER = StatCollector.translateToLocal("module.glider.name");
return MODULE_GLIDER;
}
@Override
public String getDisplayName() {
return StatCollector.translateToLocal("module.glider.name");
}
@Override
public String getDescription() {
return "Tack on some wings to turn downward into forward momentum. Press sneak+forward while falling to activate.";

View file

@ -20,7 +20,7 @@ import net.minecraft.util.StatCollector;
import java.util.List;
public class JetBootsModule extends PowerModuleBase implements IToggleableModule, IPlayerTickModule {
public static String MODULE_JETBOOTS;
public static final String MODULE_JETBOOTS = "Jet Boots";
public static final String JET_ENERGY_CONSUMPTION = "Jetboots Energy Consumption";
public static final String JET_THRUST = "Jetboots Thrust";
@ -40,10 +40,14 @@ public class JetBootsModule extends PowerModuleBase implements IToggleableModule
@Override
public String getName() {
MODULE_JETBOOTS = StatCollector.translateToLocal("module.jetBoots.name");
return MODULE_JETBOOTS;
}
@Override
public String getDisplayName() {
return StatCollector.translateToLocal("module.jetBoots.name");
}
@Override
public String getDescription() {
return "Jet boots are not as strong as a jetpack, but they should at least be strong enough to counteract gravity.";

View file

@ -20,7 +20,7 @@ import net.minecraft.util.StatCollector;
import java.util.List;
public class JetPackModule extends PowerModuleBase implements IToggleableModule, IPlayerTickModule {
public static String MODULE_JETPACK;
public static final String MODULE_JETPACK = "Jetpack";
public static final String JET_ENERGY_CONSUMPTION = "Jetpack Energy Consumption";
public static final String JET_THRUST = "Jetpack Thrust";
@ -40,10 +40,14 @@ public class JetPackModule extends PowerModuleBase implements IToggleableModule,
@Override
public String getName() {
MODULE_JETPACK = StatCollector.translateToLocal("module.jetpack.name");
return MODULE_JETPACK;
}
@Override
public String getDisplayName() {
return StatCollector.translateToLocal("module.jetpack.name");
}
@Override
public String getDescription() {
return "A jetpack should allow you to jump indefinitely, or at least until you run out of power.";

View file

@ -17,7 +17,7 @@ import net.minecraft.util.StatCollector;
import java.util.List;
public class JumpAssistModule extends PowerModuleBase implements IToggleableModule, IPlayerTickModule {
public static String MODULE_JUMP_ASSIST;
public static final String MODULE_JUMP_ASSIST = "Jump Assist";
public static final String JUMP_ENERGY_CONSUMPTION = "Jump Energy Consumption";
public static final String JUMP_MULTIPLIER = "Jump Boost";
public static final String JUMP_FOOD_COMPENSATION = "Jump Exhaustion Compensation";
@ -36,10 +36,14 @@ public class JumpAssistModule extends PowerModuleBase implements IToggleableModu
@Override
public String getName() {
MODULE_JUMP_ASSIST = StatCollector.translateToLocal("module.jumpAssist.name");
return MODULE_JUMP_ASSIST;
}
@Override
public String getDisplayName() {
return StatCollector.translateToLocal("module.jumpAssist.name");
}
@Override
public String getDescription() {
return "Another set of servo motors to help you jump higher.";

View file

@ -16,7 +16,7 @@ import net.minecraft.util.StatCollector;
import java.util.List;
public class ParachuteModule extends PowerModuleBase implements IToggleableModule, IPlayerTickModule {
public static String MODULE_PARACHUTE;
public static final String MODULE_PARACHUTE = "Parachute";
public ParachuteModule(List<IModularItem> validItems) {
super(validItems);
@ -30,10 +30,14 @@ public class ParachuteModule extends PowerModuleBase implements IToggleableModul
@Override
public String getName() {
MODULE_PARACHUTE = StatCollector.translateToLocal("module.parachute.name");
return MODULE_PARACHUTE;
}
@Override
public String getDisplayName() {
return StatCollector.translateToLocal("module.parachute.name");
}
@Override
public String getDescription() {
return "Add a parachute to slow your descent. Activate by pressing sneak (defaults to Shift) in midair.";

View file

@ -13,7 +13,7 @@ import net.minecraft.util.StatCollector;
import java.util.List;
public class ShockAbsorberModule extends PowerModuleBase implements IToggleableModule {
public static String MODULE_SHOCK_ABSORBER;
public static final String MODULE_SHOCK_ABSORBER = "Shock Absorber";
public static final String SHOCK_ABSORB_MULTIPLIER = "Distance Reduction";
public static final String SHOCK_ABSORB_ENERGY_CONSUMPTION = "Impact Energy consumption";
@ -31,10 +31,14 @@ public class ShockAbsorberModule extends PowerModuleBase implements IToggleableM
@Override
public String getName() {
MODULE_SHOCK_ABSORBER = StatCollector.translateToLocal("module.shockAbsorber.name");
return MODULE_SHOCK_ABSORBER;
}
@Override
public String getDisplayName() {
return StatCollector.translateToLocal("module.shockAbsorber.name");
}
@Override
public String getDescription() {
return "With some servos, springs, and padding, you should be able to negate a portion of fall damage.";

View file

@ -16,7 +16,7 @@ import net.minecraft.util.StatCollector;
import java.util.List;
public class SprintAssistModule extends PowerModuleBase implements IToggleableModule, IPlayerTickModule {
public static String MODULE_SPRINT_ASSIST;
public static final String MODULE_SPRINT_ASSIST = "Sprint Assist";
public static final String SPRINT_ENERGY_CONSUMPTION = "Sprint Energy Consumption";
public static final String SPRINT_SPEED_MULTIPLIER = "Sprint Speed Multiplier";
public static final String SPRINT_FOOD_COMPENSATION = "Sprint Exhaustion Compensation";
@ -38,10 +38,14 @@ public class SprintAssistModule extends PowerModuleBase implements IToggleableMo
@Override
public String getName() {
MODULE_SPRINT_ASSIST = StatCollector.translateToLocal("module.sprintAssist.name");
return MODULE_SPRINT_ASSIST;
}
@Override
public String getDisplayName() {
return StatCollector.translateToLocal("module.sprintAssist.name");
}
@Override
public String getDescription() {
return "A set of servo motors to help you sprint (double-tap forward) and walk faster.";

View file

@ -20,7 +20,7 @@ import net.minecraft.util.StatCollector;
import java.util.List;
public class SwimAssistModule extends PowerModuleBase implements IToggleableModule, IPlayerTickModule {
public static String MODULE_SWIM_BOOST;
public static final String MODULE_SWIM_BOOST = "Swim Boost";
public static final String SWIM_BOOST_AMOUNT = "Underwater Movement Boost";
public static final String SWIM_BOOST_ENERGY_CONSUMPTION = "Swim Boost Energy Consumption";
@ -39,10 +39,14 @@ public class SwimAssistModule extends PowerModuleBase implements IToggleableModu
@Override
public String getName() {
MODULE_SWIM_BOOST = StatCollector.translateToLocal("module.swimAssist.name");
return MODULE_SWIM_BOOST;
}
@Override
public String getDisplayName() {
return StatCollector.translateToLocal("module.swimAssist.name");
}
@Override
public String getDescription() {
return "By refitting an ion thruster for underwater use, you may be able to add extra forward (or backward) thrust when underwater.";

View file

@ -20,7 +20,7 @@ import net.minecraftforge.event.entity.player.PlayerEvent.BreakSpeed;
import java.util.List;
public class AquaAffinityModule extends PowerModuleBase implements IBlockBreakingModule, IToggleableModule {
public static String MODULE_AQUA_AFFINITY;
public static final String MODULE_AQUA_AFFINITY = "Aqua Affinity";
public static final String AQUA_AFFINITY_ENERGY_CONSUMPTION = "Underwater Energy Consumption";
public static final String UNDERWATER_HARVEST_SPEED = "Underwater Harvest Speed";
@ -40,10 +40,14 @@ public class AquaAffinityModule extends PowerModuleBase implements IBlockBreakin
@Override
public String getName() {
MODULE_AQUA_AFFINITY = StatCollector.translateToLocal("module.aquaAffinity.name");
return MODULE_AQUA_AFFINITY;
}
@Override
public String getDisplayName() {
return StatCollector.translateToLocal("module.aquaAffinity.name");
}
@Override
public String getDescription() {
return "Reduces the speed penalty for using your tool underwater.";

View file

@ -23,7 +23,7 @@ import net.minecraftforge.event.entity.player.PlayerEvent.BreakSpeed;
import java.util.List;
public class AxeModule extends PowerModuleBase implements IBlockBreakingModule, IToggleableModule {
public static String MODULE_AXE;
public static final String MODULE_AXE = "Axe";
public static final ItemStack ironAxe = new ItemStack(Item.axeIron);
public static final String AXE_ENERGY_CONSUMPTION = "Axe Energy Consumption";
public static final String AXE_HARVEST_SPEED = "Axe Harvest Speed";
@ -48,10 +48,14 @@ public class AxeModule extends PowerModuleBase implements IBlockBreakingModule,
@Override
public String getName() {
MODULE_AXE = StatCollector.translateToLocal("module.axe.name");
return MODULE_AXE;
}
@Override
public String getDisplayName() {
return StatCollector.translateToLocal("module.axe.name");
}
@Override
public String getDescription() {
return "Axes are mostly for chopping trees.";

View file

@ -21,7 +21,7 @@ import net.minecraftforge.event.entity.player.PlayerEvent.BreakSpeed;
import java.util.List;
public class DiamondPickUpgradeModule extends PowerModuleBase implements IBlockBreakingModule, IToggleableModule {
public static String MODULE_DIAMOND_PICK_UPGRADE;
public static final String MODULE_DIAMOND_PICK_UPGRADE = "Diamond Drill Upgrade";
public static final ItemStack diamondPick = new ItemStack(Item.pickaxeDiamond);
public DiamondPickUpgradeModule(List<IModularItem> validItems) {
@ -37,10 +37,14 @@ public class DiamondPickUpgradeModule extends PowerModuleBase implements IBlockB
@Override
public String getName() {
MODULE_DIAMOND_PICK_UPGRADE = StatCollector.translateToLocal("module.diamondPickUpgrade.name");
return MODULE_DIAMOND_PICK_UPGRADE;
}
@Override
public String getDisplayName() {
return StatCollector.translateToLocal("module.diamondPickUpgrade.name");
}
@Override
public String getDescription() {
return "Add diamonds to allow your pickaxe module to mine Obsidian. *REQUIRES PICKAXE MODULE TO WORK*";

View file

@ -23,7 +23,9 @@ class FieldTinkerModule(list: java.util.List[IModularItem]) extends PowerModuleB
addInstallCost(MuseItemUtils.copyAndResize(ItemComponent.servoMotor, 2))
def getCategory: String = MuseCommonStrings.CATEGORY_SPECIAL
def getName: String = StatCollector.translateToLocal("module.fieldTinkerer.name")
def getName: String = "Field Tinker Module"
def getDisplayName: String = StatCollector.translateToLocal("module.fieldTinkerer.name")
def getDescription: String = "Maybe you can't memorize the blueprints, but you should at least be able to fine tune your modules without Inspiration\u2122 Inc. LLC."

View file

@ -14,7 +14,7 @@ import java.util.List;
* Time: 2:02 PM
*/
public class GrafterModule extends PowerModuleBase {
public static String MODULE_GRAFTER;
public static final String MODULE_GRAFTER = "Grafter";
public static final String GRAFTER_ENERGY_CONSUMPTION = "Grafter Energy Consumption";
public static final String GRAFTER_HEAT_GENERATION = "Grafter Heat Generation";
@ -32,10 +32,14 @@ public class GrafterModule extends PowerModuleBase {
@Override
public String getName() {
MODULE_GRAFTER = StatCollector.translateToLocal("module.grafter.name");
return MODULE_GRAFTER;
}
@Override
public String getDisplayName() {
return StatCollector.translateToLocal("module.grafter.name");
}
@Override
public String getDescription() {
return "A Forestry grafter integrated into your power tool.";

View file

@ -23,7 +23,7 @@ import net.minecraftforge.event.entity.player.UseHoeEvent;
import java.util.List;
public class HoeModule extends PowerModuleBase implements IPowerModule, IRightClickModule {
public static String MODULE_HOE;
public static final String MODULE_HOE = "Rototiller";
public static final String HOE_ENERGY_CONSUMPTION = "Hoe Energy Consumption";
public static final String HOE_SEARCH_RADIUS = "Hoe Search Radius";
@ -94,10 +94,14 @@ public class HoeModule extends PowerModuleBase implements IPowerModule, IRightCl
@Override
public String getName() {
MODULE_HOE = StatCollector.translateToLocal("module.hoe.name");
return MODULE_HOE;
}
@Override
public String getDisplayName() {
return StatCollector.translateToLocal("module.hoe.name");
}
@Override
public String getDescription() {
return "An automated tilling addon to make it easy to till large swaths of land at once.";

View file

@ -16,7 +16,7 @@ import net.minecraft.world.World;
import java.util.List;
public class LuxCapacitor extends PowerModuleBase implements IRightClickModule {
public static String MODULE_LUX_CAPACITOR;
public static final String MODULE_LUX_CAPACITOR = "Lux Capacitor";
public static final String ENERGY = "Lux Capacitor Energy Consumption";
public LuxCapacitor(List<IModularItem> validItems) {
@ -33,10 +33,14 @@ public class LuxCapacitor extends PowerModuleBase implements IRightClickModule {
@Override
public String getName() {
MODULE_LUX_CAPACITOR = StatCollector.translateToLocal("module.luxCapacitor.name");
return MODULE_LUX_CAPACITOR;
}
@Override
public String getDisplayName() {
return StatCollector.translateToLocal("module.luxCapacitor.name");
}
@Override
public String getDescription() {
return "Launch a virtually infinite number of attractive light sources at the wall.";

View file

@ -16,7 +16,7 @@ import java.util.List;
* 7:21 PM 4/25/13
*/
public class MFFSFieldTeleporterModule extends PowerModuleBase {
public static String MODULE_FIELD_TELEPORTER;
public static final String MODULE_FIELD_TELEPORTER = "MFFS Field Teleporter";
public static final String FIELD_TELEPORTER_ENERGY_CONSUMPTION = "Field Teleporter Energy Consumption";
public MFFSFieldTeleporterModule(List<IModularItem> validItems) throws IllegalAccessException, NoSuchFieldException, ClassNotFoundException {
@ -37,10 +37,14 @@ public class MFFSFieldTeleporterModule extends PowerModuleBase {
@Override
public String getName() {
MODULE_FIELD_TELEPORTER = StatCollector.translateToLocal("module.fieldTeleporter.name");
return MODULE_FIELD_TELEPORTER;
}
@Override
public String getDisplayName() {
return StatCollector.translateToLocal("module.mffsFieldTeleporter.name");
}
@Override
public String getDescription() {
return "A tool which allows you to teleport through MFFS forcefields that you own if you have enough energy.";

View file

@ -2,7 +2,6 @@ package net.machinemuse.powersuits.powermodule.tool;
import net.machinemuse.api.IModularItem;
import net.machinemuse.api.moduletrigger.IRightClickModule;
import net.machinemuse.powersuits.common.Config;
import net.machinemuse.powersuits.common.ModCompatability;
import net.machinemuse.powersuits.item.ItemComponent;
import net.machinemuse.powersuits.powermodule.PowerModuleBase;
@ -42,6 +41,11 @@ public class MultimeterModule extends PowerModuleBase implements IRightClickModu
return MODULE_MULTIMETER;
}
@Override
public String getDisplayName() {
return MODULE_MULTIMETER;
}
@Override
public String getDescription() {
return "A tool addon that reads the Universal Electricity power generation in a wire.";

View file

@ -33,7 +33,7 @@ import java.util.List;
* 4:39 PM 4/21/13
*/
public class OmniWrenchModule extends PowerModuleBase implements IRightClickModule {
public static String MODULE_OMNI_WRENCH;
public static final String MODULE_OMNI_WRENCH = "Prototype OmniWrench";
public static final int[] SIDE_OPPOSITE = {1, 0, 3, 2, 5, 4};
public OmniWrenchModule(List<IModularItem> validItems) {
@ -58,10 +58,14 @@ public class OmniWrenchModule extends PowerModuleBase implements IRightClickModu
@Override
public String getName() {
MODULE_OMNI_WRENCH = StatCollector.translateToLocal("module.omniwrench.name");
return MODULE_OMNI_WRENCH;
}
@Override
public String getDisplayName() {
return StatCollector.translateToLocal("module.omniwrench.name");
}
@Override
public String getDescription() {
return "A wrench which can interact with almost every mod.";

View file

@ -21,7 +21,7 @@ import net.minecraftforge.event.entity.player.PlayerEvent.BreakSpeed;
import java.util.List;
public class PickaxeModule extends PowerModuleBase implements IBlockBreakingModule, IToggleableModule {
public static String MODULE_PICKAXE;
public static final String MODULE_PICKAXE = "Pickaxe";
public static final ItemStack ironPickaxe = new ItemStack(Item.pickaxeIron);
public static final String PICKAXE_HARVEST_SPEED = "Pickaxe Harvest Speed";
public static final String PICKAXE_ENERGY_CONSUMPTION = "Pickaxe Energy Consumption";
@ -43,10 +43,14 @@ public class PickaxeModule extends PowerModuleBase implements IBlockBreakingModu
@Override
public String getName() {
MODULE_PICKAXE = StatCollector.translateToLocal("module.pickaxe.name");
return MODULE_PICKAXE;
}
@Override
public String getDisplayName() {
return StatCollector.translateToLocal("module.pickaxe.name");
}
@Override
public String getDescription() {
return "Picks are good for harder materials like stone and ore.";

View file

@ -22,7 +22,9 @@ class RedstoneLaser(list: java.util.List[IModularItem]) extends PowerModuleBase(
def getCategory: String = MuseCommonStrings.CATEGORY_SPECIAL
def getName: String = StatCollector.translateToLocal("module.redstoneLaser.name")
def getName: String = "Redstone Laser"
def getDisplayName: String = StatCollector.translateToLocal("module.redstoneLaser.name")
def getDescription: String = "No need for a lever if you're just giving it a pulse."

View file

@ -33,7 +33,7 @@ import java.util.Random;
public class ShearsModule extends PowerModuleBase implements IBlockBreakingModule, IRightClickModule {
public static final ItemStack shears = new ItemStack(Item.shears);
public static String MODULE_SHEARS;
public static final String MODULE_SHEARS = "Shears";
private static final String SHEARING_ENERGY_CONSUMPTION = "Shearing Energy Consumption";
private static final String SHEARING_HARVEST_SPEED = "Shearing Harvest Speed";
@ -55,10 +55,14 @@ public class ShearsModule extends PowerModuleBase implements IBlockBreakingModul
@Override
public String getName() {
MODULE_SHEARS = StatCollector.translateToLocal("module.shears.name");
return MODULE_SHEARS;
}
@Override
public String getDisplayName() {
return StatCollector.translateToLocal("module.shears.name");
}
@Override
public String getDescription() {
return "Cuts through leaves, wool, and creepers alike.";

View file

@ -21,7 +21,7 @@ import net.minecraftforge.event.entity.player.PlayerEvent.BreakSpeed;
import java.util.List;
public class ShovelModule extends PowerModuleBase implements IBlockBreakingModule, IToggleableModule {
public static String MODULE_SHOVEL;
public static final String MODULE_SHOVEL = "Shovel";
public static final ItemStack ironShovel = new ItemStack(Item.shovelIron);
public static final String SHOVEL_HARVEST_SPEED = "Shovel Harvest Speed";
public static final String SHOVEL_ENERGY_CONSUMPTION = "Shovel Energy Consumption";
@ -43,10 +43,14 @@ public class ShovelModule extends PowerModuleBase implements IBlockBreakingModul
@Override
public String getName() {
MODULE_SHOVEL = StatCollector.translateToLocal("module.shovel.name");
return MODULE_SHOVEL;
}
@Override
public String getDisplayName() {
return StatCollector.translateToLocal("module.shovel.name");
}
@Override
public String getDescription() {
return "Shovels are good for soft materials like dirt and sand.";

View file

@ -17,7 +17,7 @@ import net.minecraft.world.World;
import java.util.List;
public class BladeLauncherModule extends PowerModuleBase implements IRightClickModule {
public static String MODULE_BLADE_LAUNCHER;
public static final String MODULE_BLADE_LAUNCHER = "Blade Launcher";
public static final String BLADE_ENERGY = "Spinning Blade Energy Consumption";
public static final String BLADE_DAMAGE = "Spinning Blade Damage";
@ -36,10 +36,14 @@ public class BladeLauncherModule extends PowerModuleBase implements IRightClickM
@Override
public String getName() {
MODULE_BLADE_LAUNCHER = StatCollector.translateToLocal("module.bladeLauncher.name");
return MODULE_BLADE_LAUNCHER;
}
@Override
public String getDisplayName() {
return StatCollector.translateToLocal("module.bladeLauncher.name");
}
@Override
public String getDescription() {
return "Launches a spinning blade of death (or shearing).";

View file

@ -10,7 +10,7 @@ import net.minecraft.util.StatCollector;
import java.util.List;
public class MeleeAssistModule extends PowerModuleBase {
public static String MODULE_MELEE_ASSIST;
public static final String MODULE_MELEE_ASSIST = "Melee Assist";
public static final String PUNCH_ENERGY = "Punch Energy Consumption";
public static final String PUNCH_DAMAGE = "Melee Damage";
public static final String PUNCH_KNOCKBACK = "Melee Knockback";
@ -39,10 +39,14 @@ public class MeleeAssistModule extends PowerModuleBase {
@Override
public String getName() {
MODULE_MELEE_ASSIST = StatCollector.translateToLocal("module.meleeAssist.name");
return MODULE_MELEE_ASSIST;
}
@Override
public String getDisplayName() {
return StatCollector.translateToLocal("module.meleeAssist.name");
}
@Override
public String getDescription() {
return "A much simpler addon, makes your powertool punches hit harder.";

View file

@ -18,7 +18,7 @@ import net.minecraft.world.World;
import java.util.List;
public class PlasmaCannonModule extends PowerModuleBase implements IRightClickModule {
public static String MODULE_PLASMA_CANNON;
public static final String MODULE_PLASMA_CANNON = "Plasma Cannon";
public static final String PLASMA_CANNON_ENERGY_PER_TICK = "Plasma Energy Per Tick";
public static final String PLASMA_CANNON_DAMAGE_AT_FULL_CHARGE = "Plasma Damage At Full Charge";
public static final String PLASMA_CANNON_EXPLOSIVENESS = "Plasma Explosiveness";
@ -42,10 +42,14 @@ public class PlasmaCannonModule extends PowerModuleBase implements IRightClickMo
@Override
public String getName() {
MODULE_PLASMA_CANNON = StatCollector.translateToLocal("module.plasmaCannon.name");
return MODULE_PLASMA_CANNON;
}
@Override
public String getDisplayName() {
return StatCollector.translateToLocal("module.plasmaCannon.name");
}
@Override
public String getDescription() {
return "Use electrical arcs in a containment field to superheat air to a plasma and launch it at enemies.";

View file

@ -19,10 +19,10 @@ import java.util.List;
public class RailgunModule extends PowerModuleBase implements IRightClickModule {
// private List<String> particles;
// private Iterator<String> iterator;
public static String MODULE_RAILGUN;
public static String IMPULSE = "Railgun Total Impulse";
public static String ENERGY = "Railgun Energy Cost";
public static String HEAT = "Railgun Heat Emission";
public static final String MODULE_RAILGUN = "Railgun";
public static final String IMPULSE = "Railgun Total Impulse";
public static final String ENERGY = "Railgun Energy Cost";
public static final String HEAT = "Railgun Heat Emission";
public RailgunModule(List<IModularItem> validItems) {
super(validItems);
@ -49,10 +49,14 @@ public class RailgunModule extends PowerModuleBase implements IRightClickModule
@Override
public String getName() {
MODULE_RAILGUN = StatCollector.translateToLocal("module.railgun.name");
return MODULE_RAILGUN;
}
@Override
public String getDisplayName() {
return StatCollector.translateToLocal("module.railgun.name");
}
@Override
public String getDescription() {
return "An assembly which accelerates a projectile to supersonic speeds using magnetic force. Heavy recoil.";

View file

@ -13,7 +13,7 @@ import java.util.List;
public class SonicWeaponModule extends PowerModuleBase implements IRightClickModule {
public static String MODULE_SONIC_WEAPON;
public static final String MODULE_SONIC_WEAPON = "Sonic Weapon";
public SonicWeaponModule(List<IModularItem> validItems) {
super(validItems);
@ -26,10 +26,14 @@ public class SonicWeaponModule extends PowerModuleBase implements IRightClickMod
@Override
public String getName() {
MODULE_SONIC_WEAPON = StatCollector.translateToLocal("module.sonicWeapon.name");
return MODULE_SONIC_WEAPON;
}
@Override
public String getDisplayName() {
return StatCollector.translateToLocal("module.sonicWeapon.name");
}
@Override
public String getDescription() {
return "A high-amplitude, complex-frequency soundwave generator can have shattering or disorienting effects on foes and blocks alike.";