Add utils.script.offset
This commit is contained in:
parent
3f23299430
commit
6455376a97
1 changed files with 4 additions and 0 deletions
|
@ -79,6 +79,10 @@ class script extends utils {
|
|||
return `(${params.join(', ')})`
|
||||
}
|
||||
|
||||
static offset (s) {
|
||||
return `(${s} % ${random.range(1, 3)})`
|
||||
}
|
||||
|
||||
static randListIndex (objName) {
|
||||
return `${random.number()} % ${o.pick(objName)}.length`
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue