mirror of
https://github.com/cyberboy666/r_e_c_u_r.git
synced 2025-12-13 20:00:12 +01:00
can pass strings through mapped commands now
This commit is contained in:
@@ -918,6 +918,10 @@ class Actions(object):
|
|||||||
( r"set_shader_speed_layer_([0-2])_amount", self.shaders.set_speed_layer_to_amount ),
|
( r"set_shader_speed_layer_([0-2])_amount", self.shaders.set_speed_layer_to_amount ),
|
||||||
}
|
}
|
||||||
|
|
||||||
|
def detect_types(self, args):
|
||||||
|
a = [ int(arg) if str(arg).isnumeric() else str(arg) for arg in list(args) ]
|
||||||
|
return a
|
||||||
|
|
||||||
def get_callback_for_method(self, method_name, argument):
|
def get_callback_for_method(self, method_name, argument):
|
||||||
for a in self.parserlist:
|
for a in self.parserlist:
|
||||||
regex = a[0]
|
regex = a[0]
|
||||||
@@ -926,7 +930,7 @@ class Actions(object):
|
|||||||
|
|
||||||
if matches:
|
if matches:
|
||||||
found_method = me
|
found_method = me
|
||||||
parsed_args = list(map(int,matches.groups()))
|
parsed_args = self.detect_types(matches.groups()) #list(map(int,matches.groups()))
|
||||||
if argument is not None:
|
if argument is not None:
|
||||||
args = parsed_args + [argument]
|
args = parsed_args + [argument]
|
||||||
else:
|
else:
|
||||||
|
|||||||
Reference in New Issue
Block a user