File tree Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -65,18 +65,22 @@ def pre_load(self):
6565 Initialize the effect that should run.
6666 """
6767 effect_list = [cfg .cls () for name , cfg in effects .effects .items ()]
68+
69+ # If an effect want't specified in the initializer we grab the first one
6870 if not self .active_effect :
6971 self .active_effect = effect_list [0 ]
70-
71- for effect in effect_list :
72- if effect .name == self .effect_module :
73- self .active_effect = effect
72+ else :
73+ # Otherwise we look for an effect with the name
74+ for effect in effect_list :
75+ if effect .name == self .effect_module :
76+ self .active_effect = effect
7477
7578 if not self .active_effect :
7679 print ("Cannot find effect '{}'" .format (self .active_effect ))
7780 print ("Available effects:" )
7881 print ("\n " .join (e .name for e in effect_list ))
7982 return False
83+
8084 return True
8185
8286 def post_load (self ):
You can’t perform that action at this time.
0 commit comments