Package megamek.common.util

Examples of megamek.common.util.BuildingBlock.writeBlockData()


        }
        if (t.getStructureType() != 0) {
            blk.writeBlockData("internal_type", t.getStructureType());
        }
        if (t.isOmni()) {
            blk.writeBlockData("omni", 1);
        }
        int armor_array[];
        armor_array = new int[t.locations() - 1];
        for (int i = 1; i < t.locations(); i++) {
            armor_array[i - 1] = t.getOArmor(i);
View Full Code Here


        int armor_array[];
        armor_array = new int[t.locations() - 1];
        for (int i = 1; i < t.locations(); i++) {
            armor_array[i - 1] = t.getOArmor(i);
        }
        blk.writeBlockData("armor", armor_array);

        Vector<Vector<String>> eq = new Vector<Vector<String>>(t.locations());
        for (int i = 0; i < t.locations(); i++) {
            eq.add(new Vector<String>());
        }
View Full Code Here

            if (loc != Entity.LOC_NONE) {
                eq.get(loc).add(name);
            }
        }
        for (int i = 0; i < t.locations(); i++) {
            blk.writeBlockData(t.getLocationName(i) + " Equipment", eq.get(i));
        }
        blk.writeBlockFile(fileName);
    }

}
View Full Code Here

    public static void encode(String fileName, Tank t) {
        BuildingBlock blk = new BuildingBlock();
        blk.createNewBlock();
        if (t instanceof VTOL) {
            blk.writeBlockData("UnitType", "VTOL");
        } else {
            blk.writeBlockData("UnitType", "Tank");
        }
        blk.writeBlockData("blockversion", 1);
        blk.writeBlockData("Name", t.getChassis());
View Full Code Here

        BuildingBlock blk = new BuildingBlock();
        blk.createNewBlock();
        if (t instanceof VTOL) {
            blk.writeBlockData("UnitType", "VTOL");
        } else {
            blk.writeBlockData("UnitType", "Tank");
        }
        blk.writeBlockData("blockversion", 1);
        blk.writeBlockData("Name", t.getChassis());
        blk.writeBlockData("Model", t.getModel());
        blk.writeBlockData("year", t.getYear());
View Full Code Here

        if (t instanceof VTOL) {
            blk.writeBlockData("UnitType", "VTOL");
        } else {
            blk.writeBlockData("UnitType", "Tank");
        }
        blk.writeBlockData("blockversion", 1);
        blk.writeBlockData("Name", t.getChassis());
        blk.writeBlockData("Model", t.getModel());
        blk.writeBlockData("year", t.getYear());
        String type;
        if (t.isMixedTech()) {
View Full Code Here

            blk.writeBlockData("UnitType", "VTOL");
        } else {
            blk.writeBlockData("UnitType", "Tank");
        }
        blk.writeBlockData("blockversion", 1);
        blk.writeBlockData("Name", t.getChassis());
        blk.writeBlockData("Model", t.getModel());
        blk.writeBlockData("year", t.getYear());
        String type;
        if (t.isMixedTech()) {
            if (!t.isClan()) {
View Full Code Here

        } else {
            blk.writeBlockData("UnitType", "Tank");
        }
        blk.writeBlockData("blockversion", 1);
        blk.writeBlockData("Name", t.getChassis());
        blk.writeBlockData("Model", t.getModel());
        blk.writeBlockData("year", t.getYear());
        String type;
        if (t.isMixedTech()) {
            if (!t.isClan()) {
                type = "Mixed (IS Chassis)";
View Full Code Here

            blk.writeBlockData("UnitType", "Tank");
        }
        blk.writeBlockData("blockversion", 1);
        blk.writeBlockData("Name", t.getChassis());
        blk.writeBlockData("Model", t.getModel());
        blk.writeBlockData("year", t.getYear());
        String type;
        if (t.isMixedTech()) {
            if (!t.isClan()) {
                type = "Mixed (IS Chassis)";
            } else {
View Full Code Here

            case TechConstants.T_CLAN_ADVANCED:
                type = "Clan Level 3";
                break;
            }
        }
        blk.writeBlockData("type", type);
        blk.writeBlockData("tonnage", t.getWeight());
        blk.writeBlockData("motion_type", t.getMovementModeAsString());
        if (t.getTroopCarryingSpace() > 0) {
            blk.writeBlockData("transporters", "TroopSpace: " + t.getTroopCarryingSpace());
        }
View Full Code Here

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.