TangentFoxy / GIFS

(ON HOLD) Virtual file system for ComputerCraft computers. Allows accessing multiple disks as one big disk.
0 stars 2 forks source link

disk uuid #4

Open TangentFoxy opened 8 years ago

TangentFoxy commented 8 years ago
function lume.uuid()
  local fn = function(x)
    local r = math_random(16) - 1
    r = (x == "x") and (r + 1) or (r % 4) + 9
    return ("0123456789abcdef"):sub(r, r)
  end
  return (("xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx"):gsub("[xy]", fn))
end

from lume