willox / hash.js

Horrific chat bot that was once used in the "Garry's Mod Coders" Steam group chat
http://steamcommunity.com/groups/glua
Creative Commons Zero v1.0 Universal
3 stars 0 forks source link

Set the RNG seed for each run through scall/pcall #143

Closed SwadicalRag closed 8 years ago

SwadicalRag commented 8 years ago

valve pls fix

willox commented 8 years ago

why

SwadicalRag commented 8 years ago

TL;DR: the user experience from functions which rely on math.random() is severely impeded without it.

For example, upon a .restart, cookie.maymays.lenny() would always return ( ͡☉ ͜ʖ ͡☉), and the specific lenny face would be overused, and the meme-quality™ of the lenny function would deteriorate over time.

The cock library is also dependent upon math.random() to initialise cock data. If the seed for math.random wasn't set, everyone would likely have cocks of the same base size.

I realise that you can call math.randomseed from said functions, but setting the seed should be a standard operation, in my opinion.

willox commented 8 years ago

I thought you were calling math.randomseed every time Lau ran, this makes actual sense though.