File: vp_utils.py

package info (click to toggle)
gwp 0.3.6-1
  • links: PTS
  • area: contrib
  • in suites: sarge
  • size: 7,076 kB
  • ctags: 3,168
  • sloc: ansic: 27,179; sh: 8,379; python: 1,895; xml: 1,184; makefile: 356
file content (96 lines) | stat: -rw-r--r-- 2,609 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
#-------- Agregado para que funcione la internacionalizacion
import sys
import gwp
sys.path.append(gwp.get_system_plugins_dir())
import gettext
_ = gettext.gettext
#--------

#Tipos de funciones especiales
CLOAK = 1
CALENTADORA = 2
ENFRIADORA = 3
BIOSCAN = 4
ANTICLOAK = 5
CASINO = 6
GLORY_HD = 7
GLORY_LD = 8
GRAVITRONIC = 9
HYP = 10
CHUNNEL = 11
RECALENTADORA = 12
I_ASSAULT = 13
RAMSCOOP = 14
ALQUIMIA = 15
REFINERIA = 16
REFINERIA_A = 17
ADVANCED_CLOAK = 18
NINGUNA = 19

# Funciones especiales por id de hull (Nros fijos gracias a Tim)    
special_func = {3:CALENTADORA,\
                7:ANTICLOAK,\
                8:ENFRIADORA,\
                9:BIOSCAN,\
                21:CLOAK,\
                22:CLOAK,\
                25:CLOAK,\
                26:CLOAK,\
                27:CLOAK,\
                28:CLOAK,\
                29:ADVANCED_CLOAK,\
                31:ADVANCED_CLOAK,\
                32:CLOAK,\
                33:CLOAK,\
                38:CLOAK,\
                39:GLORY_LD,\
                41:GLORY_HD,\
                42:CASINO,\
                43:CLOAK,\
                44:GRAVITRONIC,\
                45:GRAVITRONIC,\
                46:GRAVITRONIC,\
                47:CLOAK,\
                51:HYP,\
                56:CHUNNEL,\
                64:RECALENTADORA,\
                69:I_ASSAULT,\
                77:HYP,\
                84:BIOSCAN,\
                87:HYP,\
                96:RAMSCOOP,\
                97:REFINERIA_A,\
                104:REFINERIA,\
                105:ALQUIMIA}

#Special Function description 
sfd = {CLOAK:_("Cloak"),\
       ADVANCED_CLOAK:_("Advanced Cloak"),\
       ANTICLOAK:_("Anti-Cloak"),\
       BIOSCAN:_("BioScan"),\
       ENFRIADORA:_("Cools down to 50 degrees"),\
       CALENTADORA:_("Warms up to 50 degrees"),\
       RECALENTADORA:_("Warms up to 100 degrees"),\
       GLORY_HD:_("Glory Device High Damage"),\
       GLORY_LD:_("Glory Device Low Damage"),\
       CASINO:_("Generate MCs"),\
       GRAVITRONIC:_("Cloak and Gravitronic Acelerators"),\
       CHUNNEL:_("Chunnel"),\
       HYP:_("Hyperdrive"),\
       I_ASSAULT:_("Imperial Assault"),\
       RAMSCOOP:_("Ramscoop, Bioscanner"),\
       REFINERIA:_("Fuel Alchemy"),\
       REFINERIA_A:_("Fuel Alchemy"),\
       ALQUIMIA:_("Minerals Alchemy"),\
       NINGUNA:_("None")
       }

def get_hull_function(id):
    if (special_func.has_key(id)):
        return get_hull_function_description(special_func[id])
    else:
        return get_hull_function_description(NINGUNA)
    
def get_hull_function_description(hf):
    return sfd[hf]