@Subscribe public void checkPostDayChangeUpdates(ElectionWinnerNotification electionResult) { if (displayAtElectionDay && electionResult.getElectionType().equals(EElectionType.ALDERMAN) && electionResult.getCity().equals(city.getCity())) { ICity town = city.getCity(); ICityHall cityHall = cityHallAccessor.getCityHall(town); final LocalDateTime electionDate = cityHall.getAldermanElectionDate(); if (!dateService.isSameDay(electionDate, date.getCurrentDate())) { Platform.runLater(this::resetContent); } } } private StyleableObjectProperty<Font> font;
((CityHall) cityHall).setMayor(winner); ((CityHall) cityHall).setElectionDate(newDate); clientServerEventBus.post(new ElectionWinnerNotification(EElectionType.MAYORAL, cityHall.getCity())); if (winner instanceof IHumanPlayer) { String titleKey = "ch.sahits.game.openpatrician.engine.land.city.CityHallEngine.mayoralElection.title"; ((CityHall) hall).setAldermanElectionDate(newDate); clientServerEventBus.post(new ElectionWinnerNotification(EElectionType.ALDERMAN, cityHall.getCity())); if (winner instanceof IHumanPlayer) { String titleKey = "ch.sahits.game.openpatrician.engine.land.city.CityHallEngine.aldermanElection.title";
@Subscribe public void checkPostDayChangeUpdates(ElectionWinnerNotification electionResult) { if (displayAtElectionDay && electionResult.getElectionType().equals(EElectionType.MAYORAL) && electionResult.getCity().equals(city.getCity())) { ICity town = city.getCity(); IPlayer player = city.getPlayer(); ICityHall cityHall = cityHallAccessor.getCityHall(town); final LocalDateTime electionDate = cityHall.getElectionDate(); if (!dateService.isSameDay(electionDate, date.getCurrentDate())) { Platform.runLater(() -> resetContent(town, player)); } } }