diff --git a/columbus/env.py b/columbus/env.py index 72271ff..ea4bfc8 100644 --- a/columbus/env.py +++ b/columbus/env.py @@ -564,14 +564,16 @@ class ColumbusConfigDefined(ColumbusEnv): else: v = v_raw if k.endswith('_rand'): + print('_rand!') if isinstance(v, int): + print('int!') n = k.replace('_rand', '') cur = getattr( entity, n) inc = int((v+0.99)*self.random()) setattr(entity, n, cur + inc) elif isinstance(v, float): - n = k.replace('_randf', '') + n = k.replace('_rand', '') cur = getattr( entity, n) inc = v*self.random() @@ -585,7 +587,7 @@ class ColumbusConfigDefined(ColumbusEnv): cur[vi] = int((v+0.99)*self.random()) setattr(entity, n, cur) elif isinstance(v, float): - n = k.replace('_randf', '') + n = k.replace('_rand', '') cur = getattr( entity, n) cur[vi] = v*self.random()