if (entity instanceof Tank) { return default_tank; }
    private MechEntry entryFor(Entity entity) {        String model = entity.getModel();        int dash;        String beforeTheDash;                // first, check for exact matches        if (exact.containsKey(model)) {            return (MechEntry)exact.get(model);        }                // next, before-the-dash wildcard matches        dash = model.indexOf('-');        beforeTheDash = dash == -1 ? null : model.substring(0, dash);         if (beforeTheDash != null && wildcard.containsKey(beforeTheDash)) {            return (MechEntry)wildcard.get(beforeTheDash);        }                // next, the generic model        if (entity.entityIsQuad()) {            return default_quad;        }        // weight?        if (entity.getWeight() <= Mech.WEIGHT_LIGHT) {            return default_light;        } else if (entity.getWeight() <= Mech.WEIGHT_MEDIUM) {            return default_medium;        } else if (entity.getWeight() <= Mech.WEIGHT_HEAVY) {            return default_heavy;        } else if (entity.getWeight() <= Mech.WEIGHT_ASSAULT) {            return default_assault;        }                //TODO: better exception?        throw new IndexOutOfBoundsException("can't find an image for that mech");    }