mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-11-20 09:29:44 +00:00
stdlib.lua runs from scripting::initialize before the main loop starts, so time.uptime() is still 0 there and math.randomseed(time.uptime() * 1536227939) is math.randomseed(0). math.random() gave the same sequence on every launch, and so did the random seed placeholder of the "New World" page: every world created without typing a seed got the same seed. Seed from time.precise_utc_time() instead. |
||
|---|---|---|
| .. | ||
| components | ||
| classes.lua | ||
| hud.lua | ||
| hud_classes.lua | ||
| post_content.lua | ||
| stdcmd.lua | ||
| stdlib.lua | ||
| stdmin.lua | ||
| world.lua | ||