mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-22 04:30:44 +01:00
sdql wrapper for generators and getting list output from generators (#91954)
This commit is contained in:
@@ -9,3 +9,13 @@
|
||||
string_repr = copytext(string_repr, 11, length(string_repr)) // strips extraneous data
|
||||
string_repr = replacetext(string_repr, "\"", "") // removes the " around the type
|
||||
return splittext(string_repr, ", ")
|
||||
|
||||
/generator/proc/RandList()
|
||||
var/possible_vector = Rand()
|
||||
var/vector_length = length(possible_vector)
|
||||
if(vector_length == 0)
|
||||
return possible_vector
|
||||
. = list()
|
||||
for(var/i in 1 to vector_length)
|
||||
. += possible_vector[i]
|
||||
return .
|
||||
|
||||
@@ -289,6 +289,9 @@
|
||||
/proc/_viewers(Dist, Center = usr)
|
||||
return viewers(Dist, Center)
|
||||
|
||||
/proc/_generator(type = "num", A = 0, B = 1, rand = UNIFORM_RAND)
|
||||
return generator(type, A, B, rand)
|
||||
|
||||
/// Auxtools REALLY doesn't know how to handle filters as values;
|
||||
/// when passed as arguments to auxtools-called procs, they aren't simply treated as nulls -
|
||||
/// they don't even count towards the length of args.
|
||||
|
||||
Reference in New Issue
Block a user