getState.lua 620 B

123456789101112131415161718192021222324
  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. state = {
  10. type = 'string',
  11. description = 'The serialized state.'
  12. }
  13. },
  14. variants = {
  15. {
  16. arguments = {},
  17. returns = { 'state' }
  18. }
  19. },
  20. notes = [[
  21. The seed represents the starting state of the RandomGenerator, whereas the state represents the
  22. current state of the generator.
  23. ]]
  24. }