-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsubsystem.py
More file actions
80 lines (71 loc) · 1.71 KB
/
subsystem.py
File metadata and controls
80 lines (71 loc) · 1.71 KB
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
class SubSystem:
def __init__(self, ship, name, status_green, status_yellow, status_red, power):
self.ship = ship
self.name = name
self.green = status_green
self.yellow = status_yellow
self.red = status_red
self.status = self.green
self.ship.power -= power
class Reactor(SubSystem):
def __init__(self, ship):
super().__init__(
ship,
"Reactor",
"Online",
"Damaged",
"Critical",
-1000
)
self.ship.power_max += 1000
class Sensors(SubSystem):
def __init__(self, ship):
super().__init__(
ship,
"Sensors",
"Online",
"Offline",
"Damaged",
100
)
class JumpDrive(SubSystem):
def __init__(self, ship):
super().__init__(
ship,
"JumpDrive",
"Ready",
"Loading",
"Offline",
100
)
class ShieldEmitter(SubSystem):
def __init__(self, ship):
super().__init__(
ship,
"Shields",
"Up",
"Down",
"Damaged",
500
)
self.ship.shields_max += 100
class StealthField(SubSystem):
def __init__(self, ship):
super().__init__(
ship,
"Stealth",
"Engaged",
"Offline",
"Damaged",
100
)
class DampeningField(SubSystem):
def __init__(self, ship):
super().__init__(
ship,
"Dampening",
"Online",
"Offline",
"Damaged",
250
)