ID:2652445
 
Applies to:
Status: Open

Issue hasn't been assigned a status value.
Right now you can't check what generator we're using.
_binobj has string representation but it's not uniform so can't parse that.

IE
var/generator/G = generator("circle",1,22)
...
if(G.generator_type == "circle" && G.A == 1)
do_whatever()
Not a bad idea, although I don't know how I'd do var access properly through the datum wrapper. I suppose one way to do it is just to add vars and set them in New().
Yeah, even read-only access to the vars would be nice.
+1
Semi-Workaround for anyone who might stumble upon this
/**
* returns the arguments given to a generator and manually extracts them from the internal byond object
* returns:
* * flat list of strings for args given to the generator.
* * Note: this means things like "list(1,2,3)" will need to be processed
*/

/proc/return_generator_args(generator/target)
var/string_repr = "[target]" //the name of the generator is the string representation of it's _binobj, which also contains it's args
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, ", ")