2021-03-26 15:46:00 +01:00
|
|
|
# for type hints (predecessor)
|
|
|
|
from __future__ import annotations
|
|
|
|
|
|
|
|
from .mine import Mine
|
|
|
|
|
|
|
|
|
|
|
|
class ChainedMine(Mine):
|
|
|
|
def __init__(self, position, predecessor: ChainedMine = None, active=True):
|
|
|
|
self.predecessor = predecessor
|
|
|
|
self.type = "chained"
|
|
|
|
super().__init__(position, active)
|
|
|
|
|
|
|
|
def disarm(self):
|
2021-05-20 15:01:09 +02:00
|
|
|
if (self.predecessor.active == False):
|
|
|
|
super().disarm()
|
2021-03-26 15:46:00 +01:00
|
|
|
pass
|