Conditions | 2 |
Total Lines | 26 |
Lines | 0 |
Ratio | 0 % |
Tests | 1 |
CRAP Score | 3.1852 |
Changes | 2 | ||
Bugs | 0 | Features | 0 |
1 | # coding: utf-8 |
||
36 | @classmethod |
||
37 | def from_ini(cls, ini): |
||
38 | death_limit = field_from_ini( |
||
39 | cls.death_limit, ini, |
||
40 | 'NET', 'maxAllowedKIA', |
||
41 | ) |
||
42 | death_limit = ( |
||
43 | None |
||
44 | if death_limit == NO_DEATH_LIMIT_FLAG |
||
45 | else death_limit |
||
46 | ) |
||
47 | |||
48 | return cls({ |
||
49 | 'enabled': not field_from_ini( |
||
50 | cls.enabled, ini, |
||
51 | 'NET', 'reflyDisabled', |
||
52 | ), |
||
53 | 'death_penalty': field_from_ini( |
||
54 | cls.death_penalty, ini, |
||
55 | 'NET', 'reflyKIADelay', |
||
56 | 1 | ), |
|
57 | 'death_penalty_multiplier': field_from_ini( |
||
58 | cls.death_penalty_multiplier, ini, |
||
59 | 'NET', 'reflyKIADelayMultiplier', |
||
60 | ), |
||
61 | 'death_limit': death_limit, |
||
62 | }) |
||
70 |