Fixed most input validation bugs, and did too many improvements to remember. Did I mention that I am typing these words with my hands?

This commit is contained in:
Patrick Marsee 2020-05-10 23:26:21 -04:00
parent ee5c4da549
commit 4a398cc2a3
11 changed files with 546 additions and 253 deletions

View file

@ -63,13 +63,14 @@ class NoOpEvent(GameEvent):
class GoEvent(GameEvent):
def __init__(self, actor, path, speed, action = None, locus = None, timeTaken = 0):
def __init__(self, actor, path, speed, action = None, locus = None, closeEnough = True, timeTaken = 0):
super(GoEvent, self).__init__('go')
self.actor = actor
self.path = path
self.speed = speed
self.action = action
self.locus = locus
self.closeEnough = closeEnough
self.timeTaken = timeTaken
@property
@ -95,10 +96,10 @@ class UseEvent(GameEvent):
self.args = args
class UseOnEvent(GameEvent):
def __init__(self, actor, item, thing, args):
def __init__(self, actor, item, target, args):
super(UseOnEvent, self).__init__('useon')
self.actor = actor
self.thing = thing # thing can be a coordinate pair?
self.target = target # thing can be a coordinate pair?
self.item = item
self.args = args
@ -118,3 +119,7 @@ class BehaveEvent(GameEvent):
def __init__(self, actor):
super(BehaveEvent, self).__init__('behave')
self.actor = actor
# |\_/|
# /0 0\
# \o/