/tg/ Station 13 - Modules - TypesDefine Details

code/__DEFINES/rust_g.dm

/proc/rustg_get_versionGets the version of rust_g
rustg_setup_acreplaceSets up the Aho-Corasick automaton with its default options.
rustg_setup_acreplace_with_optionsSets up the Aho-Corasick automaton using supplied options.
rustg_acreplaceRun the specified replacement engine with the provided haystack text to replace, returning replaced text.
rustg_acreplace_with_replacementsRun the specified replacement engine with the provided haystack text to replace, returning replaced text.
rustg_cnoise_generateThis proc generates a cellular automata noise grid which can be used in procedural generation methods.
rustg_dbp_generateThis proc generates a grid of perlin-like noise
rustg_dmi_icon_statesinput: must be a path, not an /icon; you have to do your own handling if it is one, as icon objects can't be directly passed to rustg.
rustg_git_revparseReturns the git hash of the given revision, ex. "HEAD".
rustg_git_commit_dateReturns the date of the given revision in the format YYYY-MM-DD. Returns null if the revision is invalid.
/proc/rustg_unix_timestampReturns the timestamp as a string

Define Details

rustg_acreplace

Run the specified replacement engine with the provided haystack text to replace, returning replaced text.

Arguments:

rustg_acreplace_with_replacements

Run the specified replacement engine with the provided haystack text to replace, returning replaced text.

Arguments:

rustg_cnoise_generate

This proc generates a cellular automata noise grid which can be used in procedural generation methods.

Returns a single string that goes row by row, with values of 1 representing an alive cell, and a value of 0 representing a dead cell.

Arguments:

rustg_dbp_generate

This proc generates a grid of perlin-like noise

Returns a single string that goes row by row, with values of 1 representing an turned on cell, and a value of 0 representing a turned off cell.

Arguments:

rustg_dmi_icon_states

input: must be a path, not an /icon; you have to do your own handling if it is one, as icon objects can't be directly passed to rustg.

output: json_encode'd list. json_decode to get a flat list with icon states in the order they're in inside the .dmi

rustg_git_commit_date

Returns the date of the given revision in the format YYYY-MM-DD. Returns null if the revision is invalid.

rustg_git_revparse

Returns the git hash of the given revision, ex. "HEAD".

rustg_setup_acreplace

Sets up the Aho-Corasick automaton with its default options.

The search patterns list and the replacements must be of the same length when replace is run, but an empty replacements list is allowed if replacements are supplied with the replace call Arguments:

rustg_setup_acreplace_with_options

Sets up the Aho-Corasick automaton using supplied options.

The search patterns list and the replacements must be of the same length when replace is run, but an empty replacements list is allowed if replacements are supplied with the replace call Arguments: