fix: added 'deter' function
This commit is contained in:
@@ -56,9 +56,15 @@ class ActionFlow:
|
||||
assert index is not None, "Action '%s' is not registered" % name
|
||||
return index
|
||||
|
||||
def allow(self, action: type[Action], value=True):
|
||||
index = self.index(action)
|
||||
self.on[index] = False if value else None
|
||||
def allow(self, *actions: type[Action]):
|
||||
for Item in actions:
|
||||
index = self.index(Item)
|
||||
self.on[index] = False
|
||||
|
||||
def deter(self, *actions: type[Action]):
|
||||
for Item in actions:
|
||||
index = self.index(Item)
|
||||
self.on[index] = None
|
||||
|
||||
def stage(self, *preset: type[Action]):
|
||||
for Props in preset:
|
||||
|
||||
Reference in New Issue
Block a user