From df82add732e928230690b0d5495d32c36997914c Mon Sep 17 00:00:00 2001 From: Jeremy Penner Date: Fri, 30 Sep 2011 08:46:56 -0400 Subject: [PATCH] fix some naming in events, make selectDg return the result of calling the dg --- engine.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/engine.py b/engine.py index 4929ada..47adfcb 100644 --- a/engine.py +++ b/engine.py @@ -18,7 +18,7 @@ class Event(TPrs): def InitTransient(self): self.rgtk = TPLS() - self.stkValue = [] + self.queueValue = [] def oob(self, tok, dgoob): return Oob(self, tok, dgoob) @@ -59,17 +59,17 @@ class Event(TPrs): def selectDg(cls, tok, *rgev_dg): rgev, rgdg = zip(*rgev_dg) ev, value = cls.select(tok, *rgev) - rgdg[rgev.index(ev)](value) + return rgdg[rgev.index(ev)](value) def fire(self, value = None): - self.stkValue.append(value) + self.queueValue.append(value) self.game.queueEv.append(self) self.game.ensureRun() def fireI(self): rgtkOld = self.rgtk - value = self.stkValue[0] - self.stkValue = self.stkValue[1:] + value = self.queueValue[0] + self.queueValue = self.queueValue[1:] self.rgtk = TPLS() for tk in rgtkOld: if tk.fRunning: