solved a seed ugly displaying
This commit is contained in:
parent
cb129bdf9f
commit
b81d7213c3
12
main.lua
12
main.lua
|
@ -4,9 +4,9 @@ require "suppfunc"
|
|||
function love.load()
|
||||
-- Personal seed generation
|
||||
personalseed = love.data.encode("string", "hex", love.data.hash("sha256", os.getenv("PATH")))
|
||||
notsorandomseed = tonumber(personalseed, 16)
|
||||
math.randomseed(notsorandomseed)
|
||||
|
||||
notsorandomseed = personalseed
|
||||
math.randomseed(tonumber(personalseed, 16))
|
||||
|
||||
|
||||
-- GRAPHICS
|
||||
-- GOOD PIXEL
|
||||
|
@ -42,8 +42,8 @@ end
|
|||
function love.keypressed(key)
|
||||
if key == "z" then
|
||||
obj_list = {}
|
||||
notsorandomseed = os.time()
|
||||
math.randomseed(notsorandomseed )
|
||||
notsorandomseed = love.data.encode("string", "hex", love.data.hash("sha256", os.time()))
|
||||
math.randomseed(tonumber(notsorandomseed, 16))
|
||||
generate_museum(0,0,0)
|
||||
end
|
||||
if key == "escape" then
|
||||
|
@ -70,7 +70,7 @@ function love.draw()
|
|||
love.graphics.print("x: "..math.floor(g3d.camera.position[1])..", y: "..math.floor(g3d.camera.position[2])..", z: "..math.floor(g3d.camera.position[3]), 20, 40)
|
||||
|
||||
-- print seed
|
||||
if notsorandomseed == tonumber(personalseed, 16) then
|
||||
if notsorandomseed == personalseed then
|
||||
love.graphics.setColor(hexrgb("#FFD700"))
|
||||
love.graphics.print("Seed: "..personalseed, 20, 60)
|
||||
love.graphics.setColor(hexrgb("#ffffff"))
|
||||
|
|
Loading…
Reference in New Issue