Completed
Push — master ( 74046a...4c11f7 )
by Oleksandr
01:30
created

MissionStatuses

Complexity

Total Complexity 0

Size/Duplication

Total Lines 4
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 0
c 1
b 0
f 0
dl 0
loc 4
ccs 4
cts 4
cp 1
1
# coding: utf-8
2
3 1
from candv import (
4
    SimpleConstant, Constants, Values, VerboseValueConstant,
5
    with_constant_class,
6
)
7
8 1
from .utils import translations
9
10
11 1
_ = translations.ugettext_lazy
12
13
14 1
class SupportedLanguage(SimpleConstant):
15
    pass
16
17
18 1
class SupportedLanguages(with_constant_class(SupportedLanguage), Constants):
19 1
    en = SupportedLanguage()
20 1
    ru = SupportedLanguage()
21
22 1
    @classmethod
23
    def get_default(cls):
24 1
        return cls.en
25
26
27 1
class Skill(VerboseValueConstant):
28
    pass
29
30
31 1
class Skills(with_constant_class(Skill), Values):
32 1
    rookie = Skill(0, _("rookie"))
33 1
    average = Skill(1, _("average"))
34 1
    veteran = Skill(2, _("veteran"))
35 1
    ace = Skill(3, _("ace"))
36
37
38 1
class UnitType(VerboseValueConstant):
39
    pass
40
41
42 1
class UnitTypes(with_constant_class(UnitType), Values):
43 1
    aircraft = UnitType('planes', _("aircraft"))
44 1
    armor = UnitType('armor', _("armor"))
45 1
    artillery = UnitType('artillery', _("artillery"))
46 1
    balloon = UnitType('aeronautics', _("balloon"))
47 1
    light = UnitType('lights', _("light"))
48 1
    radio = UnitType('radios', _("radio"))
49 1
    ship = UnitType('ships', _("ship"))
50 1
    stationary = UnitType('stationary', _("stationary"))
51 1
    train = UnitType('trains', _("train"))
52 1
    vehicle = UnitType('vehicles', _("vehicle"))
53
54
55 1
class MissionStatus(SimpleConstant):
56
    pass
57
58
59 1
class MissionStatuses(with_constant_class(MissionStatus), Constants):
60 1
    not_loaded = MissionStatus()
61 1
    loaded = MissionStatus()
62
    playing = MissionStatus()
63