restructured targets

This commit is contained in:
Jonas Zeunert
2020-02-11 15:38:46 +01:00
parent 53d55d16f5
commit 82f1ad6ed8
91 changed files with 289 additions and 206 deletions

0
main.py Normal file
View File

View File

@@ -14,4 +14,4 @@ class EventHandler:
self.targets[event].hit()
def stop(self):
self.isRunning = False
self.isRunning = False

0
src/__init__.py Normal file
View File

0
src/events/FlapEvent.py Normal file
View File

View File

@@ -0,0 +1,7 @@
from src.events.FlapEvent import FlapEvent
from src.solenoids.RightFlapSolenoid import RightFlapSolenoid
class RightFlapEvent(FlapEvent):
def __init__(self):
super(RightFlapSolenoid())

View File

View File

View File

View File

View File

@@ -1,11 +1,13 @@
from src.config import *
from src.networking.Networking import Networking
from src.PlayerState import PlayerState
from src.displays.PlayerDisplay import PlayerDisplay
from src.displays.SpecialDisplay import SpecialDisplay
from src.targets import *
from src.EventHandler import EventHandler
from src.targets import *
from src.events.PointEvent import PointEvent

View File

View File

View File

@@ -1,7 +1,8 @@
from src.Target import Target
from src.targets.Target import Target
class Bank(Target):
def __init__(self, targets):
def __init__(self, points, name, targets):
super(points, name)
self.targets = targets
self.__register_targets__()

View File

@@ -1,4 +1,4 @@
from src.Target import Target
from src.targets.Target import Target
class BankTarget(Target):
def __init__(self, points):

View File

@@ -1,8 +0,0 @@
from src.Target import Target
class FifthFixedTarget(Target):
def __init__(self):
super(100, 'Fixed Target #5')
def hit(self):
super.hit()

View File

@@ -1,9 +0,0 @@
from src.Target import Target
class FirstFixedTarget(Target):
def __init__(self):
super()
def hit(self):
super.hit()

View File

@@ -1,8 +0,0 @@
from src.Target import Target
class FourthFixedTarget(Target):
def __init__(self):
super(100, 'Fixed Target #4')
def hit(self):
super.hit()

View File

@@ -1,8 +0,0 @@
from src.Target import Target
class LeftDropTarget(Target):
def __init__(self):
super(100, 'Left Drop Target')
def hit(self):
super.hit()

View File

@@ -1,9 +0,0 @@
from src.Target import Target
class LeftLaneButton2Target(Target):
def __init__(self):
super(20000, "Left Lane Button #2")
def hit(self):
super.hit()

View File

@@ -1,9 +0,0 @@
from src.Target import Target
class LeftLaneButton3Target(Target):
def __init__(self):
super(20000, "Left Lane Button #3")
def hit(self):
super.hit()

View File

@@ -1,9 +0,0 @@
from src.Target import Target
class LeftLaneButton4Target(Target):
def __init__(self):
super(20000, "Left Lane Button #4")
def hit(self):
super.hit()

View File

@@ -1,9 +0,0 @@
from src.Target import Target
class LeftLaneButton5Target(Target):
def __init__(self):
super(20000, "Left Lane Button #5")
def hit(self):
super.hit()

View File

@@ -1,9 +0,0 @@
from src.Target import Target
class LeftPopBumperTarget(Target):
def __init__(self):
super()
def hit(self):
super.hit()

View File

@@ -1,8 +0,0 @@
from src.Target import Target
class MiddleDropTarget(Target):
def __init__(self):
super(100, 'Middle Drop Target')
def hit(self):
super.hit()

View File

@@ -1,8 +0,0 @@
from src.Target import Target
class MiddleLeftDropTarget(Target):
def __init__(self):
super(100, 'Middle Left Drop Target')
def hit(self):
super.hit()

View File

@@ -1,8 +0,0 @@
from src.Target import Target
class MiddleRightDropTarget(Target):
def __init__(self):
super(100, 'Middle Right Drop Target')
def hit(self):
super.hit()

View File

@@ -1,4 +1,4 @@
from src.Target import Target
from src.targets.Target import Target
class ReboundContactTarget(Target):
def __init__(self):

View File

@@ -1,8 +0,0 @@
from src.Target import Target
class RightDropTarget(Target):
def __init__(self):
super(100, 'Right Drop Target')
def hit(self):
super.hit()

View File

@@ -1,8 +0,0 @@
from src.Target import Target
class RightPopBumperTarget(Target):
def __init__(self):
super(100, 'Right Pop Bumper')
def hit(self):
super.hit()

View File

@@ -1,9 +0,0 @@
from src.Target import Target
class SecondFixedTarget(Target):
def __init__(self):
super()
def hit(self):
super.hit()

View File

@@ -1,8 +0,0 @@
from src.Target import Target
class ThirdFixedTarget(Target):
def __init__(self):
super(100, 'Fixed Target #3')
def hit(self):
super.hit()

View File

@@ -1,8 +0,0 @@
from src.Target import Target
class UPLeftDropTarget(Target):
def __init__(self):
super(100, 'Upper Playfield: Left Drop Target')
def hit(self):
super.hit()

View File

@@ -1,8 +0,0 @@
from src.Target import Target
class UPMiddleDropTarget(Target):
def __init__(self):
super(100, 'Upper Playfield: Middle Drop Target')
def hit(self):
super.hit()

View File

@@ -1,8 +0,0 @@
from src.Target import Target
class UPMiddleLeftDropTarget(Target):
def __init__(self):
super(100, 'Upper Playfield: Middle Left Drop Target')
def hit(self):
super.hit()

View File

@@ -1,8 +0,0 @@
from src.Target import Target
class UPMiddleRightDropTarget(Target):
def __init__(self):
super(100, 'Upper Playfield: Middle Right Drop Target')
def hit(self):
super.hit()

View File

@@ -1,9 +0,0 @@
from src.Target import Target
class UPRightDropTarget(Target):
def __init__(self):
super(100000, "Upper Playfield Right Drop Target")
def hit(self):
super.hit()

View File

@@ -1,9 +0,0 @@
from src.Target import Target
class UpperPlayfieldRollUnderTarget(Target):
def __init__(self):
super()
def hit(self):
super.hit()

View File

@@ -3,6 +3,8 @@ __all__ = []
import pkgutil
import inspect
__path__ = pkgutil.extend_path(__path__, __name__)
for loader, name, is_pkg in pkgutil.walk_packages(__path__):
module = loader.find_module(name).load_module(name)

Binary file not shown.

View File

@@ -1,4 +1,4 @@
from src.Target import Target
from src.targets.Target import Target
class LeftInlaneTarget(Target):
def __init__(self):

View File

@@ -1,4 +1,4 @@
from src.Target import Target
from src.targets.Target import Target
class LeftOutlaneTarget(Target):
def __init__(self):

View File

@@ -1,4 +1,4 @@
from src.Target import Target
from src.targets.Target import Target
class RightInlaneTarget(Target):

View File

@@ -1,4 +1,4 @@
from src.Target import Target
from src.targets.Target import Target
class RightOutlaneKickerTarget(Target):

View File

@@ -1,4 +1,4 @@
from src.Target import Target
from src.targets.Target import Target
class RightOutlaneTarget(Target):

View File

View File

@@ -0,0 +1,9 @@
from src.targets.Target import Target
class CanalButtonTopTarget(Target):
def __init__(self):
super(20000, "Canal Button Bottom")
def hit(self):
super.hit()

View File

@@ -0,0 +1,9 @@
from src.targets.Target import Target
class LeftLaneButton4Target(Target):
def __init__(self):
super(20000, "Canal Button Middle Bottom")
def hit(self):
super.hit()

View File

@@ -0,0 +1,9 @@
from src.targets.Target import Target
class LeftLaneButton3Target(Target):
def __init__(self):
super(20000, "Canal Button Middle")
def hit(self):
super.hit()

View File

@@ -0,0 +1,9 @@
from src.targets.Target import Target
class LeftLaneButton2Target(Target):
def __init__(self):
super(20000, "Canal Button Middle Top")
def hit(self):
super.hit()

View File

@@ -1,4 +1,4 @@
from src.Target import Target
from src.targets.Target import Target
class LeftLaneButton1Target(Target):
def __init__(self):

View File

View File

@@ -0,0 +1,9 @@
from src.targets.Target import Target
class FixedTarget1(Target):
def __init__(self):
super(0, "Fixed Target 1")
def hit(self):
super.hit()

View File

@@ -0,0 +1,9 @@
from src.targets.Target import Target
class FixedTarget2(Target):
def __init__(self):
super(0, "Fixed Target 2")
def hit(self):
super.hit()

View File

@@ -0,0 +1,8 @@
from src.targets.Target import Target
class FixedTarget3(Target):
def __init__(self):
super(100, 'Fixed Target 3')
def hit(self):
super.hit()

View File

@@ -0,0 +1,9 @@
from src.targets.Target import Target
class FixedTarget4(Target):
def __init__(self):
super(100, 'Fixed Target 4')
def hit(self):
super.hit()

View File

@@ -0,0 +1,9 @@
from src.targets.Target import Target
class FixedTarget5(Target):
def __init__(self):
super(100, 'Fixed Target 5')
def hit(self):
super.hit()

View File

View File

@@ -0,0 +1,9 @@
from src.targets.BankTarget import BankTarget
class LeftBankLeft(BankTarget):
def __init__(self):
super(100, 'Left Bank Left')
def hit(self):
super.hit()

View File

@@ -0,0 +1,9 @@
from src.targets.BankTarget import BankTarget
class LeftBankMiddleLeft(BankTarget):
def __init__(self):
super(100, 'Left Bank Middle Left')
def hit(self):
super.hit()

View File

@@ -0,0 +1,9 @@
from src.targets.BankTarget import BankTarget
class LeftBankMiddleRight(BankTarget):
def __init__(self):
super(100, 'Left Bank Middle Right')
def hit(self):
super.hit()

View File

@@ -0,0 +1,9 @@
from src.targets.Target import Target
class LeftBankLeft(Target):
def __init__(self):
super(100, 'Left Bank Right')
def hit(self):
super.hit()

View File

@@ -0,0 +1,9 @@
from src.targets.Bank import Bank
class LeftBankTarget(Bank):
def __init__(self):
super()
def hit(self):
super.hit()

View File

View File

@@ -0,0 +1,9 @@
from src.targets.Target import Target
class LeftPopTarget(Target):
def __init__(self):
super(0, "Left Pop")
def hit(self):
super.hit()

View File

@@ -0,0 +1,9 @@
from src.targets.Target import Target
class RightPopTarget(Target):
def __init__(self):
super(100, 'Right Pop')
def hit(self):
super.hit()

View File

View File

@@ -0,0 +1,12 @@
from src.targets.Bank import Bank
from src.targets.right_bank import RightBankLeft
from src.targets.right_bank import RightBankMiddle
from src.targets.right_bank import RightBankRight
class RightBank(Bank):
def __init__(self):
targets = [RightBankLeft(), RightBankMiddle(), RightBankRight]
super(0, "Right Bank", targets)
def hit(self):
super.hit()

View File

@@ -0,0 +1,9 @@
from src.targets.BankTarget import BankTarget
class RightBankLeft(BankTarget):
def __init__(self):
super(100, "Right Bank Left")
def hit(self):
super.hit()

View File

@@ -0,0 +1,9 @@
from src.targets.BankTarget import BankTarget
class MiddleDropTarget(BankTarget):
def __init__(self):
super(100, 'Right Bank Middle')
def hit(self):
super.hit()

View File

@@ -0,0 +1,9 @@
from src.targets.BankTarget import BankTarget
class RightBankRight(BankTarget):
def __init__(self):
super(100, "Right Bank Right")
def hit(self):
super.hit()

View File

View File

@@ -1,4 +1,4 @@
from src.Target import Target
from src.targets.Target import Target
class LeftSlingshotTarget(Target):
def __init__(self):

View File

@@ -1,4 +1,4 @@
from src.Target import Target
from src.targets.Target import Target
class RightSlingshotTarget(Target):

View File

View File

@@ -1,11 +1,12 @@
from src.Target import Target
from src.targets.Target import Target
# A standup target. When lit, it scores the Orange Special (operator
# adjustable) for Nothing, Extra Ball, Replay, Super Bonus, or 300,000
# points. Scores 100,000 points when not lit.
class FixedSpecialOrangeTarget(Target):
def __init__(self):
super(100000, "Fixed Special Orange")
super(100000, "Special Orange")
def hit(self):
super.hit()

View File

@@ -1,11 +1,12 @@
from src.Target import Target
from src.targets.Target import Target
# A standup target. When lit, it scores the Red Special (operator
# adjustable) for Nothing, Extra Ball, Replay, Super Bonus, or 1,000,000
# points. Scores 10,000 points when not lit.
class FixedSpecialRedTarget(Target):
def __init__(self):
super(10000, "Fixed Special Red")
super(10000, "Special Red")
def hit(self):
super.hit()

View File

@@ -1,4 +1,4 @@
from src.Target import Target
from src.targets.Target import Target
class SpinnerTarget(Target):
def __init__(self):

View File

View File

@@ -0,0 +1,9 @@
from src.targets.Target import Target
class CreditTarget(Target):
def __init__(self):
super(0, 'Credit')
def hit(self):
super.hit()

View File

@@ -1,8 +1,8 @@
from src.Target import Target
from src.targets.Target import Target
class OutholeTarget(Target):
def __init__(self):
super(100, 'Outhole Target')
super(100, 'Outhole')
def hit(self):
super.hit()

View File

@@ -0,0 +1,9 @@
from src.targets.Target import Target
class RisingBall(Target):
def __init__(self):
super(0, "Rising Ball")
def hit(self):
super.hit()

View File

View File

@@ -0,0 +1,9 @@
from Target import Target
class TopBank(Target):
def __init__(self):
super()
def hit(self):
super.hit()

View File

@@ -0,0 +1,9 @@
from src.targets.BankTarget import BankTarget
class TopBankLeft(BankTarget):
def __init__(self):
super(100, 'Top Bank Left')
def hit(self):
super.hit()

View File

@@ -0,0 +1,9 @@
from src.targets.BankTarget import BankTarget
class TopBankMiddle(BankTarget):
def __init__(self):
super(100, "Top Bank Middle")
def hit(self):
super.hit()

View File

@@ -0,0 +1,9 @@
from src.targets.BankTarget import BankTarget
class TopBankMiddleLeft(BankTarget):
def __init__(self):
super(100, "Top Bank Middle Left")
def hit(self):
super.hit()

View File

@@ -0,0 +1,9 @@
from src.targets.BankTarget import BankTarget
class TopBankMiddleRight(BankTarget):
def __init__(self):
super(100, "Top Bank Middle Right")
def hit(self):
super.hit()

View File

@@ -0,0 +1,9 @@
from src.targets.BankTarget import BankTarget
class TopBankRight(BankTarget):
def __init__(self):
super(100000, "Top Bank Right")
def hit(self):
super.hit()

View File