mirror of
https://github.com/norohind/SquadsActivityMonitor.git
synced 2025-04-12 13:00:02 +03:00
Add hook to detect consoles activity
This commit is contained in:
parent
752d6b74b1
commit
cd049d5916
16
hooks/ConsolesDetect.py
Normal file
16
hooks/ConsolesDetect.py
Normal file
@ -0,0 +1,16 @@
|
||||
from typing import TYPE_CHECKING
|
||||
from Hook import Hook
|
||||
|
||||
if TYPE_CHECKING:
|
||||
import HookSystem
|
||||
|
||||
|
||||
class ConsolesDetect(Hook):
|
||||
def update(self, action_id: int, diff: list[dict]) -> None:
|
||||
for squad in diff:
|
||||
if squad['platform'] != 'PC':
|
||||
print(f'Detected non PC actions: {action_id}')
|
||||
|
||||
|
||||
def setup(hs: 'HookSystem'):
|
||||
hs.add_update_hook(ConsolesDetect())
|
Loading…
x
Reference in New Issue
Block a user