Module nari.types.event.markers
Classes for overhead markers
Expand source code
"""Classes for overhead markers"""
from enum import IntEnum
from nari.types import Timestamp
from nari.types.event import Event
from nari.types.actor import Actor
class OverheadVFX(Event): # pylint: disable=too-few-public-methods
"""Event representing content-applied markers"""
def __init__(self, *,
timestamp: Timestamp,
actor: Actor,
marker_id: int,
):
super().__init__(timestamp)
self.actor = actor
self.marker_id = marker_id
def __repr__(self):
return f'<ContentMarker {self.marker_id}>'
# pylint: disable=invalid-name
class MarkerOperation(IntEnum):
"""Enums for marker operations"""
Unknown = 0
Add = 1
Update = 2
Delete = 3
# pylint: disable=invalid-name
class PlayerMarker(IntEnum):
"""Enums for player-applied markers, these IDs can be found in the Marker.exd client file"""
Attack1 = 0
Attack2 = 1
Attack3 = 2
Attack4 = 3
Attack5 = 4
Bind1 = 5
Bind2 = 6
Bind3 = 7
Ignore1 = 8
Ignore2 = 9
Square = 10
Circle = 11
Plus = 12
Triangle = 13
@classmethod
def contains(cls, value: int) -> bool:
"""Returns true if the value is a valid PlayerMarkerType"""
return value in cls._value2member_map_ # pylint: disable=no-member
class OverheadMarker(Event): # pylint: disable=too-few-public-methods
"""Event representing player-applied markers"""
def __init__(self, *,
timestamp: Timestamp,
source_actor: Actor,
target_actor: Actor,
operator: MarkerOperation,
marker: PlayerMarker,
):
super().__init__(timestamp)
self.source_actor = source_actor
self.target_actor = target_actor
self.operator = operator
self.marker = marker
def __repr__(self):
return f'<PlayerMarker {self.operator.name} {self.marker.name}>'
Classes
class MarkerOperation (value, names=None, *, module=None, qualname=None, type=None, start=1)
-
Enums for marker operations
Expand source code
class MarkerOperation(IntEnum): """Enums for marker operations""" Unknown = 0 Add = 1 Update = 2 Delete = 3
Ancestors
- enum.IntEnum
- builtins.int
- enum.Enum
Class variables
var Add
var Delete
var Unknown
var Update
class OverheadMarker (*, timestamp: int, source_actor: Actor, target_actor: Actor, operator: MarkerOperation, marker: PlayerMarker)
-
Event representing player-applied markers
Expand source code
class OverheadMarker(Event): # pylint: disable=too-few-public-methods """Event representing player-applied markers""" def __init__(self, *, timestamp: Timestamp, source_actor: Actor, target_actor: Actor, operator: MarkerOperation, marker: PlayerMarker, ): super().__init__(timestamp) self.source_actor = source_actor self.target_actor = target_actor self.operator = operator self.marker = marker def __repr__(self): return f'<PlayerMarker {self.operator.name} {self.marker.name}>'
Ancestors
class OverheadVFX (*, timestamp: int, actor: Actor, marker_id: int)
-
Event representing content-applied markers
Expand source code
class OverheadVFX(Event): # pylint: disable=too-few-public-methods """Event representing content-applied markers""" def __init__(self, *, timestamp: Timestamp, actor: Actor, marker_id: int, ): super().__init__(timestamp) self.actor = actor self.marker_id = marker_id def __repr__(self): return f'<ContentMarker {self.marker_id}>'
Ancestors
class PlayerMarker (value, names=None, *, module=None, qualname=None, type=None, start=1)
-
Enums for player-applied markers, these IDs can be found in the Marker.exd client file
Expand source code
class PlayerMarker(IntEnum): """Enums for player-applied markers, these IDs can be found in the Marker.exd client file""" Attack1 = 0 Attack2 = 1 Attack3 = 2 Attack4 = 3 Attack5 = 4 Bind1 = 5 Bind2 = 6 Bind3 = 7 Ignore1 = 8 Ignore2 = 9 Square = 10 Circle = 11 Plus = 12 Triangle = 13 @classmethod def contains(cls, value: int) -> bool: """Returns true if the value is a valid PlayerMarkerType""" return value in cls._value2member_map_ # pylint: disable=no-member
Ancestors
- enum.IntEnum
- builtins.int
- enum.Enum
Class variables
var Attack1
var Attack2
var Attack3
var Attack4
var Attack5
var Bind1
var Bind2
var Bind3
var Circle
var Ignore1
var Ignore2
var Plus
var Square
var Triangle
Static methods
def contains(value: int) ‑> bool
-
Returns true if the value is a valid PlayerMarkerType
Expand source code
@classmethod def contains(cls, value: int) -> bool: """Returns true if the value is a valid PlayerMarkerType""" return value in cls._value2member_map_ # pylint: disable=no-member