Adds a seperate pick proc to work on lists (#65178)

Because of how arglist() works, _pick was only working on args matching
the format pick(1, 2 ,3)

Because this is logic that happens inside pick itself, and I can't
figure out the proper way to actually pass things in, I've created
_pick_list so admins have a sane way to pick from lists.
This commit is contained in:
LemonInTheDark
2022-02-27 13:16:38 +00:00
committed by GitHub
parent 6e686db8b7
commit 15e9d0485f
@@ -123,6 +123,16 @@
/proc/_pick(...)
return pick(arglist(args))
/// Allow me to explain
/// for some reason, if pick() is passed arglist(args) directly and args contains only one list
/// it considers it to be a list of lists
/// this means something like _pick(list) would fail
/// need to do this instead
///
/// I hate this timeline
/proc/_pick_list(list/pick_from)
return pick(pick_from)
/proc/_prob(P)
return prob(P)