Created
December 1, 2018 16:35
-
-
Save XANi/159c16bd87c5e2651bcd1ef290f50df4 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@@ -1191,16 +1191,6 @@ class TimelineExtractor: | |
).order_by( | |
models.HistoricalEvent.start_date_days.desc() | |
).first() | |
- if capital_event is None or capital_event.planet.planet_id != capital.planet_id: | |
- self._session.add(models.HistoricalEvent( | |
- event_type=models.HistoricalEventType.capital_relocation, | |
- country=country_model, | |
- leader=ruler, | |
- start_date_days=self._date_in_days, | |
- planet=capital, | |
- system=capital.system if capital else None, | |
- is_known_to_player=country_model.is_known_to_player(), | |
- )) | |
return capital | |
def _history_add_or_update_ruler(self, ruler: models.Leader, country_model: models.Country, capital_planet: models.Planet): | |
@@ -1228,9 +1218,6 @@ class TimelineExtractor: | |
else: | |
most_recent_ruler_event.end_date_days = self._date_in_days - 1 | |
most_recent_ruler_event.is_known_to_player = country_model.is_known_to_player() | |
- if most_recent_ruler_event.planet is None: | |
- most_recent_ruler_event.planet = capital_planet | |
- most_recent_ruler_event.system = capital_planet.system | |
self._session.add(most_recent_ruler_event) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment