MCPcopy
hub / github.com/PokemonGoF/PokemonGo-Bot / tick

Method tick

pokemongo_bot/__init__.py:811–835  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

809
810
811 def tick(self):
812 self.health_record.heartbeat()
813 self.cell = self.get_meta_cell()
814
815 if self.sleep_schedule:
816 self.sleep_schedule.work()
817
818 now = time.time() * 1000
819
820 for fort in self.cell["forts"]:
821 timeout = fort.get("cooldown_complete_timestamp_ms", 0)
822
823 if timeout >= now:
824 self.fort_timeouts[fort["id"]] = timeout
825
826 self._refresh_inventory()
827
828 self.tick_count += 1
829
830 # Check if session token has expired
831 self.check_session(self.position)
832
833 for worker in self.workers:
834 if worker.work() == WorkerResult.RUNNING:
835 return
836
837 def get_meta_cell(self):
838 location = self.position[0:2]

Callers 1

mainFunction · 0.95

Calls 6

get_meta_cellMethod · 0.95
_refresh_inventoryMethod · 0.95
check_sessionMethod · 0.95
heartbeatMethod · 0.45
workMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected