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:
parent
ee5c4da549
commit
4a398cc2a3
11 changed files with 546 additions and 253 deletions
|
@ -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/
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue