/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package transientlibs.bindedobjects.core.datasets;
import java.util.ArrayList;
import transientlibs.bindedobjects.core.Binding;
import transientlibs.bindedobjects.core.datasets.LesserBindedValue;
import transientlibs.bindedobjects.core.loaders.EquipmentSlotsLoader;
/**
*
* @author kibertoad
*/
public class EquipmentSlots extends LesserBindedValue {
public String code;
public int bodyPart;
//public static ArrayList<EquipmentSlots> equipmentSlots = new ArrayList<EquipmentSlots>();
//public static EquipmentSlots lastEquipmentSlots;
public static LesserBindedValueContainer<EquipmentSlots> container = new LesserBindedValueContainer<EquipmentSlots>(Binding.equipmentSlotBinding);
public static void loadEquipmentSlots() {
EquipmentSlotsLoader loader = new EquipmentSlotsLoader (container);
loader.loadEquipmentSlots();
}
public static EquipmentSlots getEquipmentSlotsByID(int getCode) {
for (EquipmentSlots e : container.elements) {
if (e.ID == getCode) {
return e;
}
}
return null;
}
public static EquipmentSlots getEquipmentSlotsByCode(String byCode) {
return getEquipmentSlotsByID(Binding.readBinding(Binding.equipmentSlotBinding, byCode.toLowerCase()));
}
}