Passed
Branch master (0fb205)
by Oleksandr
03:17
created

commons.flight   A

Complexity

Total Complexity 0

Size/Duplication

Total Lines 117
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 0
eloc 75
dl 0
loc 117
ccs 36
cts 36
cp 1
rs 10
c 0
b 0
f 0
1 1
from candv import Values
2 1
from candv import VerboseValueConstant
3 1
from candv import with_constant_class
4
5 1
from ._translations import gettext_lazy as _
6
7
8 1
class Formation(VerboseValueConstant):
9 1
  ...
10
11
12 1
class Formations(with_constant_class(Formation), Values):
13 1
  echelon_right = Formation('F2', _("echelon right"))
14 1
  echelon_left  = Formation('F3', _("echelon left"))
15 1
  line_abreast  = Formation('F4', _("line abreast"))
16 1
  line_asteam   = Formation('F5', _("line asteam"))
17 1
  vic           = Formation('F6', _("vic"))
18 1
  finger_four   = Formation('F7', _("finger four"))
19 1
  diamond       = Formation('F8', _("diamond"))
20
21
22 1
class RoutePointType(VerboseValueConstant):
23 1
  ...
24
25
26 1
class RoutePointTypes(with_constant_class(RoutePointType), Values):
27
28
  # Take-off ----------------------------------------------------------------
29 1
  takeoff_normal = RoutePointType(
30
    'TAKEOFF',
31
    _("takeoff (normal)"),
32
  )
33 1
  takeoff_pair = RoutePointType(
34
    'TAKEOFF_002',
35
    _("takeoff (pair)"),
36
    )
37 1
  takeoff_in_line = RoutePointType(
38
    'TAKEOFF_003',
39
    _("takeoff (in line)"),
40
  )
41 1
  takeoff_taxiing = RoutePointType(
42
    'TAKEOFF_004',
43
    _("takeoff (taxiing)"),
44
  )
45 1
  takeoff_taxiing_from_static = RoutePointType(
46
    'TAKEOFF_005',
47
    _("takeoff (taxiing from static)"),
48
  )
49
50
  # Normal flight -----------------------------------------------------------
51 1
  normal = RoutePointType(
52
    'NORMFLY',
53
    _("normal"),
54
  )
55
56
  # Attack ------------------------------------------------------------------
57
  #: .. warning::
58
  #:   air attack is not present in game. It is calculated as ``NORMFLY``
59
  #:   with a target
60 1
  air_attack = RoutePointType(
61
    'X_AIR_ATTACK',
62
    _("air attack"),
63
  )
64 1
  ground_attack = RoutePointType(
65
    'GATTACK',
66
    _("ground attack"),
67
  )
68
69
  # Patrol ------------------------------------------------------------------
70 1
  patrol_triangle = RoutePointType(
71
    'NORMFLY_401',
72
    _("patrol (triangle)"),
73
  )
74 1
  patrol_square = RoutePointType(
75
    'NORMFLY_402',
76
    _("patrol (square)"),
77
  )
78 1
  patrol_pentagon = RoutePointType(
79
    'NORMFLY_403',
80
    _("patrol (pentagon)"),
81
  )
82 1
  patrol_hexagon = RoutePointType(
83
    'NORMFLY_404',
84
    _("patrol (hexagon)"),
85
  )
86 1
  patrol_random = RoutePointType(
87
    'NORMFLY_405',
88
    _("patrol (random)"),
89
  )
90
91
  # Artillery spotter -------------------------------------------------------
92 1
  artillery_spotter = RoutePointType(
93
    'NORMFLY_407',
94
    _("artillery spotter"),
95
  )
96
97
  # Langing -----------------------------------------------------------------
98 1
  landing_on_left = RoutePointType(
99
    'LANDING',
100
    _("landing (on left)"),
101
  )
102 1
  landing_on_right = RoutePointType(
103
    'LANDING_101',
104
    _("landing (on right)"),
105
  )
106 1
  landing_short_on_left = RoutePointType(
107
    'LANDING_102',
108
    _("landing (short on left)"),
109
  )
110 1
  landing_short_on_right = RoutePointType(
111
    'LANDING_103',
112
    _("landing (short on right)"),
113
  )
114 1
  landing_straight = RoutePointType(
115
    'LANDING_104',
116
    _("landing (straight)"),
117
  )
118