2013-01-10 01:09:31 +01:00
|
|
|
package net.machinemuse.powersuits.powermodule;
|
|
|
|
|
2013-02-11 10:21:06 +01:00
|
|
|
import net.machinemuse.api.IModularItem;
|
2013-01-10 01:09:31 +01:00
|
|
|
|
2013-06-27 07:33:41 +02:00
|
|
|
import java.util.List;
|
|
|
|
|
2013-03-11 01:17:35 +01:00
|
|
|
public class PowerModule extends PowerModuleBase {
|
2013-01-10 01:09:31 +01:00
|
|
|
protected String name;
|
|
|
|
protected String description;
|
|
|
|
protected String category;
|
2013-03-20 08:06:29 +01:00
|
|
|
protected String textureFile;
|
2013-01-10 01:09:31 +01:00
|
|
|
|
2013-03-20 08:06:29 +01:00
|
|
|
public PowerModule(String name, List<IModularItem> validItems, String textureFile, String category) {
|
2013-03-11 01:17:35 +01:00
|
|
|
super(name, validItems);
|
2013-01-10 01:09:31 +01:00
|
|
|
this.name = name;
|
|
|
|
this.category = category;
|
2013-03-20 08:06:29 +01:00
|
|
|
this.textureFile = textureFile;
|
2013-01-10 01:09:31 +01:00
|
|
|
}
|
|
|
|
|
2013-03-24 19:50:42 +01:00
|
|
|
@Override
|
2013-06-29 07:09:32 +02:00
|
|
|
public String getDataName() {
|
2013-01-10 01:09:31 +01:00
|
|
|
return name;
|
|
|
|
}
|
|
|
|
|
2013-06-27 07:33:41 +02:00
|
|
|
@Override
|
2013-06-29 07:09:32 +02:00
|
|
|
public String getLocalizedName() {
|
2015-08-29 15:58:17 +02:00
|
|
|
return "This module did not correctly label its name.";
|
2013-06-27 07:33:41 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2013-03-24 19:50:42 +01:00
|
|
|
@Override
|
2013-01-10 01:09:31 +01:00
|
|
|
public String getDescription() {
|
|
|
|
return description;
|
|
|
|
}
|
|
|
|
|
2013-03-24 19:50:42 +01:00
|
|
|
@Override
|
2013-01-10 01:09:31 +01:00
|
|
|
public String getCategory() {
|
|
|
|
return category;
|
|
|
|
}
|
|
|
|
|
2013-01-14 05:37:35 +01:00
|
|
|
public static String getUnit(String propertyName) {
|
2013-03-24 19:50:42 +01:00
|
|
|
String unit = units.get(propertyName);
|
|
|
|
return unit == null ? "" : unit;
|
2013-01-14 05:37:35 +01:00
|
|
|
}
|
|
|
|
|
2013-01-10 01:09:31 +01:00
|
|
|
public PowerModule setDescription(String description) {
|
|
|
|
this.description = description;
|
|
|
|
return this;
|
|
|
|
}
|
|
|
|
|
|
|
|
public PowerModule setCategory(String category) {
|
|
|
|
this.category = category;
|
|
|
|
return this;
|
|
|
|
}
|
|
|
|
|
|
|
|
public PowerModule setDefaultString(String key, String value) {
|
|
|
|
this.defaultTag.setString(key, value);
|
|
|
|
return this;
|
|
|
|
}
|
|
|
|
|
|
|
|
public PowerModule setDefaultDouble(String key, double value) {
|
|
|
|
this.defaultTag.setDouble(key, value);
|
|
|
|
return this;
|
|
|
|
}
|
|
|
|
|
2013-03-20 08:06:29 +01:00
|
|
|
@Override
|
|
|
|
public String getTextureFile() {
|
|
|
|
return textureFile;
|
|
|
|
}
|
|
|
|
|
2013-01-10 01:09:31 +01:00
|
|
|
}
|