end
});
+dofile("Scripts/world.lua")
+
-------------------
-- SERIALIZING --
-------------------
local testPut = string.dump(animalSpawn.TestMe)
testRun = (loadstring or load)(testPut)
testRun(animalSpawn)
-
---blah = load(serial(hello))
---blah()
-
---draw = loadstring("\027\076\074\001\000\009\064\109\097\105\110\046\108\117\097\084\000\000\004\000\004\000\008\009\002\002\052\000\000\000\055\000\001\000\055\000\002\000\037\001\003\000\039\002\010\000\039\003\010\000\062\000\004\001\071\000\001\000\017\104\101\108\108\111\044\032\119\111\114\108\100\010\112\114\105\110\116\013\103\114\097\112\104\105\099\115\009\108\111\118\101\001\001\001\001\001\001\001\002\000\000")
---draw()
--- /dev/null
+world = {
+ Registry = {
+ dirt = {
+ id = "world0:dirt",
+ texture = "Assets/dirt.png",
+ normal = "Assets/dirt_normal.png"
+ },
+ stone = {
+ id = "world0:stone",
+ texture = "Assets/stone.png",
+ normal = "Assets/dirt_normal.png"
+ }
+ },
+ Seed = 5345345,
+ Layers = 3,
+ Generate = function(self)
+ self.data = {}
+ for Z = 0,2 do
+ self.data[Z] = {}
+ for X = 0,250 do
+ self.data[Z][X] = {}
+ YGen = math.floor(6*math.sin(X/20) + Z) + 64
+ for Y = 0,128 do
+ if Y == YGen then
+ self.data[Z][X][Y] = 1
+ elseif Y < YGen then
+ self.data[Z][X][Y] = 2
+ end
+ end
+ end
+ end
+ end
+}
+
+world:Generate()