getState.lua 552 B

12345678910111213141516171819
  1. return {
  2. summary = 'Get the current state of the RandomGenerator.',
  3. description = [[
  4. Returns the current state of the RandomGenerator. This can be used with
  5. `RandomGenerator:setState` to reliably restore a previous state of the generator.
  6. ]],
  7. arguments = {},
  8. returns = {
  9. {
  10. name = 'state',
  11. type = 'string',
  12. description = 'The serialized state.'
  13. }
  14. },
  15. notes = [[
  16. The seed represents the starting state of the RandomGenerator, whereas the state represents the
  17. current state of the generator.
  18. ]]
  19. }