Include faction state in checksum.
authorCMDR furrycat <elite@furrycat.net>
Thu, 11 May 2017 09:29:10 +0000 (10:29 +0100)
committerCMDR furrycat <elite@furrycat.net>
Thu, 11 May 2017 09:29:10 +0000 (10:29 +0100)
Factions may change state but not influence, eg after a conflict, but we
were not inferring that there had been a tick.

plugin/faction/faction.py

index d8bdedc..b937f0c 100644 (file)
@@ -779,7 +779,7 @@ class Faction(DBConnection):
     await self.update_factions(message.get('StarSystem'), factions, message.get('timestamp'))
 
   async def update_factions(self, system, factions, iso8601):
-    influence = ', '.join(['{} {:.2f}%'.format(faction['Name'], faction['Influence'] * 100.0) for faction in reversed(sorted(factions, key = lambda faction: faction['Influence']))])
+    influence = ', '.join(['{} {:.2f}% {}'.format(faction['Name'], faction['Influence'] * 100.0, faction['FactionState']) for faction in reversed(sorted(factions, key = lambda faction: faction['Influence']))])
     log.debug('{} factions: {}'.format(system, influence))
     try:
       timestamp = bot.parse_iso8601(iso8601)