private void drawBurningBuildings(MrlBuilding b, Shape shape, Graphics2D g) { // switch (b.getEstimatedFieryness()) { switch (b.getSelfBuilding().getFieryness()) { case 1: g.setColor(HEATING_COLOUR); break; case 2: g.setColor(BURNING_COLOUR); break; case 3: g.setColor(INFERNO_COLOUR); break; case 4: g.setColor(WATER_DAMAGE_COLOUR); break; case 5: g.setColor(MINOR_DAMAGE_COLOUR); break; case 6: g.setColor(MODERATE_DAMAGE_COLOUR); break; case 7: g.setColor(SEVERE_DAMAGE_COLOUR); break; case 8: g.setColor(BURNT_OUT_COLOUR); break; } g.fill(shape); }
@Override protected void paintShape(Building b, Polygon shape, Graphics2D g) { if (StaticViewProperties.selectedObject != null) { BURNING_BUILDINGS.clear(); List<MrlBuilding> buildings = null; try { buildings = Collections.synchronizedList( BURNING_BUILDINGS_MAP.get(StaticViewProperties.selectedObject.getID())); } catch (NullPointerException ignored) { } if (buildings != null) { showRealFieriness = true; for (MrlBuilding bb : buildings) { // if (bb.getEstimatedFieryness() > 0 && // b.equals(bb.getSelfBuilding())) { if (bb.getSelfBuilding().isFierynessDefined() && bb.getSelfBuilding().getFieryness() > 0 && b.equals(bb.getSelfBuilding())) { drawBurningBuildings(bb, shape, g); BURNING_BUILDINGS.add(bb.getSelfBuilding().getID()); return; } // else if (bb.isProbablyOnFire() && b.equals(bb.getSelfBuilding())) { // g.setColor(PROB); // g.fill(shape); // return; // } } } else { showRealFieriness = false; } } }