update: 'react' method in ActionFlow
This commit is contained in:
@@ -30,13 +30,11 @@ class ActionFlow:
|
||||
if self.on[index] is None: raise NotAllowed(name)
|
||||
self.on[index] = bool(self.actions[index].prepare())
|
||||
|
||||
def stage(self, *actions: type[Action]):
|
||||
for Actor in actions:
|
||||
self.allow(Actor)
|
||||
self.queue(Actor)
|
||||
self.react()
|
||||
def react(self, *stage: type[Action]):
|
||||
for Props in stage:
|
||||
self.allow(Props)
|
||||
self.queue(Props)
|
||||
|
||||
def react(self):
|
||||
while any(self.on):
|
||||
for index in self.indices.values():
|
||||
if (self.on[index]):
|
||||
|
||||
Reference in New Issue
Block a user