sdql wrapper for generators and getting list output from generators (#91954)

This commit is contained in:
Fikou
2025-07-04 20:47:24 -04:00
committed by Roxy
parent 6e46a82d69
commit bb004c87e3
2 changed files with 13 additions and 0 deletions
+10
View File
@@ -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.