From b335b746523ffd59db1402b097a802b3fd99eaac Mon Sep 17 00:00:00 2001 From: rcoh Date: Wed, 8 Dec 2010 16:39:50 -0500 Subject: Code for the demo. Everything works afaik. Contains a couple more optimizations. Contains modify param behavior. Improved support for recursive hooks. Modifications to SmootCoreObject to get us closer to a fully multi-threaded system. This should be the last commit directly to master. All further commits should be on subranches and get merged. --- behaviors/BehaviorChain.py | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'behaviors/BehaviorChain.py') diff --git a/behaviors/BehaviorChain.py b/behaviors/BehaviorChain.py index 8b5cb1d..fe50573 100644 --- a/behaviors/BehaviorChain.py +++ b/behaviors/BehaviorChain.py @@ -20,8 +20,11 @@ class BehaviorChain(Behavior): if behaviorId in self.hooks: #process recursive hook if there is one hookBehavior = Util.getComponentById(self.hooks[behaviorId]) - (response, recurrence) = \ - hookBehavior.immediateProcessInput(response, - recurrence) - self.feedback[behaviorId] = recurrence +#we feed its recurrence in as input to the behavior. + (recurrence, hookRecurrence) = \ + hookBehavior.immediateProcessInput(recurrence, \ + []) + if hookRecurrence != []: + print 'Hook recurrences are not currently supported. Implement it yourself or bug russell' + self.feedback[behaviorId] = recurrence return response -- cgit v1.2.3