/*
* 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.slick2d.util.Log;
import transientlibs.bindedobjects.core.Binding;
import transientlibs.bindedobjects.core.datasets.LesserBindedValue;
import transientlibs.bindedobjects.core.loaders.ItemGroupsLoader;
import transientlibs.tex.StringAnalyst;
/**
*
* @author kibertoad
*/
public class ItemGroups extends LesserBindedValue {
public int equipmentSlot;
//public static ArrayList<ItemGroups> itemGroups = new ArrayList<ItemGroups>();
//public static ItemGroups lastItemGroups;
public static LesserBindedValueContainer<ItemGroups> container = new LesserBindedValueContainer<ItemGroups>(Binding.itemTypeBinding);
public static void loadItemGroups() {
ItemGroupsLoader loader = new ItemGroupsLoader (container);
loader.loadFromFile("itemgroups.dat");
}
public static ItemGroups getItemGroupsByID(int getCode) {
/*
for (ItemGroups i : itemGroups) {
if (i.ID == getCode) {
return i;
}
}
*/
//return null;
return container.getByID(getCode);
}
public static ItemGroups getItemGroupsByCode(String byCode) {
//return getItemGroupsByID(Binding.readBinding(Binding.itemTypeBinding, byCode.toLowerCase()));
return container.getByCode(byCode);
}
}