Add utils.script.offset

This commit is contained in:
pyoor 2018-05-21 12:17:48 -04:00
parent 3f23299430
commit 6455376a97

View file

@ -79,6 +79,10 @@ class script extends utils {
return `(${params.join(', ')})` return `(${params.join(', ')})`
} }
static offset (s) {
return `(${s} % ${random.range(1, 3)})`
}
static randListIndex (objName) { static randListIndex (objName) {
return `${random.number()} % ${o.pick(objName)}.length` return `${random.number()} % ${o.pick(objName)}.length`
} }