private static void loadItemTypes(String fn) {
        String line;
        String parts[];
        String armorBonuses[];

        try {
            InputStream in = Armor.class.getResourceAsStream(GameController.CONFIG_DIR + fn);
            BufferedReader br = new BufferedReader(new InputStreamReader(in));

            String set = "";
            String type = "";
            int[] armorBonus = new int[21];

            ArmorType at;

            while ((line = br.readLine()) != null) {
                if (line.length() == 0) {
                    continue;
                }
                if (line.startsWith("//")) {
                    continue;
                }

                parts = line.split(" ");

                if (parts.length != 3) {
                    System.out.println("Error in " + fn);
                }

                set = parts[0];
                type = parts[1];
                
                armorBonuses = parts[2].split(":");
                armorBonus = new int[21];
                armorBonus[0] = 0;
                for(int i = 0; i < armorBonuses.length; i++) {
                    armorBonus[i + 1] = Integer.parseInt(armorBonuses[i]);
                }

                at = new ArmorType(set, type, armorBonus);
                armorTypes.put(set + type, at);
            }
            in.close();
        } catch (Exception e) {
            System.err.println("Error: " + e.getMessage());
        }
    }