Package transientlibs.bindedobjects.core.datasets

Source Code of transientlibs.bindedobjects.core.datasets.ItemGroups

/*
* 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);
    }
}
TOP

Related Classes of transientlibs.bindedobjects.core.datasets.ItemGroups

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.